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

Achieving 1Mbps w/ 32MHz oscillator

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



Joined: 13 Jul 2005
Posts: 25
Location: Maryland

View user's profile Send private message

Achieving 1Mbps w/ 32MHz oscillator
PostPosted: Tue Dec 06, 2005 10:47 pm     Reply with quote

Hi all,
I am trying to get 1M baud rate out of the hardware USART of the 18F1320. If the baud rate equation is Fosc/16/(1+constant), and Fosc = 32MHz, I would think the constant would be = 1. With that being the case, could I still use the #use RS232(...) command, or would I have to enter the baud rate and parity with the bitwise definitions? I know that the baud rate I want is non-standard, but it is needed in my particular application. Please advise.
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Dec 07, 2005 12:28 am     Reply with quote

I use 1 for 1.25MHz at 40MHz on an 18F452 which scales to the same divisor for 1M at 32MHz. I don't know if the #use statement handles it correctly but I would expect it to do so. You can alway use the #use and then program the baud rate generator yourself.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Konrad



Joined: 15 Sep 2003
Posts: 34

View user's profile Send private message

read the errata
PostPosted: Thu Dec 08, 2005 3:11 pm     Reply with quote

I seem to remember a note in the errata from microchip saying the baud rates on the 18F1320 can be flaky causing framing errors. If i have remembered correctly, running so fast may exacerbate these framing errors,
dima2882



Joined: 13 Jul 2005
Posts: 25
Location: Maryland

View user's profile Send private message

PostPosted: Fri Dec 09, 2005 12:16 pm     Reply with quote

I did indeed get errors when I ran my UART that fast on the 18F1320. In fact, I went with the 18F242 ( I have many more of them lying around, and they need to get used up), and things worked well with the standard #use RS232 statement.
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