Hi to the community,
I am trying to send an uint8_t number using this function:
void LPUART1_transmit_int(uint8_t number){
while((LPUART1->STAT & LPUART_STAT_TDRE_MASK)>>LPUART_STAT_TDRE_SHIFT==0);
/* Wait for transmit buffer to be empty */
LPUART1->DATA=number; /* Send data */
}
But it doesn't work. I am going to attach the code below.
The original one is:
void LPUART1_transmit_char(char send) { /* Function to Transmit single Char */
while((LPUART1->STAT & LPUART_STAT_TDRE_MASK)>>LPUART_STAT_TDRE_SHIFT==0);
/* Wait for transmit buffer to be empty */
LPUART1->DATA=send; /* Send data */
}
Solved! Go to Solution.
Hi,
If the program receives ‘1‘ in ascii which is 49, it will return ‘>‘ (62) and uint8_t = 12.
It seems it works.
Regards,
Daniel
Hi,
If the program receives ‘1‘ in ascii which is 49, it will return ‘>‘ (62) and uint8_t = 12.
It seems it works.
Regards,
Daniel
I was using Putty and it doesn't simulate it correctly, so i know that i wasn't using the right program, as always, Thanks Daniel!