DEFINE OSC Serout problem
Hi all
Im having a problem doing serout @ 9600 with 20mhz osc on 18f4550 (sending garbage chars)
I have the 18f4550 set up for usb operation pll*5 (20mhz osc in) and also want to use a pin for serout.
but even if i put DEFINE OSC 20 top of listing it sends garbage out the serout pin, BUT, if i change the DEFINE to "DEFINE OSC 12" it sends the correct chars out the pin EVEN though it has a 20mhz xtal attached ???, and of course the usb wont work with this define.
Any idea whats going on ?
Thx
Not all CPU freq are available ....
Hi, Bonxy
the Question is ...
Which freq do you want to run the CPU ??? ... here we just know you use a 20 Mhz external XTAL ...
BUT which is YOUR " CPUDIV_OSCx_PLLy _1L setting ???
note you can't run the CPU@ 20 Mhz ... using PLL and USB ( 16 or 24 Mhz only - PLL x4 or x6 ... ).
The ONLY available CPU freq are 48, 32, 24 and 16 Mhz, when using USB
20Mhz need using only HS oscillator ... no USB then !!!
Soooo ... nothing strange ...
Try 24 Mhz ... and do not forget the " DEFINE "...
Alain