PDA

View Full Version : Define osc 1



ronsimpson
- 1st October 2009, 03:55
I am using PICs with slow internal oscillators.
It appears to me that DEFINE OSC will not work below 3mhz.
There are some instructions that will not work if DEFINE OSC is not working right. (PAUSE and SEROUT2)
Because DEFINE OSC .032 will not work I use DEFINE OSC 3 with 32khz and use PAUSE 1 to get a “PAUSE 100”.
How should I deal with 1mhz, 125khz or 32khz oscillators with PBP when using serial or pause instructions?
Thanks!

Darrel Taylor
- 1st October 2009, 06:35
The lowest frequency acknowledged by PBP is 3.579MHz (color burst crystal) OSC=3.
Anything lower must be interpellated.

For instance, at 1 mhz, a serial signal that would work at 9600 baud at 4Mhz, would act as 2400 baud with 1mhz.
So setting a USART, or SERIN(2) to 9600 baud, will give 2400 baud.

A PAUSE 100 would actually be PAUSE 400.

Everything gets adjusted by, 4:1
Just set OSC to 4, and adjust proportionately.

.