- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the university program 16x2 character display component in SOPC builder and i can write text to the LCD via a C program in NIOS II no problem. eg ...
alt_up_character_lcd_string(char_lcd_dev, "Hello Altera Forum!"); But, i have a 7 bit PIO value defined as# define switches (volatile char*) 0x00101060 How can i display this on the LCD ? i know how to do it with standard C and printf but not this. I have looked through the document for this component and there is another function called alt_up_character_lcd_write but it doesn't give an example of it should be usedLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not format a string first?
char str[80]; int data; data = <read from the LED> sprintf(str, "LED value is 0x%X", data); alt_up_character_lcd_string(char_lcd_dev, str); Cheers, Dave- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Why not format a string first? char str[80]; int data; data = <read from the LED> sprintf(str, "LED value is 0x%X", data); alt_up_character_lcd_string(char_lcd_dev, str); Cheers, Dave --- Quote End --- Dave you're a hero. I didn't think i could do it like that. Works a charm Thankyou
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great!
Cheers, Dave
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page