You need to set internal oscillator because you use porta.6 and porta.7 as I/O.
See page 17 on datasheet of pic18f1230.
You need to set internal oscillator because you use porta.6 and porta.7 as I/O.
See page 17 on datasheet of pic18f1230.
Thanks for the input guys, still no luck with the program, maybe its the Junebug... I don't know. Any other suggestions?
If you think it might be the "June bug" try a simple hardware setup with one LED on a non analog pine and see it you can make it blink.
Dave
Always wear safety glasses while programming.
I can get the other ports to respond to programming but PORTA.6 and 7 don't do as they should.
Here is my code, it flashes leds on PORTA.0 and PORTB.0
ADCON0 = 0
ADCON1= 127
define OSC 4
led var PORTA.0
sink var PORTB.0
loop:
toggle PORTA.6
pause 5
high led
pause 5
low led
pause 5
high sink
pause 5
low sink
goto loop
end
PORTA.6 is just low, it does not toggle or go High if I change the code.
The schematic is simple, I connected VPP, +5, Gnd, PGD and PGC.
I have 470 ohm resistors from the PIC to leds connected to GND.
Could it be the clock output function? How do I set INTRC_OSC_NOCLKOUT?
Last edited by Mike2545; - 25th July 2009 at 22:32.
http://www.picbasic.co.uk/forum/showthread.php?t=543
The above talks about how to set the configs.
You can do it in your code or just modify the PICs *.inc file.
Dave
Always wear safety glasses while programming.
Bookmarks