Why does this only count to 10?
Device = 18F1320
Clock = 4
Config OSC = INTIO2, WDT = OFF, LVP = OFF
dim x as byte
OSCCON = $62 // 4MHz
Low(PORTA.6)
For x = 1 to 20
Toggle(PORTA.7)
DelayMS(250)
next
End
Thanks, Don
Information for Newbie
Moderators: David Barker, Jerry Messina
I would have thought that if there is an led and it flashes 10 times(this is a guess as you have provided so little actual information) that the counter is going to 20, 10 on and 10 off.
If you use two consecutive toggle commands with a delay between each then it should flash 20 times as you may expect.
Also what is the low(porta.6) line doing?
Another issue could be the programmer not programing the fuses correctly and the watch dog still being on, however unlikely.
Indicating the method determining your assumption of only 10 counts would help lots!
If you use two consecutive toggle commands with a delay between each then it should flash 20 times as you may expect.
Also what is the low(porta.6) line doing?
Another issue could be the programmer not programing the fuses correctly and the watch dog still being on, however unlikely.
Indicating the method determining your assumption of only 10 counts would help lots!