I've used the XMOS software UART on my XC-2, but only at 115200bps. Over winter break, I'm hoping to interface with my Bioloid Servos, the Bioloid bus typically runs off a 1Mbps serial connection.
All the documentation seems to state that 921000bps is the max speed of the example software UART, but I can't find anything that says why a 1Mbps UART couldn't be done.
Before possibly wasting time on this, anything I should be aware of? Is there some limit on pin switching that I'm not aware of? If necessary, I can drop the speed of the bus, but I'd rather run it at full speed if at all possible.
-Fergs
High Speed UART?
-
- Member
- Posts: 15
- Joined: Sun Dec 13, 2009 3:17 am
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
I'm not familiar with limitations on the software UART perhaps there are some due to the way it is written.
If toggling/sampling the pins in software using timers or port counters is actually too slow then don't forget the ports can also serialise/de-serialise in hardware at far greater speed. Up to 32 bits of serial data can be clocked in or captured by the port hardware between reads/writes of the port by software. This is how it is possible to get up to USB and Ethernet speeds.
Take a look at the document "XS1 Ports: Use and Specification". Section 2.3 shows a 25MHz serial to parallel conversion.
If toggling/sampling the pins in software using timers or port counters is actually too slow then don't forget the ports can also serialise/de-serialise in hardware at far greater speed. Up to 32 bits of serial data can be clocked in or captured by the port hardware between reads/writes of the port by software. This is how it is possible to get up to USB and Ethernet speeds.
Take a look at the document "XS1 Ports: Use and Specification". Section 2.3 shows a 25MHz serial to parallel conversion.
-
- XCore Expert
- Posts: 754
- Joined: Thu Dec 10, 2009 6:56 pm
1Mbit/second should be no problem at all!
Maybe the way the baudrate divisor is stored in that software UART limits the baudrate.
Maybe the way the baudrate divisor is stored in that software UART limits the baudrate.
-
- Member
- Posts: 15
- Joined: Sun Dec 13, 2009 3:17 am
Thanks, that all sounds great. I'll be trying this out later this week (last exam of the semester is on Tuesday).
-Fergs
-Fergs