Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

JTAG-UART Help Needed

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.

2 Replies