Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About iano

  • Rank
  1. I'm a new user of C2C but I have used PIC assembler a lot. When I write a simple program in C2C which only includes the system include, sets the clock speed to 4mhz via a pragma and then sets portc to 0xaa, my logic probe shows that the output values are correct - however the probe shows them oscillating. The same code in assembler works without oscillation. I'm guessing that I have stuffed up somewhere ? Help ! Thanks, Ian Thanks moyoyoyo for you help. I tried some more code without any success - I'm sorry I should have included code the first time round. I realise that I am using some obselete functions (but believe they are still supported). I am using the PIC 16f877 and the same hard ware as reported before works when I write an assembler program with another program ! The target is correctly set in the project. #include #pragma CLOCK_FREQ 4000000 main() { set_tris_b(0x00); output_port_b(0xaa); set_tris_a(0x00); output_port_a(0xaa); while(1); } This code is so simple I can't believe that it doesn't work ! Help !
  • Create New...