Serial to Parallel conversion C Programming

beenthere

Joined Apr 20, 2004
15,819
It's usually done in hardware. You can always shift bits into a register, though. Probably easier to do in assembler.

What is the purpose/function of the S to P?
 

hgmjr

Joined Jan 28, 2005
9,027
Assuming that you are interested in implementing a synchronous shift register, you will need to provide a clock source to accompany your serial data stream. I would look at assigning the clock source to an external interrupt pin. That way you could use the interrupt service routine to read the state of the pin you have assigned to the incoming serial data stream.

Converting the incoming serial data to parallell data is then a matter of shifting the incoming serial bits into a register until the register has been fully populated. The register (typically 8-bits in length), once full, would then be written to memory and then the process would be repeated.

hgmjr
 
Top