Saturday, April 30, 2016

8051 program – serializing data

Serializing data is a way of sending a byte of data one bit at a time through a single pin of microcontroller. There are two ways to transfer a byte of data serially:
  • using serial port
  • Transferring data one bit at a time through a single pin
Serializing data is one of the most widely used applications of the rotate instruction. Using that concept and the rotate instruction, we transfer a byte of data serially (one bit at a time).

; Serializing data
MOV A, #0C5H
MOV R7, #8
LOOP: RRC A ; move bit to carry
MOV P0.1, C ; send bit on data pin

Related topics:
8051 Program - logical operation   |   8051 Program - parity generation   |   8051 Program - polling an io pin   |   8051 Program - port loopback   |   8051 Program - send ascii to port   |   8051 Program - simple serial transmission   |   8051 Program - memory subroutines   |   8051 Program - math subroutines   |   8051 Program - conversion subroutines

List of topics: 8051

No comments:

Post a Comment