Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Thu Feb 22, 2007 9:37 am
Which PIC processor are you using? Odds are it is a PIC16 with the famous "read, modify, write" problem. Use the search function of this forum to get more info on this issue.
Try the program below, if it works you can be sure it is the RMW problem.
Code:
void main()
{
do
{
OUTPUT_HIGH(PIN_C0);
delay_ms(100);
OUTPUT_HIGH(PIN_C1);
delay_ms(2000);
There's a bug in the startup code for the 16F690 in PCM vs. 3.249.
Comparator #2 is turned on by mistake. That's why pins C0 and C1
don't work. You can fix this by adding the line of code shown in bold
below, at the start of your program:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum