I hope somebody can explain what I do wrong if this function appears to be ok.......
I you use a char (8 bits) as argument With printOut it don't work!!!
Code: Select all
void SerialTest(void) {
int gitt = 123;
char gitt2 = 123;
PrintOut(USART1_Write,"\r\n\r\nThis is strange for me, this must be 123 : ");
PrintOut(USART1_Write,"\r\n\r\n %u ",123); // This not work !!!
PrintOut(USART1_Write,"\r\n\r\n %u ",gitt); // This is OK (I declared a int)
PrintOut(USART1_Write,"\r\n\r\n %u ",gitt2); // This is not OK ( I declared a char )
}
// This is the used USART1_Write function i use :
void USART1_Write( u08 Txdata )
{
while ( !( UCSR1A & (1<<UDRE1)) ); // Wait for empty transmit buffer
UDR1 = Txdata; // Put data into buffer, sends the data
}