I'm a student on internship and my teacher want me to use two PsoC in order to display the current and the voltage of a battery. The values are converted and sent by the UART of the first PsoC, received and handled by the second PsoC. I want to display these values on a LCD screen but all the program I've developed until now doesn't seems to work.
More specifically, the first PsoC convert a data from float to ASCII using the function ftoa() and send it to the second PsoC in order to display it on the LCD screen. The problem is that the value printed by the LCD doesn't match what I am supposed to have.
I'm not using any development kit but instead, I'm using a PCB which was developed by my university.
Until now, I've managed to display a unsigned float variable.
The code below my message is supposed to store the data send by the Rx buffer in a table and show the content of the table in the LCD Screen. But my LCD Screen display some hex value like :
"F4000000000" for the first line
"03072B2B00" for the second line.
What I expect is a value like : "11,4578"
Can you help me please ?
char* strPtr; // Parameter pointer
char tab ;
int byte_length = 256;
// Initialize receiver/cmd buffer
//Turn on interrupts
//Enable RX interrupts
//set parity as zero and start the UART
LCD_1_Start(); // Initialize LCD
//Clear the screen in Hyper terminal window
LCD_1_PrCString ("tension :");
//tab[i] = UART_cGetChar ()/0xA; //test pour récupérer des caractere
strPtr = UART_cGetChar ()/0xA;
//tab [i] = UART_bReadRxData();
//strPtr =& tab[i];
//strPtr = &UART_aRxBuffer[i];
//UART_aRxBuffer = UART_bReadRxData ();
//tab[i] = UART_iReadChar(); // Get a character from UART RX data register
//tab[i] = tab[i]/0xA;
//Reset command buffer and flags