Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Hellp to GDM1602A LCD !

Status
Not open for further replies.

Dinho

Newbie level 4
Joined
Apr 30, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,462
Hello people,

I start short time to student VHDL, and in this moment I can not solve one problem.

I want use the LCD GDM1602A is in UP3 Education Kit the Altera.

But I don’t know how I can do this. My Idea is use one signal (b) for came the other code to show your velour in LCD display, and use other signal (flag_lcd) to inform when have to exchange information on the display.

If anyone can help me thank you people.

I did this code but it does not work.

-- FILE NAME : Liquid Crystal Display
-- AUTHOR : Dinho.
-- ---------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Libraries
-------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
-------------------------------------------------------------------------------
-- Entity
-------------------------------------------------------------------------------
ENTITY tela IS
generic(
COUNT_LENG : integer := 8
);
PORT(
LCD_RS :eek:ut std_logic:='0'; -- Resgister select (Seleciona registrar)
LCD_RW :eek:ut std_logic:='0'; -- Read / Wirte
LCD_E :eek:ut std_logic:='0'; -- Enable signal
clk :in std_logic; -- Clk kit
SF_D :eek:ut std_logic_vector(COUNT_LENG-1 downto 0):= (others => '0'); -- informacao frequencia (quero)
b :in std_logic_vector(4 downto 0):= (others => '0'); -- valor do divisor de clk
flag_lcd :in std_logic:='0' -- controla a escrita lcd
);
END tela;
-------------------------------------------------------------------------------
-- Architecture
-------------------------------------------------------------------------------
ARCHITECTURE tela OF tela IS

-----------------------------------
-- Signal Declarations
-----------------------------------

type state_type is (stA, stB, stC, stD, stE);

signal state : state_type := stA;
signal clken : std_logic_vector(16 downto 0):= (others => '0');
signal reset : std_logic := '0';

signal enable : std_logic := '0';
signal counter : std_logic_vector(2 downto 0) := "000";

signal digit1 : std_logic_vector(7 downto 0):= (others => '0');
signal digit2 : std_logic_vector(7 downto 0):= (others => '0');

signal b01_sr : std_logic_vector(1 downto 0):= (others => '0'); --registrador de borda
signal clken_sr : std_logic_vector(1 downto 0):= (others => '0');

BEGIN
-----------------------------------
-- Asynchronous Assignments
-----------------------------------

digit2 <= "00110000" when b = "00000" else
"00110001" when b = "00001" else
"00110010" when b = "00010" else
"00110011" when b = "00011" else
"00110100" when b = "00100" else
"00110101" when b = "00101" else
"00110110" when b = "00110" else
"00110111" when b = "00111" else
"00111000" when b = "01000" else
"00111001" when b = "01001" else
"00110000" when b = "01010" else
"00110001" when b = "01011" else
"00110010" when b = "01100" else
"00110011" when b = "01101" else
"00110100" when b = "01110" else
"00110101" when b = "01111" else
"00110110" when b = "10000" else
"00110111" when b = "10001" else
"00111000" when b = "10010" else
"00111001" when b = "10011" else
"00111010";

digit1 <= "00110000" when b = "00000" else
"00110000" when b = "00001" else
"00110000" when b = "00010" else
"00110000" when b = "00011" else
"00110000" when b = "00100" else
"00110000" when b = "00101" else
"00110000" when b = "00110" else
"00110000" when b = "00111" else
"00110000" when b = "01000" else
"00110000" when b = "01001" else
"00110001" when b = "01010" else
"00110001" when b = "01011" else
"00110001" when b = "01100" else
"00110001" when b = "01101" else
"00110001" when b = "01110" else
"00110001" when b = "01111" else
"00110001" when b = "10000" else
"00110001" when b = "10001" else
"00110001" when b = "10010" else
"00110001" when b = "10011" else
"00111010";

SF_D <= "00000001" when counter = "000" else -- Clear
"00001000" when counter = "001" else -- Clear
"01000010" when counter = "010" else -- B
"00111101" when counter = "011" else -- =
digit1 when counter = "100" else -- Primeiro Digito
digit2; -- Segundo Digito


LCD_RS <= '0' when counter = "000" else
'0' when counter = "001" else
'1' when counter = "010" else
'1' when counter = "011" else
'1' when counter = "100" else
'1';

LCD_E <= enable;


-----------------------------------
-- Processes
-----------------------------------

PROCESS(clk)
BEGIN
IF(clk'EVENT AND clk = '1')THEN -- edge of the clock
clken <= clken +1;

clken_sr <= clken_sr(0) & clken(16);

if clken_sr = "01" then

b01_sr <= b01_sr(0) & flag_lcd ;

-- ESTADO A
if state = stA then
if b01_sr = "01" then
enable <= '0';
counter <= "000";
state <= stB;
else
state <= stA;
end if;
end if;

-- ESTADO B
if state = stB then
enable <= '0';
state <= stC;
end if;

-- ESTADO C
if state = stC then
enable <= '1';
state <= stD;
end if;

-- ESTADO D
if state = stD then
enable <= '0';
state <= stE;
end if;

-- ESTADO E
if state = stE then
counter <= counter + '1';
if counter = "101" then
state <= stA;
else
state <= stB;
end if;
end if;

end if;

end if;
end process;
end tela;



Thank you very much.
Best regards,
 

Alex02

Newbie level 6
Joined
Feb 18, 2011
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,368
Hi Dinho,

Did you make the simulation? If so you can compare your simulation with the timing diagram in the datasheet (GDM1602A), this way you may see what is wrong with your code.

Alex
 

Dinho

Newbie level 4
Joined
Apr 30, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,462
Hi Dinho,

Did you make the simulation? If so you can compare your simulation with the timing diagram in the datasheet (GDM1602A), this way you may see what is wrong with your code.

Alex

Hi Alex,
I did the simulation , but I don’t have know how I do change my code to comply with the rules of the display. I put in annex the rules of LCD (GDM1602A), my simulation and LCD Instruction Table. In the manual the UP3 Education Kit the Altera have this instruction for initialization LCD, but I do not know the meaning for example in POWER ON instruction says I have to write 0 0 0 0 0 0 1 D C B , what significance the letters D, C and B ?

LCD Initialization:

Normally LCD itself executies internal reset operations at the power up. But if the power suplly condition is not satisfied the internal reset circuit would not operate properly. It is better to initialization sequence by instruction.

Initializing by instruction:

POWER ON - 15msec Delay – Function Set – 4.1msec Delay – Function set – 100microsec – Function Set – 5msec Delay – Function Set – Display OFF – Display ON – Entry Mode set.
LCD on UP3 board is of N = 1 (1/16 Duty) and F = 0 (5X7 dots ). After this sequence LCD is ready for operation.


annex:




Thank you very much.
Best regards.

---------- Post added at 19:43 ---------- Previous post was at 19:35 ----------

I forgot,

My clk master is 14.318MHz.

Thank you very much.
Best regards.
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,221
Helped
1,147
Reputation
2,313
Reaction score
1,123
Trophy points
1,403
Location
Brazil
Activity points
53,681
...I have to write 0 0 0 0 0 0 1 D C B , what significance the letters D, C and B ?...

Dinho

Is that what are you looking for ?

D : Display ON/OFF Control Bit
When D = "High", entire display is turned on.
When D = "Low", display is turned off, but display data is remained in DDRAM.
C : Cursor ON/OFF Control Bit
When C = "High", cursor is turned on.
When C = "Low", cursor is disappeared in current display, but I/D register remains its data.
B : Cursor Blink ON/OFF Control Bit
When B = "High", cursor blink is on, that performs alternate between all the high data and display character at the
cursor position.
When B = "Low", blink is off.

+++
 

Alex02

Newbie level 6
Joined
Feb 18, 2011
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,368
Dinho,

You can do the initialization with andre_teprom's info, so you can also see the signals with the oscilloscope on the board.

BTW your simulation seems to be ok.

Alex
 

Dinho

Newbie level 4
Joined
Apr 30, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,462
Hello people,

Yes andre_teprom, thanks.

I will do the initialization’s LCD, tonight I will change the code and tomorrow I try test in the KIT. I will make test with the oscilloscope too.

I will post tonight news about my code.

Thank you very much.
Best regards.
 

Dinho

Newbie level 4
Joined
Apr 30, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,462
Hello people,
I change my code, I expect test in class today this code:

-- FILE NAME : Liquid Crystal Display
-- AUTHOR : Dinho

-------------------------------------------------------------------------------
-- Libraries
-------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
-------------------------------------------------------------------------------
-- Entity
-------------------------------------------------------------------------------
ENTITY tela IS
generic(
COUNT_LENG : integer := 8
);
PORT(
LCD_RS :eek:ut std_logic:='0'; -- Resgister select (Seleciona registrar)
LCD_RW :eek:ut std_logic:='0'; -- Read / Wirte
LCD_E :eek:ut std_logic:='0'; -- Enable signal
clk :in std_logic; -- Clk kit
SF_D :eek:ut std_logic_vector(COUNT_LENG-1 downto 0):= (others => '0'); -- informacao frequencia (quero)
b :in std_logic_vector(4 downto 0):= (others => '0'); -- valor do divisor de clk
flag_lcd :in std_logic:='0' -- controla a escrita lcd
);
END tela;
-------------------------------------------------------------------------------
-- Architecture
-------------------------------------------------------------------------------
ARCHITECTURE tela OF tela IS

-----------------------------------
-- Signal Declarations
-----------------------------------

type state_type is ( st0, stA, stB, stC, stD, stE, st1_in, st2_in, st3_in, st4_in, st5_in, st6_in );

signal state : state_type := st0;
signal clken : std_logic_vector(18 downto 0):= (others => '0');
signal reset : std_logic := '0';

signal enable : std_logic := '0';
signal counter : std_logic_vector(2 downto 0) := "000";

signal digit1 : std_logic_vector(7 downto 0):= (others => '0');
signal digit2 : std_logic_vector(7 downto 0):= (others => '0');

signal b01_sr : std_logic_vector(1 downto 0):= (others => '0'); --registrador de borda
signal clken_sr : std_logic_vector(1 downto 0):= (others => '0');

signal clken_in : std_logic_vector(1 downto 0):= (others => '0'); -- clk Initializing
signal ini : std_logic_vector(3 downto 0) := "1111"; -- Initializing by instruction

BEGIN
-----------------------------------
-- Asynchronous Assignments
-----------------------------------

digit2 <= "00110000" when b = "00000" else
"00110001" when b = "00001" else
"00110010" when b = "00010" else
"00110011" when b = "00011" else
"00110100" when b = "00100" else
"00110101" when b = "00101" else
"00110110" when b = "00110" else
"00110111" when b = "00111" else
"00111000" when b = "01000" else
"00111001" when b = "01001" else
"00110000" when b = "01010" else
"00110001" when b = "01011" else
"00110010" when b = "01100" else
"00110011" when b = "01101" else
"00110100" when b = "01110" else
"00110101" when b = "01111" else
"00110110" when b = "10000" else
"00110111" when b = "10001" else
"00111000" when b = "10010" else
"00111001" when b = "10011" else
"00111010";

digit1 <= "00110000" when b = "00000" else
"00110000" when b = "00001" else
"00110000" when b = "00010" else
"00110000" when b = "00011" else
"00110000" when b = "00100" else
"00110000" when b = "00101" else
"00110000" when b = "00110" else
"00110000" when b = "00111" else
"00110000" when b = "01000" else
"00110000" when b = "01001" else
"00110001" when b = "01010" else
"00110001" when b = "01011" else
"00110001" when b = "01100" else
"00110001" when b = "01101" else
"00110001" when b = "01110" else
"00110001" when b = "01111" else
"00110001" when b = "10000" else
"00110001" when b = "10001" else
"00110001" when b = "10010" else
"00110001" when b = "10011" else
"00111010";

SF_D <= "00001100" when ini = "0001" else -- POWER ON
"00110000" when ini = "0010" else -- data length (DL:8-Bit/4-bit)
"00101000" when ini = "0011" else -- numbers of display Line (N: =2-line/1-line)
"00100000" when ini = "0100" else -- Display font type (F: 5x11/5x8)
"00001000" when ini = "0101" else -- POWER OFF
"00001100" when ini = "0110" else -- POWER ON
"00101000" when ini = "0111" else -- numbers of display Line (N: =2-line/1-line)
"00100000" when ini = "1000" else -- Display font type (F: 5x11/5x8)
"00000001" when counter = "000" else -- Clear
"01000010" when counter = "001" else -- B
"00111101" when counter = "010" else -- =
digit1 when counter = "011" else -- Primeiro Digito
digit2; -- Segundo Digito


LCD_RS <= '0' when ini = "0001" else
'0' when ini = "0010" else
'0' when ini = "0011" else
'0' when ini = "0100" else
'0' when ini = "0101" else
'0' when ini = "0110" else
'0' when ini = "0111" else
'0' when ini = "1000" else
'0' when counter = "000" else
'1' when counter = "001" else
'1' when counter = "010" else
'1' when counter = "011" else
'1';

LCD_E <= enable;


-----------------------------------
-- Processes
-----------------------------------

PROCESS(clk)

BEGIN
IF(clk'EVENT AND clk = '1')THEN -- edge of the clock
clken <= clken +1;

clken_sr <= clken_sr(0) & clken(16);
clken_in <= clken_in(0) & clken(18);

if clken_in = "01" then

if state = st0 then
state <= st1_in;
end if;
-- Estado Initializing 1
if state = st1_in then
enable <= '0';
ini <= "0000";
state <= st2_in;
end if;

-- Estado Initializing 2
if state = st2_in then
enable <= '0';
state <= st3_in;
end if;

-- Estado Initializing 4
if state = st3_in then
enable <= '1';
state <= st4_in;
end if;

-- Estado Initializing 5
if state = st4_in then
enable <= '0';
state <= st5_in;
end if;

-- Estado Initializing 6
if state = st4_in then
ini <= ini + '1';
if ini = "1000" then
state <= stA;
else
state <= st2_in;
end if;
end if;
end if;

if clken_sr = "01" then

b01_sr <= b01_sr(0) & flag_lcd;

-- ESTADO A

if state = stA then
if b01_sr = "01" then
enable <= '0';
counter <= "000";
state <= stB;
else
state <= stA;
end if;
end if;

-- ESTADO B
if state = stB then
enable <= '0';
state <= stC;
end if;

-- ESTADO C
if state = stC then
enable <= '1';
state <= stD;
end if;

-- ESTADO D
if state = stD then
enable <= '0';
state <= stE;
end if;

-- ESTADO E
if state = stE then
counter <= counter + '1';
if counter = "100" then
state <= stA;
else
state <= stB;
end if;
end if;
end if;
end if;
END PROCESS;
end tela;
My new simulation so be :



I tried respect the instruction about Initializing the LCD.

I need change something in code?

Thank you very much.
Best regards.
 

Dinho

Newbie level 4
Joined
Apr 30, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,462
Good night People,

I just arrived home from college, I was testing using this code:



Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
-- FILE NAME    : Liquid Crystal Display
-- AUTHOR       : Dinho
-------------------------------------------------------------------------------
-- Libraries
-------------------------------------------------------------------------------
library ieee;
    use ieee.std_logic_1164.all;
    use ieee.std_logic_arith.all;
    use ieee.std_logic_unsigned.all;
-------------------------------------------------------------------------------
-- Entity
-------------------------------------------------------------------------------
ENTITY tela IS
generic(
    COUNT_LENG  : integer   := 8
);
PORT(
            LCD_RS      :out    std_logic:='0';                                             -- Resgister select (Seleciona registrar)
            LCD_RW      :out    std_logic:='0';                                             -- Read / Wirte
            LCD_E       :out    std_logic:='0';                                             -- Enable signal
            clk         :in     std_logic;                                                  -- Clk kit
            SF_D        :out    std_logic_vector(COUNT_LENG-1 downto 0):= (others => '0');  -- informacao frequencia (quero)
            b           :in     std_logic_vector(4 downto 0):= (others => '0');             -- valor do divisor de clk
            flag_lcd    :in     std_logic:='0'                                              -- controla a escrita lcd
);
END tela;
-------------------------------------------------------------------------------
-- Architecture
-------------------------------------------------------------------------------
ARCHITECTURE tela OF tela IS
 
    -----------------------------------
    -- Signal Declarations
    -----------------------------------
 
    type state_type is ( st0, stA, stB, stC, stD, stE, st1_in, st2_in, st3_in, st4_in, st5_in, st6_in );
 
    signal state        : state_type := st0;
    signal clken        : std_logic_vector(18 downto 0):= (others => '0');
    signal reset        : std_logic := '0';
 
    signal enable       : std_logic := '0';
    signal counter      : std_logic_vector(2 downto 0) := "000";
 
    signal digit1       : std_logic_vector(7 downto 0):= (others => '0');
    signal digit2       : std_logic_vector(7 downto 0):= (others => '0');
 
    signal b01_sr       : std_logic_vector(1 downto 0):= (others => '0');               --registrador de borda
    signal clken_sr     : std_logic_vector(1 downto 0):= (others => '0');
    signal start        : std_logic := '0';                                             --inicia escrita display
 
    signal clken_in     : std_logic_vector(1 downto 0):= (others => '0');               -- clk Initializing
    signal ini          : std_logic_vector(3 downto 0) := "1111";                       -- Initializing by instruction
 
BEGIN
    -----------------------------------
    -- Asynchronous Assignments
    -----------------------------------
 
    digit2  <= "00110000" when b = "00000" else
               "00110001" when b = "00001" else
               "00110010" when b = "00010" else
               "00110011" when b = "00011" else
               "00110100" when b = "00100" else
               "00110101" when b = "00101" else
               "00110110" when b = "00110" else
               "00110111" when b = "00111" else
               "00111000" when b = "01000" else
               "00111001" when b = "01001" else
               "00110000" when b = "01010" else
               "00110001" when b = "01011" else
               "00110010" when b = "01100" else
               "00110011" when b = "01101" else
               "00110100" when b = "01110" else
               "00110101" when b = "01111" else
               "00110110" when b = "10000" else
               "00110111" when b = "10001" else
               "00111000" when b = "10010" else
               "00111001" when b = "10011" else
               "00111010";
 
    digit1  <= "00110000" when b = "00000" else
               "00110000" when b = "00001" else
               "00110000" when b = "00010" else
               "00110000" when b = "00011" else
               "00110000" when b = "00100" else
               "00110000" when b = "00101" else
               "00110000" when b = "00110" else
               "00110000" when b = "00111" else
               "00110000" when b = "01000" else
               "00110000" when b = "01001" else
               "00110001" when b = "01010" else
               "00110001" when b = "01011" else
               "00110001" when b = "01100" else
               "00110001" when b = "01101" else
               "00110001" when b = "01110" else
               "00110001" when b = "01111" else
               "00110001" when b = "10000" else
               "00110001" when b = "10001" else
               "00110001" when b = "10010" else
               "00110001" when b = "10011" else
               "00111010";
 
    SF_D <= "00001100"  when ini = "0001" else      -- POWER ON
            "00110000"  when ini = "0010" else      -- data length (DL:8-Bit/4-bit)
            "00101000"  when ini = "0011" else      -- numbers of display Line (N: =2-line/1-line)
            "00100000"  when ini = "0100" else      -- Display font type (F: 5x11/5x8)
            "00001000"  when ini = "0101" else      -- POWER OFF
            "00001100"  when ini = "0110" else      -- POWER ON
            "00101000"  when ini = "0111" else      -- numbers of display Line (N: =2-line/1-line)
            "00100000"  when ini = "1000" else      -- Display font type (F: 5x11/5x8)
            "00000001"  when counter = "000" else   -- Clear
            "01000010"  when counter = "001" else   -- B
            "00111101"  when counter = "010" else   -- =
            digit1      when counter = "011" else   -- Primeiro Digito
            digit2;                                 -- Segundo Digito
 
 
    LCD_RS   <= '0' when ini = "0001" else
                '0' when ini = "0010" else
                '0' when ini = "0011" else
                '0' when ini = "0100" else
                '0' when ini = "0101" else
                '0' when ini = "0110" else
                '0' when ini = "0111" else
                '0' when ini = "1000" else
                '0' when counter = "000" else
                '1' when counter = "001" else
                '1' when counter = "010" else
                '1' when counter = "011" else
                '1';
 
    LCD_E <= enable;
 
 
    -----------------------------------
    -- Processes
    -----------------------------------
 
PROCESS(clk)
 
BEGIN
    IF(clk'EVENT AND clk = '1')THEN                                 -- edge of the clock
        clken <= clken +1;
 
        clken_sr    <= clken_sr(0) & clken(16);
        clken_in    <= clken_in(0) & clken(18);
 
        if clken_in = "01" then
 
            if state = st0 then
                    state <= st1_in;
            end if;
            -- Estado Initializing 1
            if state = st1_in then
                enable <= '0';
                ini <= "0000";
                state <= st2_in;
            end if;
 
            -- Estado Initializing 2
            if state = st2_in then
                enable <= '0';
                state <= st3_in;
            end if;
        
            -- Estado Initializing 4
            if state = st3_in then
                enable <= '1';
                state <= st4_in;
            end if;
        
            -- Estado Initializing 5
            if state = st4_in then
                enable <= '0';
                state <= st5_in;
            end if;
        
            -- Estado Initializing 6
            if state = st4_in then
                ini <= ini + '1';
                if ini = "1000" then
                    state <= stA;
                else
                    state <= st2_in;
                end if;
            end if;
        end if;
 
        if clken_sr = "01" then
 
            b01_sr  <= b01_sr(0) & flag_lcd;
 
            if b01_sr = "01" then
                start <= '1';
            end if;
 
            -- ESTADO A
 
                if state = stA then
                    if start = '1' then
                        enable <= '0';
                        start <= '0';
                        counter <= "000";
                        state <= stB;
 
                    else
                        state <= stA;
                    end if;
                end if;
 
                -- ESTADO B
                if state = stB then
                    enable <= '0';
                    state <= stC;
                end if;
 
                -- ESTADO C
                if state = stC then
                    enable <= '1';
                    state <= stD;
                end if;
 
                -- ESTADO D
                if state = stD then
                    enable <= '0';
                    state <= stE;
                end if;
 
                -- ESTADO E
                if state = stE then
                    counter <= counter + '1';
                    if counter = "100" then
                        state <= stA;
                    else
                        state <= stB;
                    end if;
                end if;
        end if;
    end if;
END PROCESS;
end tela;



When I putted the code in FPGA display of kit happened this:




Why appeared “C3” in display? And even though I pressed been the button to change the data in the display nothing happened. It appeared that the LCD display depends on where you looked was still black.

I didn’t understand why my code not working:-(, I make LCD startup, who the manual says and respect the write mode timing diagram to LCD, at least I think so.:-?
Alright I have not had time to make tests using o oscilloscope on the board, I cannot confirm that the board is 100%ok.

This is my test bench:



Is there anybody who has a VHDL code for this LCD to work or get to know what's wrong in my code?:?:?


Thank you very much.:grin:
Best regards.
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,221
Helped
1,147
Reputation
2,313
Reaction score
1,123
Trophy points
1,403
Location
Brazil
Activity points
53,681
hi Dinho

I must advice you that when we take a complete code into the project, there is a big possibility to don´t work straight away.
Despite you had simulated waveform behaviours, seems you did not really integrated that with an virtual LCD component.

Due LCD modules are reasonable complex systems, some little details may block the proper working.
For while, I can sugest - like I commonly perform - try others implementations and adjust it to your need.

See an example taken from this same forum ( there are others ) :

https://www.edaboard.com/thread147798.html

+++
 

Dinho

Newbie level 4
Joined
Apr 30, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,462
Good morning andre_teprom,

I’m sorry to write so later but I was very busy. Man I will read this codes and make other tests during this week and the next , after this or during this process I post my news.

Thank you very much.:grin:
Best regards.
 

yadog

Member level 1
Joined
Mar 12, 2006
Messages
33
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,427
maybe you can refer to a website fpga4fun,there is a LCD project
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top