works ok in your loop for me, although it is much slower , period goes from 3uS to 13uSCode:PORTA.0[X] = 1 ' No! Makes a blink in the scope and then stays LOW
works ok in your loop for me, although it is much slower , period goes from 3uS to 13uSCode:PORTA.0[X] = 1 ' No! Makes a blink in the scope and then stays LOW
Warning I'm not a teacher
"Makes a blink in the scope and then stays LOW"
It will return to low if:
1. you force it somewhere in the program to return to low
2. you PIC is reset for some reason (Watchdog maybe, decoupling cap missing, etc).
Other than these, I see no way to behave like this.
Ioannis
All the code and fuses settings are here.1. you force it somewhere in the program to return to low
2. you PIC is reset for some reason (Watchdog maybe, decoupling cap missing, etc).
I soldered the crystal directly on the µC's pins, a 100nF cap is there...
Strange. The pulse should be 800ns (nano seconds).although it is much slower , period goes from 3uS to 13uS
Okay, I'll give it a try with another 16F690...
Roger
Not sure I understand....
Are you saying that this code works:And this isn't:Code:MAIN: PORTA.0[23] = 1 ' OK but useless ASM nop nop nop ENDASM PORTC.7 = 0 ' have this syntax for tests only here ASM nop ENDASM GOTO MAIN ENDThe 16F690 has an ADC and comparators.Code:X VAR BYTE X = 23 MAIN: PORTA.0[X] = 1 ' No! Makes a blink in the scope and then stays LOW ASM nop nop nop ENDASM PORTC.7 = 0 ' have this syntax for tests only here ASM nop ENDASM GOTO MAIN END
Many of the pins are analog. I don't see you setting them to digital mode. PortC.7 is, however, not one of the analog pins but since you're trying to "index" pins with a variable I suspect PortC.7 isn't the only pin you want to use.
/Henrik.
Yes Henrik, you might be right.
Keen to keep the code snippet very (maybe too) short here, I removed all others register settings I have set in the original code.
I'll give it also a try...when I'm back from office.
Roger
Bookmarks