Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Looking for VHDL code for transferring data from CPLD to LCD

Status
Not open for further replies.

htrs

Newbie level 6
Joined
Jul 29, 2005
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,387
CPLD

Hello everyone...
I am working on CPLD XC9572-PC84.
I want to interface a 16 x 2 LCD display .
Anyone please send me some VHDL code for the transfer of data from CPLD to LCD display.
Thanks in advance.......
 

CPLD

Hi, htrs,
Why don't search your topic with google? Maybe you can find the right answer.
 

Re: CPLD

hi..
i have done this experiment before
wat you need to do is reffer to the toolkits usermanual...
for each pin outs & its requirement..
the source code which include example in the user manual..
it is not hard..
it just take time..
best regards.
 

Re: CPLD

Hi,

You need to implement some basic LCD access protocols in hardware. It is not easy and flexible solution. I think that this job is for some uC.

You don't need high speeds to access LCD so use additional uC instead cPLD. Read data form CPLD with uC and write to LCD in approprated format.
 

Re: CPLD

this code is Example to show "ASTRON LOGIC R&D" on LCD16*2

*remark clock in 9.600 MHz

Code:
library ieee;
use ieee.std_logic_1164.all;
entity LCD_Function is
port( clk : in std_logic;
e : out std_logic;
r_w : out std_logic;
rs : out std_logic;
data : out std_logic_vector(7 downto 0)
);
end LCD_Function;
architecture a of LCD_Function is
begin
process(clk)
variable count : integer range 0 to 31 := 0;
variable initial : std_logic := '0';
variable t_rs : std_logic := '0';
variable t_r_w : std_logic := '0';
variable t_e : std_logic := '0';
variable t_data : std_logic_vector(7 downto 0) := "00000000";
begin
if (clk'EVENT) and (clk = '1') then
if initial = '0' then
count:=count+1;
if count < 23 then initial := '0'; else initial := '1'; end if; 
else
initial := '1';
end if; 
end if;
case count is
--INITIAL SETTING 
when 0 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '0';t_data := "00000000"; 
when 1 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '1';t_data := "00000000"; 
when 2 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '0';t_data := "00111000"; 
when 3 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '1';t_data := "00111000"; 
when 4 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '0';t_data := "00000110"; 
when 5 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '1';t_data := "00000110"; 
when 6 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '0';t_data := "00001111"; 
when 7 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '1';t_data := "00001111"; 
when 8 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '0';t_data := "00010100"; 
when 9 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '1';t_data := "00010100"; 
when 10 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '0';t_data := "00000001"; 
when 11 => 
initial := '0';t_rs := '0';t_r_w := '0';t_e := '1';t_data := "00000001"; 

--SEND Data TO DISPLAY "ASTRON LOGIC R&D"
when 12 => --A
initial := '0';t_rs := '1';t_r_w := '0';t_e := '0';t_data := "01000001";
when 13 => --Enable A
initial := '0';t_rs := '1';t_r_w := '0';t_e := '1';t_data := "01000001";
when 14 => --S
initial := '0';t_rs := '1';t_r_w := '0';t_e := '0';t_data := "01010011";
when 15 => --Enable S
initial := '0';t_rs := '1';t_r_w := '0';t_e := '1';t_data := "01010011";
when 16 => --T
initial := '0';t_rs := '1';t_r_w := '0';t_e := '0';t_data := "01010100";
when 17 => --Enable T 
initial := '0';t_rs := '1';t_r_w := '0';t_e := '1';t_data := "01010100";
when 18 => --R
initial := '0';t_rs := '1';t_r_w := '0';t_e := '0';t_data := "01010010";
when 19 => --Enable R
initial := '0';t_rs := '1';t_r_w := '0';t_e := '1';t_data := "01010010";
when 20 => --O
initial := '0';t_rs := '1';t_r_w := '0';t_e := '0';t_data := "01001111";
when 21 => --Enable O
initial := '0';t_rs := '1';t_r_w := '0';t_e := '1';t_data := "01001111";
when 22 => --N
initial := '0';t_rs := '1';t_r_w := '0';t_e := '0';t_data := "01001110";
when 23 => --Enable N
initial := '0';t_rs := '1';t_r_w := '0';t_e := '1';t_data := "01001110";
when others =>
initial := '1';t_e := '0';
end case;
rs <= t_rs; r_w <= t_r_w; e <= t_e; data <= t_data; 
end process;
end a;
 

Re: CPLD

Good Ebook at My Post
Link: h**p://
 

CPLD

Hi, baonguyenpro.
Your post is empty:
"Sorry, but you need login in to view this attachment"
I'm already logged.

Best Regards.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top