Control Box (part 6) LCD Screen

Hitachi 44780 LCD

The control box for our ROV uses a 20 character by 4 line (20x4) Hitachi 44780 LCD display. At the time of writing this the LCD screen displays a notice on startup alerting to the initialization of the ESCs on-board the ROV as well as telling him/her to ensure that the control box is powered on prior to the ROV. Once the ESCs have been initialized, the LCD display is cleared of these messages and the temperature and pressure headers are displayed on the first and second rows (awaiting temperature/pressure data to be displayed.)

Upon the triggering of UART receive interrupt, the ISR checks the contents of the 8-bit UART packet. The code for a temperature reading is decimal number 3. If this value is found in the UART packet, the ISR loads the number 3 into memory location named "sensorState."

code screen shot

code screen shot

Doing so allows the program to know that the next packet received will contain the actual temperature reading from the ROV. Upn the next UART reception, the packet contents are checked again and when the value of the "sensorState" variable is checked and found to be '3', the ISR then jumps to the "readTemp section where the packet contents are loaded into the "Temperature" memory location and then displayed on the LCD.

code screen shot

code screen shot

The temperature is displayed on the LCD via the "dispTemp" subroutine found in the LCD.asm file where a lookup table is used with some basic math to parse out the digits. Basic communication and character display between the MCU and the Hitachi 44780 is covered in the LCD interfacing tutorial, so I will refer you to that page regarding the details. You will also notice that after the temperature is diplayed on the LCD, the variable "sensorState" is cleared so that the whole process can be repeated when the next temperature reading is dent from the ROV.

Next we will take a look at the circuit and code on board the ROV itself

Next up, ROV Circuit (part 1)