Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

using PIOs to communicate with an LCD controller

Altera_Forum
Honored Contributor II
1,346 Views

Hi everyone. Karthik here. 

 

I am using an LCD controller to communicate with the optrex lcd module and i want to send the data to the controller from the nios processor thru pios. can anyone tell me where i can find information about the macros defined in the altera_avalon_pio_regs.h header file. i am using the following code to do this but im not getting any transitions on the pios (on the scope) 

# include "stdio.h"# include "system.h"# include "altera_avalon_pio_regs.h"# include "alt_types.h" 

 

int main (void) 

alt_u8 data[15]={0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x50,0x51,0x52,0x53,0x54, 

0x55}; 

alt_u8 reset; 

alt_u8 we; 

volatile int ack; 

volatile int i; 

 

 

reset = 1; 

do 

ack = IORD_ALTERA_AVALON_PIO_DATA(LCD_ACK_PIO_BASE); 

}while (!(ack)); 

 

we=1; 

 

while(1) 

for(i=0;i<16;i++) 

IOWR_ALTERA_AVALON_PIO_DATA(LCD_DATA_PIO_BASE,data[i]); 

ack = IORD_ALTERA_AVALON_PIO_DATA(LCD_ACK_PIO_BASE); 

while (!(ack)); 

i=0; 

return (0) ; 

}
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
630 Views

May i ask what reason do you have for not including the Optrex IP via SOPC? Wouldnt that be alot easier?

0 Kudos
Altera_Forum
Honored Contributor II
630 Views

 

--- Quote Start ---  

originally posted by tembridis@Mar 26 2007, 07:09 PM 

may i ask what reason do you have for not including the optrex ip via sopc? wouldnt that be alot easier? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=22513) 

--- quote end ---  

 

--- Quote End ---  

 

 

 

Thanks a lot for ur reply. 

 

I was trying to interface the lcd through a controller because i wanted to verify the working of the LCD Controller (designed by me). And i had made some errors in the code. I got rid of them and my controller seems to be working fine. 

 

Thanks a lot again. 

Karthik
0 Kudos
Reply