Microcontroller AT89C2051 is a 20 pin version of the microcontroller AT89C51. Technical interface to microcontroller AT89C51 AT89C2051 and can be prepared very simply. SED 1200 LCD can be used to display 20 letters / numbers very good, quite adequate for displaying telephone numbers and other short message message. As the LCD display in general, SED1200 consists of two parts, namely the LCD panel which consist of many 'points' LCD and a microcontroller attached to the panel and serves to set 'the dots' LCD'd be the letters / numbers that read, as well as functions for communication between the LCD display with another microcontroller using the LCD display. Task LCD display microcontroller users only send ASCII codes to be displayed.
In the data sheet says SED1200 LCD display is compatible with 4-bit microprocessor and 8 bits, this is due to SED1200 only equipped with 4 channels of data (DB0 .. db3) is used to distribute the ASCII code or command to set its SED1200. In terms of ASCII codes and commands are all 8-bit codes, the codes were sent twice, which first shipped is 4 bits are weighted higher (most significant bit - D4 .. D7) and then the remaining 4 bits (D0. . D3). In addition to DB0 .. db3, SED1200 also equipped with CS, WR and A0 such as components that are compatible with the microprocessor, which is somewhat distorted signal CLK lajut which will be discussed further below.
A0 is used to distinguish data that is sent to the SED1200, if A0 = 0 data sent is a command to control the SED1200 and vice versa if A0 = 1 data sent is ASCII code you want to display.
The process of sending data to the SED1200 depicted in Figure 1 can be described as follows:
CS signal is used to activate the process of sending this data, during this process CS activated by voltage level '0 '.
The data will be sent to the SED1200 prepared at DB0 .. db3, as discussed above codes are sent to the SED1200 split into 2 time delivery, this is seen clearly in Figure 1 which describes the delivery of D4 .. D7 .. D0 and subsequent delivery D3.
After the data is ready, WR signal is used as a signal of 'commando' for the SED1200 to retrieve the data on DB0 .. db3. Data collection is exactly what happened at the time of WR changed from '0 'to '1'
Interface to AT89C2051
AT89C51 AT89C2051 is a simplified into a microcontroller which only the legs of 20, a simplification that resulted AT89C2051 not have the legs DB0 .. DB7, P2.0 .. P27, WR, RD and ALE and how many other feet, other than that the instruction MOVX @ DPTR, A can not be used, thus the circuit of Figure 2 at all can not be used for the AT89C2051, and instead made the circuit of Figure 3, in this series and WR DB0 .. db3 replaced with Port 1 and its function is simulated through the program.
SED1200 CLK foot foot connected with P1.7 AT89C2051, SED1200 pulses required to process the received data generated by the program, it is not necessary to provide a special circuit to generate clock.
Cuts Program 2 is a sub-routine to control the SED1200 are connected to the AT89C2051 as shown in Figure 3, before taking the second sub-routine, the data to be sent to the SED1200 had to be prepared in the accumulator A.
Differences sub-routine and KirimASCII KirimPerintah lies in the value A0 at the time of the sub-routine work. Sub-routine KirimPerintah work with A0 = '0 '(line 7), AT89C2051 received data sent as a command to set the SED1200 SED1200 work. Sub-routine KirimASCII work with A0 = '1 '(line 11), received the data sent AT89C2051 SED1200 as ASCII code to be displayed
Throughout the process activated by the CS data transmission voltage level '0 'is done in line 13 and in his re-nonaktip on line 19.
Data in the accumulator A is sent byte-by-half-byte half twice, first sent A4 .. A7 (lines 15 and 16) then sent A0 .. A3 (lines 17 and 18).
Given AT89C2051 no ALE signal instead row 22 to be raised 16 to 25 clock pulses required by the CLK SED1200. 16 pulse is generated after A.0 .. A.3 sent to the SED1200, out of the sub-routine is SED1200 is ready to receive data again.
Line 29 to 36 Discount Program 2 simulates line 21 Discount Program 1, in line 29 feet WR SED1200 in zero out, lines 30 to 35 send to DB0 A0 .. A3 .. db3 (P1.0 .. P1.3) without changing the other signals are already in Port 1. In line 36 WR returned to '1 ', then that information on DB0 .. db3 taken by SED1200.