Integration of Peripheral Interface Controller with Liquid Crystal Display based Mini- Oscilloscope

DOI : 10.17577/IJERTCONV3IS19121

Download Full-Text PDF Cite this Publication

Text Only Version

Integration of Peripheral Interface Controller with Liquid Crystal Display based Mini- Oscilloscope

Ashmi G V

Centre for Development of Advanced Computing Thiruvananthapuram

Hema Ramachandran, Meena M S

LAMP Group Raman Research Institute

Bangalore

AbstractImplementation of a Liquid Crystal Display (LCD) module using Peripheral Interface Controller (PIC) 18F452 for displaying waveforms in the Graphic display is presented. This module, which works as a Mini-Oscilloscope is used for displaying signals of interest. The Mini-Oscilloscope is built using the microcontroller and a Graphical Liquid Crystal Display. It displays two channels. The two channels of the graphic display are used for this. This is intended to be used to integrate with the laser cooling experiments, which will minimize the cost as well as reduce the maintenance, mainly for industrial applications.

Index Terms Graphical liquid crystal display, peripheral interface controller, oscilloscope, microcontroller.

  1. INTRODUCTION

    The Peripheral Interface Controller (PIC) 18F452 based microcontroller and graphics display is designed for displaying the waveforms in the Liquid Crystal Display module. The advantage of using microcontroller is that to gain better stability and simple circuitry. For laser cooling experiments, there is a need for stabilizing the lasers. The process used for this is an active feedback using Doppler-free saturation absorption spectroscopy [1]. For this purpose the saturation absorption signals are displayed continuously on an oscilloscope. As a typical experiment has at least four such frequency stabilized lasers, one requires four oscilloscopes for working as a stand alone system. Here by the implementation of a Graphical LCD as an Oscilloscope eliminates the need of a commercial oscilloscope. So this act as a two channel oscilloscope and is in need for industrial applications.

  2. HARDWARE IMPLEMENTATION

    The hardware for building graphic liquid crystal display module consists of a number of individual components, which are linked together to produce the overall device. This module can be used as a Mini-Oscilloscope for displaying the signals. By doing so, the need for commercial oscilloscope can be eliminated.

    The main hardware units such as the Processing unit as Microcontroller PIC 18F452, Display unit as Graphical LCD module with in-built T6963C controller and PIC

    IC-programmer. Figure 1 shows the block diagram of the hardware units used for LCD module.

    Fig. 1. Block diagram of the hardware units used for LCD Module

    A microcontroller includes: CPU (Central Processing Unit), RAM (Random Access memory), EPROM (Erasable Programmable Read Only Memory) /PROM/ ROM, I/O (input/output), serial and parallel timers, interrupt controller. The Peripheral Interface Controller is a microcontroller designed for fast input/output control using small instruction set. It is low-cost and can be reprogrammed thousand times using its FLASH EEPROM capability.

    By using PIC 18F452, I can display two channels on the display, because this PIC has more banks of data memory. This amount of memory is large enough for displaying two channels.

    1. Graphic LCD And The Controller

      The display unit used is a Graphic LCD module has a resolution of 240×128 pixels with inbuilt T6963C controller, supplied by Oriole Electronics. These are capable of displaying both text and graphics. The graphical LCDs are defined by the number of dots or pixels. They are most popular in higher end industrial equipment, displaying of schedules, lift indicators, medical equipment such as imaging, patient monitors and X-ray displays etc.

      The T6963C is a graphics controller chip, designed to control small to medium sized Graphic liquid crystal displays. This has 8 bit parallel data bus and control lines for reading or writing through an MPU interface. It has 128-word character generator ROM which can control an external display RAM of 64Kbytes [2]. It generates necessary timing and data signals and has the capability of displaying both text and graphics.

      To communicate between the PIC & T6963C we need to write some software codes in the microcontroller. T6963C cannot operate without a controlling processor. Here for controlling the T6963C I am using PIC18F452. Every operation and setup parameters must be send by the PIC, the T6963C will give the data to the display. Figure 2 shows the block diagram of graphic LCD module.

      Fig. 2. Block diagram of Graphic LCD module

      TABLE I. Pins for memory communication

      Pins

      Details

      d0-d7 (pins 22-26 and 28-

      30)

      data I/O pins for VRAM

      ad0-ad15 (pins 33-48)

      address lines for VRAM

      R/W (pin 31)

      read/write signal for VRAM

      ce (pin 32)

      chip enable pin for VRAM of any address

      ce0 (pin 49)

      chip enable pin for VRAM in the address range 0000h to 07FFh

      ce1 (pin 50)

      chip enable pin for VRAM in the address range 0800h to 0FFFh

      Pins

      Details

      D0-D7 ((pins 10-17)

      data I/O pins for communication between MPU and T6963C

      WR (pin18)

      data Write

      RD (pin 19)

      data Read

      CE (pin 20)

      chip Enable

      C/D (pin 21)

      command/ write selection

      Pins

      Details

      D0-D7 ((pins 10-17)

      data I/O pins for communication between MPU and T6963C

      WR (pin18)

      data Write

      RD (pin 19)

      data Read

      CE (pin 20)

      chip Enable

      C/D (pin 21)

      command/ write selection

      TABLE II. Pins for Microprocessor unit communication

      The T6963C differs from most other LCD controllers in its use of the display RAM. A fixed area of memory is normally allocated for text, graphics and the external character generator, but with the T6963C the size for each area can be set by software commands. This means that the area for text, graphics and external character generator can be freely allocated within the external memory, up to 64 Kbyte. With Dual Scan displays, LCD1 (top half) is allocated in the first half of the VRAM and LCD2 (bottom half) is allocated in the second half of the VRAM, but both areas must be allocated identically with respect to text, graphics and the external character generator area [3]. The address line ad15 is used to switch between the memory for the first screen and the second screen.

    2. Programming the PIC

    The ability to communicate is of great importance in any field. The language that man and microcontroller used to communicate is called assembly language. Programs that written in assembly language must be converted into zeros and ones, in order for a microcontroller can understand it. Assembler is a program in the computer which translates the assembly language into zeros and ones, the machine language. Figure 3 shows the process of communication between man and a computer.

    The programming of PIC is done on the platform of MikroElektronika developed MikroC software. MikroC is a windows progrm package that makes writing and developing the program easier.

    PIC Integrated Chip (IC) Programmer is a programmer that enables to program the software into PIC MCU device. PIC IC Programmer system components include: RS-232 interface to connect to any standard PC serial port, 9V power supply.

    Fig. 3. Schematic of communication between man and microcontroller

  3. SOFTWARE IMPLEMENTATION OF LCD MODULE The Software used for programming the PIC 18F452

    microcontroller using T6963C graphic display is MikroC of MikroElektronika. It is a powerful development tool for PIC micros. MikroC for PIC is a powerful tool for programming PIC microcontrollers in C. It is designed to allow the programmer to the least labor-intensive solutions to create applications for embedded systems. PIC and C are well suited

    to each other. It provides a library for working with graphic LCDs based on TOSHIBA T6963C controller. The Toshiba T6963C is a very popular LCD controller for the use in small graphics modules. It is capable of controlling displays with a resolution up to 240×128. Because of its low power and small outline it is most suitable for mobile applications such as mobile measurement equipment [4]. Although small, this controller has a capability of displaying and merging text and graphics and it manages all the interfacing signals to the displays row and column drivers.

  4. PROGRAM LOGIC AND DESIGN OF LCD MODULE The Graphical LCD Module is used as a Mini-Oscilloscope.

    The interfacing module used for converting the Graphical LCD to a Mini-Oscilloscope is PIC microcontroller. The main constraint is to develop the control program for achieving the communication between PIC and LCD display. A number of control signals are required to establish the communication between T6963C and PIC. The main control signals are CE, RD, WR, RST, C/D, all these signals are enabled in the low voltage level. The controls are provided with the help of PORT D of the PIC. Transferring the data between the LCD and the MPU, PORT B of the PIC is used. Using the PORT A, the analog signals are given to the MPU. RA0 and RA1 bits of the port A are used for this purpose. RA2 and RA3 are used as the reference signals. During the initialization part the PORT A is defined as input port and PORT C and PORT D are defined as output.

    In order to display the analog signals on the LCD screen the A/D converter in the PIC gives the digital value of the input analog signal. The A/D converter in the PIC has 10 bit resolution. But the user defined registers in the PIC has 8 bit resolution. The LCD screen here using is of 240×128 pixel resolution. For displaying one channel, one half of the LCD portion is used, so the resolution for one channel is only 240x 64. To cop up with this, only 6 bit resolution of the A/D value is used. The Graphic cell in the LCD screen is of 1×8 size. So in order to display the signal we should know which bit of the graphic cell is affected by the digital value. For this purpose a user defined register with a defined value is used. The value initially stored in the register is 80H and then it is right rotated through carry. The ADC value is compared with 80H it determines whether the first MSB is affected or not. If not the register is rotated and the value stored is 40H, it check the dependency of the second MSB and so on. After completing one graphic cell operation, the data is given to the display. In this way process is repeated for the entire column. The subroutine SAMPLE is used for getting the ADC values. The subroutine SUB is the one in which all the scaling and processing operations are held. The subroutine SETMEM makes the data suitable for display. The subroutine SHOW determines the position of the data on the LCD screen and data is displayed at that particular place. This is the procedure for displaying one channel on the LCD. The procedure is repeated for second channel [5]. Figure 4 shows the circuit diagram of graphic LCD module using PIC 18F452.

    Fig. 4. Circuit diagram of Graphic LCD Module using PIC 18F452

  5. DISPLAYING THE WAVEFORMS ON THE LCD SCREEN

    The PIC first acquires the analog signal, after performing ADC the corresponding digital values are stored in the data memory. While displaying, the data from a bank is first displayed and simultaneously the displayed data is also erased from the memory, then the same procedure is repeated for the data in other banks. Only after the data in all banks are displayed the PIC repeats procedure again, which makes to function as an oscilloscope.

    The microcontrollers currently available are not fast enough to simulate in software, test equipment such as a 50MHz oscilloscope. However, they are capable of easily simulating lower speed devices, such as volt-meters, and low speed (perhaps around 1-5MHz) sampling devices. These types of applications still have a very wide use, and thus any device based on current micro controller technology could provide a solution with real benefits [6]. The micro controller based Graphic LCD Module is integrated to the external cavity diode laser.

    Fig. 6. Liquid crystal display module

  6. RESULTS

    By programming the LCD module using PIC 18F452 microcontroller, I am able to display two channel waveforms with low frequencies upto 8Hz on the LCD. This is very useful in monitoring the signals from experiments with low frequencies. So the LCD module can be used as a mini- oscilloscope for displaying waveforms with different amplitudes and frequencies. Figure 5 shows the internal view of the LCD module using PIC 18F452 microcontroller. Figure 6 shows the liquid crystal display module. Figure 7 shows the two channel waveform with triangular and square waveforms. Figure 8 shows the two channel waveform with sine and square waveforms.

    Fig. 5. Internal view of the LCD module

    Fig. 7. Two channel waveform showing triangular and square waveforms

    Fig. 8. Two channel waveform showing sine and square waveforms

  7. CONCLUSION

Programmed and tested a minioscilloscope for integrating with the External Cavity Diode Laser and the desired results are obtained. In the LCD Module, PIC18F452 based microcontroller is used as the processing unit and Graphical LCD with T6963C controller as the display panel. The control program is written using mikroC software. By programming the LCD module, I am able to display two channel waveforms on the LCD. By monitoring channel-1, the current and piezo can be adjusted to get the correct wavelength or frequency of the laser. Channel-2 can then help in locking the laser and monitoring the locking efficiency. Thus this inbuilt display makes the laser control unit quite compact and eliminates need for an Oscilloscope.

REFERENCES

  1. S. L. Gilbert and C. E. Wieman, "Laser Cooling and Trapping for the Masses," Optics and Photonics News, 4, 8-14 (1993).

  2. G. R. Chaji and A. Nathan, Parallel addressing scheme for voltage programmed active-Matrix OLED displays, IEEE Trans. Electron Devices, vol. 54, no. 5, pp. 10951100, May 2007.

  3. P. M. Alt and P. Pleshko, Scanning limitations of liquid crystal displays, IEEE Trans. Electron Devices, vol. ED-21, pp. 146155, 1974.

  4. J. Millman and A. Grabel, Microelectronics, Tata Mc Graw Hill, New Delhi, 2nd Edn. 1999.

  5. PIC Microcontrollers, Programming in C, by Milan Verle.

  6. Miller, Rex. Electronics The Easy Way, 4th ed. Barron's Educational Series, 2002 p. 88-89.

Leave a Reply