Slave I2C or UART ?
richaj45
Posts: 179
Hello:
What would take the minimum resources on an SX: A slave I2C or UART?
I am wondering if i used SX48s as slave controllers what would be the most robust slave interface with the least amount of SX code and ram spave taken up.
rich
Post Edited By Moderator (Bean (Hitt Consulting)) : 10/9/2008 10:30:02 AM GMT
What would take the minimum resources on an SX: A slave I2C or UART?
I am wondering if i used SX48s as slave controllers what would be the most robust slave interface with the least amount of SX code and ram spave taken up.
rich
Post Edited By Moderator (Bean (Hitt Consulting)) : 10/9/2008 10:30:02 AM GMT
Comments
A background uart takes less code than a background I2C slave.
If you want to minimize cycles, you can split up code into
several states, which means code size increases but the number
of cycles inside the isr decreases, although it requires more
interrupt periods to complete a task.
So it is a tradeoff between memory and speed, as usual.
regards peter
The UART would require a resonator though...
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"It is our choices, Harry, that show what we truly are, far more than our abilities."·Dumbledore from Harry Potter
www.iElectronicDesigns.com
·
Common to all implementations is that they deal with asynchronous communications, i.e. there is no separate clock signal, like in I2C, SPI and other serial protocols.
Depending on specific needs, you will in most cases only implement some of the UART features, like just one fixed baud rate, so it would be just an "ART", or you only need an Asynchronous serial Receiver, so it would actually be an "AR", or an "AT" for a transmitter.
Nevertheless, we are so used to the term UART that we use it for all kinds of serial asynchronous implementations.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
I remember in college building a single board computer and adding a UART chip for communications which may be why it didn't sound right to me when I hear UART. But the SX is very capable of that and so many more functions that the user can define.
Thanks again!