PDA

View Full Version : Serial differences between f628 and f628A



das1818
- 24th January 2009, 17:56
I have used a f628 for years without problems sending 9600bps data, when I switched to a f628A I got data errors. So I went back to the f628. All is well but I know the non A part will get harder to get as time goes on. Do any of you have any helpfull ideas. The serial in and out pins are RA0 and RA1, CMCON = 7 is in the first few lines.
Thanking you in advance

Melanie
- 24th January 2009, 18:30
Are you using a Crystal or Resonator - or are you relying on the Internal Oscillator?

das1818
- 24th January 2009, 22:40
The internal osc.

Melanie
- 25th January 2009, 01:04
Let's put it this way - If the world was flat, you're sailing right on the edge.

Use a crystal or resonator... you've been lucky so far... but it's just run out!

das1818
- 25th January 2009, 15:00
Thank You. The PCB is so full and OSC1 and OSC2 are being used, maybe it's time for a bigger chip and new PCB layout.

Melanie
- 25th January 2009, 15:05
And a Crystal or Resonator!

tenaja
- 25th January 2009, 16:02
A lot of it depends on your volume, too. For just a couple boards you use yourself, just manually tweak the osctune register to adjust the oscillator. (Assuming they will see a consistent temperature.)

If you are shipping them out, and if you have code space, you could put in an oscillator calibration routine. You'll need a reference, though--either an on-board crystal, RTC, or incoming serial data.

You also might be able to "guess" at the osctune value by reading the pic errors in reception. Look it up in the datasheet.

But the easiest is to add a real crystal.

mister_e
- 26th January 2009, 23:04
... and as long as the PIC has a OSCTUNE register ;)

Still not a fan of internal OSC for serial communication myself... even if the more recent PIC show a better accuracy... it's still a RC OSC.