



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




I/O Interfacing of a Keypad and LCD Display Embedded Microprocessor Design Laboratory Exercise Two
This laboratory exercise will give the student experience interfacing basic I/O devices to the HCS12 microcontroller mounted on the CML12S-DP256 development board. Refer to the Axiom CML12S-DP256 Development Board , the I/O Port Integration and the SPI Serial Bus sections of the on- line documentation. You will need to obtain information from the on- line documentation to complete this laboratory exercise. This will give you experience reading and interpreting schematics, application notes, and data sheets. A block diagram of the subsections that will be configured in this exercise is shown in Figures 1 and 2. Laboratory exercise one will be divided into two subsections:
Figure 1 Block Diagram
Keypad Matrix 4 Rows and 4 Columns No External Resistors
Serial to Parallel Conversion Circuit PTH
SPI-
LCD Display 4 rows X 80 Characters Parallel Interface
Figure 2 Port Schematic
The DCM-20434 LCD display is interfaced to the MCU’s SPI-0 serial port through a serial to parallel converter as shown in Figure 3. Figure 3 shows the interface connections between the SPI-0 serial port, the 74HC595 (serial to parallel converter) device, and the LCD-PORT. The DCM-20434 LCD should be configured in four bit mode as the schematic shows DB3 through DB0 connected to ground.
Figure 3 Serial to Parallel Interface
To interface the LCD display to the HCS12 MCU you must understand how the physical layer interface circuit is constructed (shown in Schematics for Development Board ), how to configure and use the SPI serial port ( SPI Serial Bus Document), and how to configure and use the LCD display ( DMC-20434 LCD Specifications ).
Figure 4 Four Bit Initialization
Figure 5 LCD Commands