Sorry, 16F819
I've been over the datasheets time and time again and cannot figure this out.
Thanks
Sorry, 16F819
I've been over the datasheets time and time again and cannot figure this out.
Thanks
That's a big red flag there. Are you 100% sure you're even programming it?It even runs if I set it for external oscillator
If you set config options for an external crystal or resonator, program the part,
and it's still running, you really do have a problem.
Post all your code & let us know which programmer you're using. That would really
help.
This is all I have, at this point I was just trying to get the thing to do something in this case the leds on the different ports do switch on and off.
@ Device PWRT_OFF
@ Device MCLR_OFF
@ Device INTRC_OSC
@ Device BOR = 0
@ Device Debug_Off
OSCCON = %01110000
OPTION_REG = %11111111
TRISB = %00101010
loop:
TRISB = %00101010
Pause 1
PortB = 1
TRISB = %11010101
Pause 1
PortB = 1
TRISB = %00101010
Pause 1
goto loop
End
Indeed there's a problem, the above don't set the proper config fuses.
Try
That line you hadCode:@ device pic16f819, INTRC_OSC_NOCLKOUT @ device pic16f819, WDT_OFF @ device pic16f819, PWRT_ON @ device pic16f819, MCLR_OFF @ device pic16f819, BOD_ON @ device pic16f819, LVP_OFF @ device pic16f819, DEBUG_OFF
screw everything upCode:@ Device BOR = 0![]()
Last edited by mister_e; - 25th February 2009 at 22:40.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
You might want DEFINE OSC 8 in there too if you're running at 8MHz VS the default 4MHz.
Well Steve, that seems to have done it Thank You!!! I'm not sure I quite understand it all but I can work it out I'm sure.
Thanks again.
Hi Tim. Maybe this will help you. I believe the following also applys to the 16F88.
'INTERNAL OSCILLATOR VALUES for 16f818/819:
'OSCCON = $00 'for 31.25 khz
'OSCCON = $10 '125khz
'OSCCON = $20 '250khz
'OSCCON = $30 '500khz
'OSCCON = $40 '1mhz
'OSCCON = $50 '2mhz
'OSCCON = $60 '4mhz
'OSCCON = $70 '8mhz
adcon1 = 7 ' set inputs to digital. Using the adcin command will automatically convert the ADC port to 'analog
'OPTION_REG.7=0 ' Switch-ON weak pull-up's on portb
'@ DEVICE MCLR_ON, INTRC_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_ON
'CCPMX_ON THE @ DEVICE LINE ABOVE SETS HPWM OUTPUT TO RB3, CCPMX_OFF (DEFAULT IF NOT 'SPECIFIED) = RB2
Bookmarks