Skip to content

Day 05 and Day 06(Week 1)

Nagesh-K edited this page Jun 5, 2017 · 1 revision
  • Lab 2:
    This lab deals with the debouncing of switches. The aim of this project was to implement software debouncing. When a mechanical switch is pressed, it takes a finite amount of time to settle in the logic state. This problem was solved using timer interrupts.The status of the switch is checked at finite intervals. If the is pressed for two consecutive intervals then we infer that the switch is pressed.
    Note: For this method to work the bounce period should less than the finite interval.

  • Lab 3:
    This lab introduces the concept of Pulse Width Modulation(PWM). PWM, as the name suggests alters to the duty cycle of the square wave to get results which are similar to analog. PWM can be used to control the speed of motors, Brightness of LEDs etc. In this lab, there are two modes of operation manual mode and auto mode. In auto mode, the RGB LEDs on TIVA should alter their brightness so as to get a sequence of 6 colours. In manual mode, the brightness of the LEDs should be controlled by switches. There are dedicated pins in TIVA for generating PWM signals. These pins are used to the six which are either red, blue, green or a combination of these three.

  • Lab 4:
    In this lab, we interface the ADC, UART and also temperature sensor present in the TIVA launchpad. The tm4c123gh6pm has 2 ADCs with 12-bit resolution. The 2 ADCs can be operated independently. This lab is divided into two parts. In the first part, we have to interface the temperature sensor use ADC to convert this to digital value and display on the monitor using UART. The second part is simial to the first, but here we have to accept the reference temperature from the user. This value is sent to the microcontroller using UART.

  • LCD Interfacing:
    LCD interfacing in TIVA is similar to other microcontrollers. Here the LCD is operated in 4-bit mode. We have used pins B0, B1, and B2 for controlling RS, RW and En pins of the LCD respectively. Pins B4, B5, B6, and B7 of TIVA are connected to D4, D5, D6 and D7 pins of the LCD respectively. We have also created a library for interfacing the LCD.

Problems Faced:

  1. Even though we have used Complete Port B for interfacing the LCD, we cannot do the same for the final board due to a limited number of ADC pins available. So we decided to modify the library for the final board we have planned to use two different ports for the control and data pin.