The ADC display

Icône de l'outil pédagogique Presentation of the display

The ADC display contains two lines and 16 columns.

 

LCD after the power is switched ON LCD with the message “IUT en ligne”

 

It is controlled by a specialized micro-controller, the Hitachi HD44780. You won’t need to know its functioning. The communication between the micro-controller and the display is managed by a function library which simplifies its use. Nevertheless, if you wish to know more, you can refer to the HD44780 documentation


In order to use the ADC display library, you need first to put the following header files in the project folder :

iut_ADC.h

 

iut_ADC.c

 

and then to add them to the project.

After having included these library header files, you need to initialize the utilization of the library by calling the function ADC_init at the beginning of the program.

Example :

#include <18f4550.h>

#include "iut_ADC.h"

void main(void)

{

 

ADC_init();

 

...

 

}

Before every display instruction, you need to place the cursor in the desired position. Each character of the display (2 lines and 16 columns) is identified by its coordinates (lines, columns).

So, the character at the top-right of the display has coordinates (0,0) and the character at the bottom-left corresponds to (1,15).

 

In order to place the cursor, we use the function ADC_position.

For example, in order to position the cursor and start the displaying on the red cell, line 0, column 2, we will write :

ADC_position(0, 2);

In order to operate a display action, we need to use the function ADC_printf which is quite similar to the classical C language printf function.

In order to display the message IUT en ligne, we will write :

ADC_printf("IUT en ligne");

So, we will obtain on the screen :

Example of utilization of the ADC display :

Download the zip

This program detects any pushing on the buttons and displays a different message for each button.