sci read char error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sci read char error

297 Views
gregoryclement
Contributor I

Hello;

 

Sorry for my English, it's not my first language.

 

I have a serial communication problem.

 

I use this piece of code:

char Receive;

If (Term1_KeyPressed () == 1)

{

Term1_ReadChar (& Receive);

}

 

I do not understand why, it affects where I save data (0xF000), if I remove the data record from my code, I have variables that changes by itself.

 

Also, Term1_KeyPressed () is always 1.

 

I am able to transmit without problem using: SendChar (Cr);

 

I test this code and work well:

while(1)

{

SendChar (Cr);

If (Term1_KeyPressed () == 1)

{

Term1_ReadChar (& Receive);

}

}

 

I do not understand how to read a character. Could you help me

 

Thank you for your help.

Labels (1)
0 Kudos
0 Replies