-
Oscillator problems
I'm using an 18F252 with a 10 MHz external resonator and I can't figure out the code needed to tell the pic to run in what the datasheet called "HS" mode. I'm new to the PIC and PicBasic, but I think that I have my PIC set up correctly (pin 1 tied high w/ 4.7K resistor) and I have a good downloader. Here is the code that I have been trying:
DEFINE OSC 10
loop:
high PORTB.0
low PORTB.1
pause 500
high PORTB.1
low PORTB.0
goto loop
end
but I cant get any sign of life out of my PIC
-
Presetting Configuration Fuses (PIC Defines) into your Program
http://www.picbasic.co.uk/forum/showthread.php?t=543
-
Maybe it's alive and you just can't see it.
You outputs will only change for a fraction of a uSec every half second.
Try adding another "pause 500" before the "goto loop".
Darrel
-
I just added the PIC defines into my program, and eliminated the "Overwriting previous adress" error by commenting out the __CONFIG commands (not the INCLUDE command though) in the 18F252.inc file, but I still have 4 errors remaining that I dont understand.
Duplicate label ("DDRA")
Duplicate label ("DDRB")
Duplicate label ("DDRC")
Superseeding current maximum RAM and RAM map.
EDIT:
If I comment out the INCLUDE line of 18F252.inc then I get different errors:
Duplicate Label ("_PORTL")
Duplicate Label ("_PORTH")
Duplicate Label ("_TRISL")
Duplicate Label ("_TRISH")