EE-712 Embedded System Design Lab2 - Parallel IO and Basic Operations in Assembly
EE-712 Embedded System Design Lab2 - Parallel IO and Basic Operations in Assembly
Aim: To interface switches and LEDs to the parallel ports of the TivaC
board and to perform some basic operations on the inputs and give proper out-
put using Assembly programming.
Program is to loop for reading the inputs and displaying the outputs. TivaC
break out board is provided with 4 switches that are connected to port pins
PA.2 to PA.5. Use these 4 switches to take the input.
Task flow:
1. Input and output are of 16 bits. Lets say X15X14....X0 is input and
Y15Y14....Y0 is output. Operation to be performed is given by X15X14,
operand1 is given by X13X12..X7 and operand2 is given by X6X5..X0.
2. Input from the 4 switches should be taken for 4 times to form 16 bit data
using the protocol mentioned below.
(a) A notification of the board ready to accept new data should be given
by glowing any of the LED connected to port F.
(b) After the LED is on, user should set the switch position to give input.
(c) SW1/2 of the port F should be pressed to indicate the board to accept
the data.
(d) LED should be made off and the data read from switches should be
saved.
(e) After a delay, LED is made on and the process repeats.
3. Operations:
NOTE:
1. GPIOs on TM4C123 can be configured for 2mA, 4mA, 8mA drive strength.
On reset, GPIOs are default to 2mA drive strength. While interfacing
1
Fig 1: Interfacing of 7406 buffer with TM4C
LEDs, if the LED current is more than 8mA then we cannot connect it
directly to the microcontroller pin. It may damage the chip due to high
current. Use 7406 buffer to avoid accidental damage to microcontroller
pins as shown in the figure above.
2. Refer to Supporting doc for Assembly.pdf for tips on assembly program-
ming.