Binary word serial output
Posted: Sat Sep 22, 2012 5:02 pm
Hi,
I'd be grateful for any advice.
I need to output a 40 bit word serially from a single port.
I have figured out a way to do it that works but it seems very wasteful and inefficient.
What I've done is represent the 40 bit word as a string array (which uses up 40 bytes instead of 5 bytes) and then output each byte of the array in turn.
There must be a more direct way of outputting a binary number sequentially (LSB first) just can't find it / figure it out.
If you can help!
Thanks
G
I'd be grateful for any advice.
I need to output a 40 bit word serially from a single port.
I have figured out a way to do it that works but it seems very wasteful and inefficient.
What I've done is represent the 40 bit word as a string array (which uses up 40 bytes instead of 5 bytes) and then output each byte of the array in turn.
There must be a more direct way of outputting a binary number sequentially (LSB first) just can't find it / figure it out.
If you can help!
Thanks
G