Design of Display Unit and EEPROM interfacing:
here we used 16x2 LCD panel as a display unit. The processed data fromt microcontroller fed from Port-1. The read right pic of LCD connected to the P3.1 and P3.3, and the LCD elable pic connected to the P3.7. So when we try to show the data to the LCD the port-3 use as a out put. Pin-15 use to control the brightness. Its 1 and 16 pin connected to the ground and Vcc through a voltage devider connection to control the contrast.
EEPROM and 89C51 use for speedometer:
The readings of the distance traveled can be saved in an external serial EEPROM. Here, a 24C02serial EEPROM based on PhilipsI2C protocol is used.
I2C bus protocol. The I2C bus consists of two active wires and a ground connection. The active wires, serial data line (SDA) and serial clock line(SCL) are bidirectional. Every device hooked up to the bus has its own unique address, no matter whether it is an MCU,LCD driver, memory or ASIC. Each of these chips can act as a receiver and/or transmitter, depending on the functionality. Obviously, an LCD driver is only a receiver, while a memory or I/O chip can be both transmitter and receiver. The I2C bus is a multi-master bus. This means that more than one IC capable of initiating a data transfer can be connected to it.
The I2Cprotocolspecification states that the IC that initiates a data transfer on the bus is considered the bus master. Bus masters are generally microcontrollers. Consequently, all the other ICs are regarded as bus slaves at that instant. Let’s assume that the MCU wants In our project, the microcontroller is the master and the serial EEPROM is the slave. The readings are periodically stored in the EEPROM and the previous reading is retrieved from the EEPROM each time the bike is started. Serial memory devices offer significant advantages over parallel devices in applications where lower data transfer rates are acceptable. In addition to requiring less board space, serial devices allow microcontroller I/O pins to be conserved. This is especially valuable when adding external memory to low-pin count microcontrollers such as the Atmel AT89C2051 and AT89C4051.
PIN DIAGRAM OF 24C02 SERIAL EEPROM
INTERFACING OF 24C02 SERIAL EEPROM WITH THE MICROCONTROLLER