Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with hardware UART
#1
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?
Reply


Messages In This Thread
Problems with hardware UART - by velostar - 2015-01-18, 18:22:04
RE: Problems with hardware UART - by velostar - 2015-01-23, 19:13:03

Forum Jump:


Users browsing this thread: 1 Guest(s)