- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to establish a link between a PC and NiosII board to print characters on the LCD. I am trying to have a console of something similar on the PC where i can type or enter characters and will be sent to the DE2 board running NiosII and print them on its LCD. I have found an example that does something similar but there is no input to the board in real time from PC. __________________________________________________________# include <stdio.h># define JTAG_UART_DATA ((volatile int*) 0x10001000)# define JTAG_UART_CONTROL ((volatile int*) (0x10001000+4)) int main() { unsigned char hwld[] = {'h','e','l','o','\0'}; unsigned char *pOutput; pOutput = hwld; while(*pOutput) //strings in C are zero terminated { //if room in output buffer if((*JTAG_UART_CONTROL)&0xffff0000 ) { //then write the next character *JTAG_UART_DATA = (*pOutput++); } }} __________________________________________________________ As you can see, "HELLO" is hard-coded. I can see the text being sent to the Altera Monitor Terminal, My question is how can i type this in real time and have the board scan the JTAG-UART over and over again? What program shall i use? Thanks.Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One way is to use the GetInputString command. Check out this design example on ALtera's design store: https://cloud.altera.com/devstore/platform/15.0.0/nios-ii-qsys-hello-world-lab/
look under the software directory for the hello_world_hardware_interrupt.c and you can use that as a guide.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that's right... do monitor the incoming receiving byte via GETinputString, and then process the string.
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