8051 custom speed uart to shift register

Thread Starter

testuserabcdef

Joined Jul 12, 2016
127
What I want to do here is transfer the value of SBUF (8051's serial port variable) to a popular shift register but at a speed different from 1/12ths the crystal speed. I want to use serial port mode 1 to control timing. My code will never execute the movx instruction nor will it require external memory (I forgot to set EA to high in the diagram).

If I start this circuit up, will the 4020 chip always count at 1/6th the clock speed?
and how do I do the math here? Is it timer reload value= clock speed/2^# of the Q output of the counter? I want to use uart mode 1 but when I do for example, a "MOV SBUF,#5Ah", I want to see on the outputs of QA through QH "01011010" or "10100101".

If this circuit can be improved, let me know. and I don't want to be stuck with uart mode zero because I want one line for sending data and one for receiving at the same custom rate.
 

Attachments

Top