In SX Microcontrollers, SX/B Compiler and SX-Key Tool, kmonsx wrote: I have an application that requires a high data rate from the SX to a PC. I'm currently using the USB2SER, which is very nice. I'm using SX/B's SEROUT commands which work fine up 230.4kbps. I had originally implemented my own bit-banging UART at 2mbps in asm, and it worked pretty good, but not perfect. While I never fully debugged the routines, I think my problems were related to varying execution length based on using multiple cycle instructions that varied with the data content. The time between bits were simply a bunch of NOPs. While I didn't check the amount of variation, it was obviously enough to cause bit errors, at a rate of perhaps 1/3000. I have very little experience with UARTs, but I do understand how they work, for the most part, what they do, and so on. I'm running the SX28 at 50mhz. I'm confident the SX is fast enough given the required slow-down between bits. 2mbps bit period is 500ns. 25 single cycle instructions between bits. Is it possible to make a high-speed reliable non-ISR based UART? When it comes time to transfer the data, the SX's sole job is to transfer the data from SRAM. I will have interrupts disabled during transfer. If only ISR-based solutions make sense, I don't need any time in my main loop while transmitting the byte. So an ISR that consumes all the SX's time(for the duration of the byte) is fine with me. Most of the pre-packaged UART VPs and examples I've seen have much lower baud rate limits. Note that I'm only worried about transmitting here, my receive code seems to work well enough, and there is VERY little data coming the other direction. Thanks. Keith P.S. while my target data rate is 2mbps, I'd take 1mbps in a pinch. ;) ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=169798 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)