Forum Discussion
Altera_Forum
Honored Contributor
22 years agoNios II LCD Driver
Greetings. Quite simply my LCD doesn't "work" with Nios II. It has and does work with Nios I.
From the simple "web server" default reference design where the display should show something like: "Nios II, IP address: xxx.xxx.xxx.xxx" (or equivalent), to the count_binary reference design, to writing my own (quick) code: FILE *fp_LCD=0;
fp_LCD = fopen(LCD_DISPLAY_NAME,"w"); // open LCD for write
if(fp_LCD==0)
printf("\nError Opening %s\n\n",LCD_DISPLAY_NAME);
else
{
printf("LCD opened, ready for access!\n");
fprintf(fp_LCD,"Hello LCD");
fclose(fp_LCD);
} Does anyone have their LCD working? Any special tricks? FYI, I have the Nios-devkit-1C20, and I have upgraded the FLASH to use the factory_recovery for Nios II... Thanks, -Terry19 Replies
- Altera_Forum
Honored Contributor
UPDATE:
It appears as though I have a work-around to the LCD errata that was discovered previously in this post re: <div class='quotetop'>QUOTE </div> --- Quote Start --- The LCD will not operate if the Compact Flash card is plugged in[/b] --- Quote End --- I have the LCD now working with the CF card plugged in to the devkit... Here's how: I tied the internal I/O pins: CF_CS_N to Vcc to disable the Compact Flash chip select and set CF_POWER to GND to disable power to the CF interface... Note that if you want to talk to the CF card, you will have to enable both the CS and CF_POWER signals; thus running into the same problem as before... (or so it seems). temp fix anyways. -Terry - Altera_Forum
Honored Contributor
Hi Terry,
Which ref design are you using that has these CF_CS_N and CF_POWER signals already labelled? In the older nios I, these are part of the standard ref design. I can toggle the CF_POWER lines to re-initialize the cf when needed, but in all of these new nios II ref designs, these signal lines do not exist in the bdf file. as a matter of fact, i was not able to find any ref design that contains any available lines for the usage of the compact flash. i wonder why? -Quan - Altera_Forum
Honored Contributor
Hi Quan,
I had to add these signals to the .BDF file myself. FYI, I am using the Cyclone Reference Design, but I am sure the same applies for the 1S10 & 1S40 as well. -Terry - Altera_Forum
Honored Contributor
Because of pinout restrictions, the CF shares pins with what the Nios team defined as the LCD connector.
You might get around this problem by wiring the LCD to a different set of pins. We haven't tried this yet. But we will very soon. If you try this and it works please tell us. - Altera_Forum
Honored Contributor
Kerri,
I recently took the full_featured ref design and moved the LCD from PROTO1 J10 to PROTO2 J15. If anyone would like me to send you the updated pinout list, let me know. Really all it took was a quick look at the schematic to ensure the proper pinout was applied. The LCD now works properly, and I can talk to my CF device. Regards, -Terry - Altera_Forum
Honored Contributor
That's great news. Thanks for sharing!
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by tjd@Jul 15 2004, 01:08 PM kerri,i recently took the full_featured ref design and moved the lcd from proto1 j10 to proto2 j15.
if anyone would like me to send you the updated pinout list, let me know. really all it took was a quick look at the schematic to ensure the proper pinout was applied.
the lcd now works properly, and i can talk to my cf device.
regards,
-terry --- Quote End --- Hi Terry, I would like to see the updated pin file if you don't mind posting it or email it to me. My situation will be a bit different in that I will need to share the pins like in the old nios configuration. I have built a daughter board to attach to use the PROTO2 pins and so i won't be able to relocate to any of the PROTO2 pins. I'm looking through and comparing the old lcd driver with the newer ones and trying to see if I can reach a happy medium. Actually come to think of it, i wonder if the hardware was changed? You mentioned moving the LCD from PROTO1 J10 to PROTO2 J15, on my board the lcd is attached to the PROTO1 J12. Also I forgot to mention i am using the Cyclone dev kit from Altera. -Quan
- Altera_Forum
Honored Contributor
Quan,
I have included the pin list that I have cut-and-pasted out of my Assignment Editor.
As you can see, I used the same pin names as the reference design, but prefixed each name with Proto2_ <div class='quotetop'>QUOTE </div> --- Quote Start --- You mentioned moving the LCD from PROTO1 J10 to PROTO2 J15, on my board the lcd is attached to the PROTO1 J12. Also I forgot to mention i am using the Cyclone dev kit from Altera.[/b] --- Quote End --- I too am using the Altera Cyclone dev kit, and I meant proto1, J12. Sorry for the confusion. Regards, -TerryProto2_LCD Location PIN_U10 Proto2_LCD Location PIN_V10 Proto2_LCD Location PIN_W10 Proto2_LCD Location PIN_Y10 Proto2_LCD Location PIN_V11 Proto2_LCD Location PIN_U11 Proto2_LCD Location PIN_W11 Proto2_LCD Location PIN_Y11 Proto2_LCD_E Location PIN_T10 Proto2_LCD_RS Location PIN_Y9 Proto2_LCD_RW Location PIN_W9 - Altera_Forum
Honored Contributor
Hi Terry,
thanx for the update. I see what you mean. I will try something similar to this but keep it for proto1 so that proto2 is available for my daughter board. -Quan