cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,226 Views
Registered: ‎02-13-2012

using gpio to control lcd1602 problems???

Jump to solution

Hello everyone

I am encounting one question when I use the gpio to control lcd 1602 .

I am referring to the design http://www.fpgadeveloper.com/2008/10/microblaze-16x2-lcd-driver.html

Then I made several changes:
  1 . I used 8 bit mode .
  2 . I depart the data bits and the control bits
     here is the definion in the mhs file
    BEGIN xps_gpio
     PARAMETER INSTANCE = lcd1602
     PARAMETER HW_VER = 2.00.a
     PARAMETER C_GPIO_WIDTH = 8
     PARAMETER C_IS_DUAL = 1
     PARAMETER C_GPIO2_WIDTH = 8
     PARAMETER C_BASEADDR = 0x81400000
     PARAMETER C_HIGHADDR = 0x8140ffff
     BUS_INTERFACE SPLB = mb_plb
     PORT GPIO_IO = lcd1602_GPIO_IO
     PORT GPIO2_IO_O = lcd1602_GPIO2_IO_O
    END
    Port GPIO_IO is the inout port and GPIO2_IO_O is the output port.
     
     the ucf file :
     #JA
     Net lcd1602_GPIO_IO_pin<7> LOC = T12 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L19P, Sch name = JA1
     Net lcd1602_GPIO_IO_pin<6> LOC = V12 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L19N, Sch name = JA2  
     Net lcd1602_GPIO_IO_pin<5> LOC = N10 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L20P, Sch name = JA3
     Net lcd1602_GPIO_IO_pin<4> LOC = P11 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L20N, Sch name = JA4
     Net lcd1602_GPIO_IO_pin<3> LOC = M10 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L22P, Sch name = JA7
     Net lcd1602_GPIO_IO_pin<2> LOC = N9 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L22N, Sch name = JA8
     Net lcd1602_GPIO_IO_pin<1> LOC = U11 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L23P, Sch name = JA9
     Net lcd1602_GPIO_IO_pin<0> LOC = V11 | IOSTANDARD = LVCMOS33; #Bank = 2, pin name = IO_L23N, Sch name = JA10
     #JB
     Net lcd1602_GPIO2_IO_O_pin<0> LOC = K2 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L38P_M3DQ2, Sch name = JB1
     Net lcd1602_GPIO2_IO_O_pin<1> LOC = K1 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L38N_M3DQ3, Sch name = JB2
     Net lcd1602_GPIO2_IO_O_pin<2> LOC = L4 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L39P_M3LDQS, Sch name = JB3
     #Net "JB<3>" LOC = L3 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L39N_M3LDQSN, Sch name = JB4
     #Net "JB<4>" LOC = J3 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L40P_M3DQ6, Sch name = JB7
     #Net "JB<5>" LOC = J1 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L40N_M3DQ7, Sch name = JB8
     #Net "JB<6>" LOC = K3 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L42N_GCLK24_M3LDM, Sch name = JB9
     Net lcd1602_GPIO2_IO_O_pin<3> LOC = K5 | IOSTANDARD = LVCMOS33; #Bank = 3, pin name = IO_L43N_GCLK22_IRDY2_M3CASN, Sch name = JB10
     
The problem is that lcd1602_GPIO_IO is not working as the inout port.I can write and read it. But what I read is just what I write before.

 

I will attach my sdk c code below

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
2,798 Views
Registered: ‎02-13-2012

 

 

Sorry to make this post.

http://www.fpgadeveloper.com/2008/10/microblaze-16x2-lcd-driver.html    

It really works

 

Due to my limited konwledge of Xps , I made wrong connections between the borad and the lcd1602

 

 

View solution in original post

0 Kudos
1 Reply
Highlighted
Adventurer
Adventurer
2,799 Views
Registered: ‎02-13-2012

 

 

Sorry to make this post.

http://www.fpgadeveloper.com/2008/10/microblaze-16x2-lcd-driver.html    

It really works

 

Due to my limited konwledge of Xps , I made wrong connections between the borad and the lcd1602

 

 

View solution in original post

0 Kudos