pic internal osc for comms?

richardb

Dec 21, 2013
48
Joined
Dec 21, 2013
Messages
48
Hi I'm thinking about using a 12f1840 for some simple home projects, for example a SMPS controller instead of a 555 timer ;),

But also I was wondering how reliable the rs232 comms is using the internal osc, I've always used external xtals before for predictability.

The data sheet shows 1% which sounds ok. any thoughts.

Also is it possible to invert the rs232 I/o on the pic through the configs. to allow me to not require external inversion?
 

jpanhalt

Nov 12, 2013
426
Joined
Nov 12, 2013
Messages
426
How accurate the internal oscillator is for comm's is dependent to an extent on the timing routines that you use, the baud rate, and the length of your data packets (e.g., number of bytes). If you check out PicList for K8LH (Mike McLaren) you will find some very nice schemes for the 12F683 that work well. I don't know if he is a member here. I have used them, even with an XBee interfaced, and they work well at 9600 baud.

In any event, with the 12Fxxx and 12F1xxx series, you may find yourself pin-limited, if you use an external oscillator.

John
 

richardb

Dec 21, 2013
48
Joined
Dec 21, 2013
Messages
48
How accurate the internal oscillator is for comm's is dependent to an extent on the timing routines that you use, the baud rate, and the length of your data packets

I thought the timing would be from each start bit? is that not the case?


In any event, with the 12Fxxx and 12F1xxx series, you may find yourself pin-limited, if you use an external oscillator.
that's why I was asking about the internal osc.
 

richardb

Dec 21, 2013
48
Joined
Dec 21, 2013
Messages
48
BTW I was talking about using the usart. rather than a soft solution as I would like to use an interrupt driven routine.
 

p.erasmus

Jul 18, 2013
60
Joined
Jul 18, 2013
Messages
60
You should be able to run Serial communication with the Internal Oscillator see datsheet
it has 2% accuracy which is enough for serial coms but not other communication protocols
such as CAN .
 

Attachments

  • 112.jpg
    112.jpg
    111.2 KB · Views: 131

richardb

Dec 21, 2013
48
Joined
Dec 21, 2013
Messages
48
I can see why you would do that using a 12F683 as I don't think it has a usart but the 12f1840 does and has more ram/rom its faster and has pwm and its cheaper.

The datasheet implies that it is "Factory calibrated to ± 1%, typical"
 
Top