COSC 625
Programming Assignment #1
Due: Monday October 14


Bit Bang

Transmit 3 bits from the transmitter to the receiver. Assume a rate of 1000 bits per second.

On the transmitter side:

3 pins to set high or low. Recommended: use pins B0,B1,B2
1 pin to indicate to chip to transmit . Recommended: use pin B3.
1 pin to transmit. Recommended: use pin B4

Remember to use a push down resister on B3

Pseudo Code:


Begin
             Set transmit line high (B4)
Check_Transmit
             While pin B3 is zero, goto Check_Transmit
Transmit
             Send start bit
             Read and transmit B0
             Read and transmit B1
             Read and transmit B2
             goto Begin



On the receiver side
    1 pin to receive bits. Recommended: use pin B3
    3 pins connected to LEDs . Don't forget to use resistors (about 5000 ohms is ok). Suggested: use pins B5,B6,B7


Pseudo code

Begin_Receive
       While (receive line is high) goto Begin_Receive
       Pause 500 microseconds
       Pause 1 millisecond, sample receive line and turn on appropriate led
       Pause 1 millisecond, sample receive line and turn on appropriate led
       Pause 1 millisecond, sample receive line and turn on appropriate led
       goto Begin_Receive