Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to use inbyte so the Spartan 3 board displays what is typed in the hyperterminal?

Status
Not open for further replies.

ggniy

Junior Member level 2
Joined
Dec 26, 2007
Messages
21
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,524
hi ppl!

what is inbyte?how can i use inbyte C language in Xilinx Paltform Studio so that the spartan 3 board can display what i've typed in the hyperterminal?

thanks in advance! =)
 

xilinx inbyte

Inbyte is a C function that you receives a char (a byte) from a generic port. To do this, you will need to develop a UART module (RS232) in your Spartan, and develop a computer software to send data. Or you can use a hardware, for example, a GPIO and conect direct to your module, and now using inbyte. Copied that?
 

Re: using inbyte

im using c langauge switch case in the XPS to enable the board to respond back to the pc. for e.g when i type "a" in the hyperterminal, i want it to return a "b" in the pc. however it appear my "a" into another character. but it still will reply a "b". i only can once after it has respond. i dont noe where is the error. below is the code tt i've tried:

int main (void) {

int inchar;
xil_printf(">");
inchar = inbyte();

xil_printf("%c\n\r");
switch(inchar){
case 'a':
xil_printf("b\n\r");
return(0);

case 'b':
xil_printf("c\n\r");
return(0);
break;
}

}
 

using inbyte

In this line, the argument is missing: xil_printf("%c\n\r");
You probably meant this: xil_printf("%c\n\r", inchar);

A good compiler should warn you about that problem. Try enabling all of its warning messages.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top