Suggestions for fast dual RS232 VP
Jim Brain
Posts: 17
I'm looking for suggestions for a fast dual RS232 VP implementation, or a single UART that I can modify
I've tried the ones available for dload here, and they're fine, but I'm pushing to get 115200 out of the dual, and 230400 out of the single.· I calculated my delays at 75MHz, and I'm not sure there's enough time.
I'm wondering if there are more streamlined versions out there.· I tried compliling the 3 times oversampling one on a web site somewhere, but It's written for a PIC assembler, and I could not get it compiled to try it with my SX-Key/SX-Tech.
My project is going to be GPLed after I finish, so I'd prefer GPL code, but if someone has a solution I can take ideas from and re-implement, that'd be OK as well.
I need enough extra time in the routines to do the control lines (DTR/DSR/CTS/DCD/RTS), so I'm a bit more worried about timing.
Jim
·
I've tried the ones available for dload here, and they're fine, but I'm pushing to get 115200 out of the dual, and 230400 out of the single.· I calculated my delays at 75MHz, and I'm not sure there's enough time.
I'm wondering if there are more streamlined versions out there.· I tried compliling the 3 times oversampling one on a web site somewhere, but It's written for a PIC assembler, and I could not get it compiled to try it with my SX-Key/SX-Tech.
My project is going to be GPLed after I finish, so I'd prefer GPL code, but if someone has a solution I can take ideas from and re-implement, that'd be OK as well.
I need enough extra time in the routines to do the control lines (DTR/DSR/CTS/DCD/RTS), so I'm a bit more worried about timing.
Jim
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!
Not sure why I missed that page. I thought I checked your site during my research. Oh well.
Jim
Took out the autobaud detection. It's nice, but I feel it's a niche thing, as you need to mandate the fist char sent.
Added back in configuration and high speed operation for UART2 (it was hardcoded to 9600 bps)
Fixed the code for production SX52 (the code was configured for SX52_ES)
Moved a few things to create shortest path for 115,200 bps routes.
As of now, both UARTs can run at 115200, and I think that's about as good as I am going to get.
Jim
Could save others a lot of headaches.
regards peter
Jim
Short version: Cool, but don't stress about the code being perfect, just release it, and thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!
Here is the code I have been working on
I still need to move it back to the SX28 and make sure I have the bank stuff correct, but it compiles for the unit.
A couple notes:
Let me know if there are issues or suggestions for more fixes.· Planned enhancements:
- Put conditionals around the RTS/CTS code (Right now it is commented out, as per the original source)
- Make the 16550 bus stuff conditional, or separate it out into it's own file
JimI am doing a similar piece of code, based on the dual-uart available on the www.parallax.com/sx/downloads.asp page. This works ok running two uarts at 57600, but I get dropouts and issues running dual uarts at 115200 on a SX18 @ 50mhz.
I notice in your code that you have timeings for 50 and 75mhz, and that that ISR seems only to implement a single UART in some situations??
Can you confirm whether two uarts at 115200 can be run with a 50mhz clock, or whether this requires 75mhz.
Cheers
James
The code also has a special code path for 115200 operation of both UARTs.·
My code used a combination of the original fixed speed 19200 DUART code and added in the 115200 UART code pieces (twice).· I had 2 UARTs running at 115200 at 50MHz, but I did not do extensive testing.· YMMV.
Jim
·
Cheers. Coincedentally got mine working at 50mhz last night - got the baud rate start delay value wrong! DOH!
James