View previous topic :: View next topic |
Author |
Message |
dima2882
Joined: 13 Jul 2005 Posts: 25 Location: Maryland
|
Achieving 1Mbps w/ 32MHz oscillator |
Posted: Tue Dec 06, 2005 10:47 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Wed Dec 07, 2005 12:28 am |
|
|
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!! |
|
![](templates/subSilver/images/spacer.gif) |
Konrad
Joined: 15 Sep 2003 Posts: 34
|
read the errata |
Posted: Thu Dec 08, 2005 3:11 pm |
|
|
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, |
|
![](templates/subSilver/images/spacer.gif) |
dima2882
Joined: 13 Jul 2005 Posts: 25 Location: Maryland
|
|
Posted: Fri Dec 09, 2005 12:16 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
|