CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Hardware UART at non standard baud rates

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ntype



Joined: 01 Nov 2007
Posts: 9

View user's profile Send private message

Hardware UART at non standard baud rates
PostPosted: Thu Nov 01, 2007 2:35 pm     Reply with quote

Hi,

Im using a PIC18F2520 on a MIDI based project, and i can successfully transmit midi characters at the desired rate of 31.5Kbps. However, i know this is an unusual baud setting. Will the hardware UART deal with this setting, or is it effectively running as a software UART, doing the bit bashing via the processor?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 01, 2007 2:53 pm     Reply with quote

Do a Google search for this:
Quote:
PIC baud rate calculator

Then download the program from the first hit:
http://www.micromagicsystems.com/picbaud/4523812801
(Note: This website plays a sound when you go to it).

Unzip it, drag it onto your desktop, plug in the parameters for your
board, click the "Calculate" button and look at the error percentage.
If it's less than a couple percent, it should work.
ntype



Joined: 01 Nov 2007
Posts: 9

View user's profile Send private message

PostPosted: Thu Nov 01, 2007 3:03 pm     Reply with quote

Cool Utility. I ran the numbers in and with a 20MHZ clock the error is -0.79% . So it looks like i might be in luck. As an experiment I set my PIC to transmit at the nearest 'correct' frequency (31250bps) and my MIDI recieving hardware picks up the messages fine, so either way it looks like in onto a winner! Hurrry for Hardware UARTS, i really couldn't have afforded the processor time to transmit using a soft uart.

Thanks PCM
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group