Robert, Havent you ever ran a PIC from an external oscillator before? You only need 1 pin for the input. That frees up another pin for some external use by the designer.
Robert, Havent you ever ran a PIC from an external oscillator before? You only need 1 pin for the input. That frees up another pin for some external use by the designer.
Dave Purola,
N8NTA
EN82fn
No Robert, Like this:
![]()
Dave Purola,
N8NTA
EN82fn
Wouldn't that need a CONFIG fuse?
Dave, do you have an example from one of your programs?
Robert
EDIT: These are the available fuses for a 16F819:
Code:_CP_ALL EQU H'1FFF' _CP_OFF EQU H'3FFF' _CCP1_RB2 EQU H'3FFF' _CCP1_RB3 EQU H'2FFF' _DEBUG_OFF EQU H'3FFF' _DEBUG_ON EQU H'37FF' _WRT_ENABLE_OFF EQU H'3FFF' _WRT_ENABLE_512 EQU H'3DFF' _WRT_ENABLE_1024 EQU H'3BFF' _WRT_ENABLE_1536 EQU H'39FF' _CPD_ON EQU H'3EFF' _CPD_OFF EQU H'3FFF' _LVP_ON EQU H'3FFF' _LVP_OFF EQU H'3F7F' _BODEN_ON EQU H'3FFF' _BODEN_OFF EQU H'3FBF' _MCLR_ON EQU H'3FFF' _MCLR_OFF EQU H'3FDF' _PWRTE_OFF EQU H'3FFF' _PWRTE_ON EQU H'3FF7' _WDT_ON EQU H'3FFF' _WDT_OFF EQU H'3FFB' _EXTRC_CLKOUT EQU H'3FFF' _EXTRC_IO EQU H'3FFE' _INTRC_CLKOUT EQU H'3FFD' _INTRC_IO EQU H'3FFC' _EXTCLK EQU H'3FEF' _HS_OSC EQU H'3FEE' _XT_OSC EQU H'3FED' _LP_OSC EQU H'3FEC'
And these are the default settings (PM and MPASM):
Code:device pic16F819, hs_osc, wdt_on, pwrt_on, lvp_off, protect_off ... else ... __config _HS_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
Last edited by Demon; - 22nd January 2012 at 23:04. Reason: Used sample from proper PIC
To all intents and purposes a clock and oscillator are one and the same.
The answer lies at the end of the fuses list 4th from bottom _EXTCLK needs setting as my programmer defaults to standard inc setting.
This is what I need :
_LVP_OFF & _CP_OFF & _BODEN_ON & _MCLR_OFF & _PWRTE_ON & _WDT_OFF & _EXTCLK & _DEBUG_OFF & _WRT_ENABLE_OFF & _CPD_OFF & _CCP1_RB3
Last edited by tasmod; - 23rd January 2012 at 10:22.
Hmm, I posted another reply but it vanished into the ether !
OK, changing the INC file and putting that line in did the trick. Seems my programmer options don't work it always goes back to the standard INC, modifying that worked.
The LCD now responds in a single line format but I seem to be screwed up with the ADCON TRIS etc. No surprise there then.
I'll post the code once I have it from the other computer.
Bookmarks