View Full Version : Fastest baud rate w/PBP?
  
jrprogrammer
- 1st April 2016, 05:25
So I suddenly need to go faster than 38,400 with a PIC16F883 and a 20 MHz xtal.  I'm sending out on 4 pins, with no MAX232 chips involved.  The good book says a max of 38,400, but haven't I seen postings that say (up to)115,300???..  Do I need to write a routine in assembler to do this?
Thanks for listening,
JR
HenrikOlsson
- 1st April 2016, 07:31
If you're using SEROUT(2) then I think the answer is no. There's a formula that tells you how to specify the baudrate bits and for 115200 the result of that formula comes out negative = no go. I'm not sure but it's possible that DEBUG can work with higher baudrates, it might be worth a shot.
With that said, that chip you're using has an USART, can't you use that?
/Henrik.
jrprogrammer
- 1st April 2016, 16:26
Thanks for the reply.  Yes the PIC has a USART, but I need to send serial data out a total of 4 pins...  If you use Mister E's Multicalc, 115200 does give me a number. I have a more precise xtal coming.  Right now my frequency counter says 19.84 MHz which would really screw up the baud rate.  Granted, my  10:1 scope probe could be pulling the frequency that I read.  
I'll report back, once I get the new xtals.
JR
tumbleweed
- 2nd April 2016, 00:26
If you use Mister E's Multicalc, 115200 does give me a numberWhat number does it give?
If you look at the table of numbers for SEROUT2, it pretty much maxes out at 38400.
I have a more precise xtal coming. Right now my frequency counter says 19.84 MHzYou're loading it with the scope probe. Better to measure it a different way. 
Even so, while that's not a great number for an xtal it's less than 1% error so the serial baud rate would probably be fine (if that table produces accurate numbers to begin with). I don't think a better xtal is going to do much for you.
Since you're interested in the serial out data, perhaps just transmit a 'U' character ($55) and look at the individual bit times.
 
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.