Sie sind auf Seite 1von 3

System VHDL Architecture

Reset

CLOCK_50

LCD_BLON
LCD_DATA

LCD_EN

LCD_WR

LCD_RS
LCD_RS 0
LCD_RW 1
RESET1

DROP_LCD_E Falling edge of LCD_EN


writes instruction to LCD
controller.
HOLD
“00111000”
Write instruction to set 8 bits,
RESET2 2 line, 5 x 8 dot operation.

LCD_RS 0 RS RW
LCD_RW 0
RESET3
0 Instruction register (for write), Write
LCD_RS 0 address counter (for read)
LCD_RW 0
FUNC_SET 1 Data register Read

LCD_RS 0
LCD_RW 0
DISPLAY_OFF “00001000”

LCD_RS 0
LCD_RW 0 DISPLAY_CLEAR “00000001”

LCD_RS 0
“00001100”
LCD_RW 0 DISPLAY_ON

LCD_RS 0
LCD_RW 0
MODE_SET “00000110”
Auto increment address
and move cursor to the
right.
LCD_display_string <= (
-- Line 1
X"0" & S0,X"2E",X"0" & S1,X"0" & S2,X"20",X"56",
X"20",X"20",X"20",X"20",X"20",X"20",X"20",X"20",X"20",X"20",
-- Line 2
X"55",X"4E",X"54",X"20",X"45",X"4E",X"47",X"52",
X"20",X"20",X"20",X"20",X"20",X"20",X"20",X"20");

Next_Char <= LCD_display_string(CONV_INTEGER(CHAR_COUNT));

WHEN Print_String =>


state <= DROP_LCD_E;
LCD_EN <= '1';
LCD_RS <= '1';
LCD_RW_INT <= '0';
IF Next_Char(7 DOWNTO 4) /= X"0"
THEN
RS 1
RW 0
Print_String DATA_BUS_VALUE <= Next_Char;

RS 0 “11000000”
RW 0
LINE2 Set write address to line 2,
character 1
RS 0
RW 0
RETURN_HOME IF (CHAR_COUNT < 31) AND (Next_Char /= X"FE") THEN
CHAR_COUNT <= CHAR_COUNT +1;
ELSE
CHAR_COUNT <= "00000";
END IF;
“10000000”
Set write address to line 1, IF CHAR_COUNT = 15 THEN next_command <= line2;
character 1
ELSIF (CHAR_COUNT = 31) OR (Next_Char = X"FE") THEN
next_command <= return_home;
ELSE next_command <= Print_String; END IF;

Das könnte Ihnen auch gefallen