COSC 422
Programming Assignment #3 


You must hand in a well documented source code listing. 

Bit Banging!!

You will transmit a 3 bit binary number from one PIC chip to another. The receiver chip will then display the number on 3 leds.

Read Tutorial 7 from Nigel's page (link onclass page). We assume 10,000 baud, 8 data bits, no parity, 1 stop bit). A quiet line goes high.

On the receiver side

-B7, B6 and B5 should have LEDs connected to them. Don't forget to use a resistor in the 300-2000 ohm range in series with each LED.

- A2 is the receiver line


On the transmitter side


A1 , A0, A7 will be the numeric input with A1 the most significant bit and A7 the least significant bit. So A1 assigned 1, A0 assigned 1 and A7 assigned 0 is interpreted as a binary 110 or decimal 6.

- A6 is the  toggle switch . That is, when it is set to low, there is nothing to do. When it is set to high, then the binary three bits (A1,A0,A7) should be read and transmitted. You will need a push-down resistor.

IMPORTANT!! The mapping of input to output bits is as follows:

       A1 -> B7

       A0 -> B6

       A7 -> B5

    You should send A1 followed by A0 followed by A7

- A2 is the transmit line