2015-01-18, 18:22:04
Hello,
in my private project I use the PIC18F45K22 with an external quartz clock of 8MHz.
Therein I use some capture (CCP) and timer routines from older projects (based on PIC 16F887 @ 8MHz).
In order to use this I made the following setting in the DS30 source software:
Settings.inc:
#define FOSC 8000000 ; 8MHz
…
config FOSC = HSMP ; external oscillator block medium power
config PLLCFG = OFF ; Oscillator used directly ( Disabled – 16F887 has no PLL )
…
After rebuilt in MPLAB I receive no errors.
Well done (?) - Speed measurement with CCP and used timers works fine.
But: In my program I use UART data communication with 9600 bps.
(UART1_Init(9600): This will initialize hardware UART1 module and establish the communication at 9600 bps.)
In my HyperTerminal program on PC I must change the Baud rate from 9600 to 38400 to receive accurate and readable messages. I don’t know what happens!!
My guess: 38400= 4x 9600! – PLL active? But I switched PLLCFG = OFF (s. above)
What’s going on?
in my private project I use the PIC18F45K22 with an external quartz clock of 8MHz.
Therein I use some capture (CCP) and timer routines from older projects (based on PIC 16F887 @ 8MHz).
In order to use this I made the following setting in the DS30 source software:
Settings.inc:
#define FOSC 8000000 ; 8MHz
…
config FOSC = HSMP ; external oscillator block medium power
config PLLCFG = OFF ; Oscillator used directly ( Disabled – 16F887 has no PLL )
…
After rebuilt in MPLAB I receive no errors.
Well done (?) - Speed measurement with CCP and used timers works fine.
But: In my program I use UART data communication with 9600 bps.
(UART1_Init(9600): This will initialize hardware UART1 module and establish the communication at 9600 bps.)
In my HyperTerminal program on PC I must change the Baud rate from 9600 to 38400 to receive accurate and readable messages. I don’t know what happens!!
My guess: 38400= 4x 9600! – PLL active? But I switched PLLCFG = OFF (s. above)
What’s going on?