
Originally Posted by
George
I'm playing with a 16F628 and for some reason I'm having significant trouble, I'm running a 4MHz crystal with 15pF caps - am running crystal rather than INTRC as I'm wanting reliable serial comms - but in the interum I can't even flash an LED - can anyone please tell me where I'm going wrong? I know it'll be something stupid but stuffed if I can figure it!
Thanks
@ DEVICE PIC16F628, XT_OSC, MCLR_OFF, PROTECT_OFF, BOD_ON, CPD_OFF, WDT_ON
DEFINE OSC 4
TRISA = %00000011
TRISB = %10000000
T1CON = %00000011
VRCON = 0 ' A/D Voltage reference disabled
CMCON = 7 'Disable comparitor
OPTION_REG = %01010111
PortA = 0
PortB = 0
start:
portb.2 = 1
pause 100
portb.2 = 0
pause 100
goto start
Data sheet says to add @ DEVICE PIC16F628, PWRT_ON whenever BOD is enabled
Also: I do not believe this chip has A/D converters so VRCON is likely not valid but I am really unsure about that.
Last edited by Archangel; - 2nd April 2007 at 07:36.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks