In V7.0 PrintOut function still not work with chars ? .....

General discussion on mikroC PRO for AVR.
Post Reply
Author
Message
rob.keij
Posts: 22
Joined: 24 Dec 2014 12:03
Location: IJmuiden the Netherlands
Contact:

In V7.0 PrintOut function still not work with chars ? .....

#1 Post by rob.keij » 25 May 2017 09:03

This is my last try about this bug..... I was hoping it works in V7.0 ....

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
}


This is the result in the terminal:
Image

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: In V7.0 PrintOut function still not work with chars ? ..

#2 Post by filip » 02 Jun 2017 14:12

Hi,

I believe you have been answered on the other post regarding this issue.

Regards,
Filip.

rob.keij
Posts: 22
Joined: 24 Dec 2014 12:03
Location: IJmuiden the Netherlands
Contact:

Re: In V7.0 PrintOut function still not work with chars ? ..

#3 Post by rob.keij » 02 Jun 2017 15:34

filip wrote:Hi,

I believe you have been answered on the other post regarding this issue.

Regards,
Filip.

Yes, you are right,

thanks,

Rob Keij

Post Reply

Return to “mikroC PRO for AVR General”