Originally Posted by
AndiPersti
Can you give an example of the data and how it should be sent to the LCD?
Bye, Andreas
Of course. Btw I use Code Composer Studio with a Cortex M4 board.
WRITE = 0x01
DIGITS_SPEED = 0x0F
DIGITS_OBJECT_ID = 0x00
MSB = 0x00
LSB = 0x0F
So:
Code:
while(Received_Data!=ACK)
{
ROM_UARTCharPutNonBlocking(UART0_BASE,WRITE); // Write Cmd
ROM_UARTCharPutNonBlocking(UART0_BASE,DIGITS); // Object Type
ROM_UARTCharPutNonBlocking(UART0_BASE,DIGITS_OBJECT_ID); // Object ID
ROM_UARTCharPutNonBlocking(UART0_BASE,MSB_CMD); // MSB Data
ROM_UARTCharPutNonBlocking(UART0_BASE,LSB_CMD); // LSB Data
// Calculate Checksum
CHECKSUM=WRITE^DIGITS^DIGITS_OBJECT_ID^MSB_CMD^LSB_CMD;
ROM_UARTCharPutNonBlocking(UART0_BASE,CHECKSUM); // Checksum
Received_Data = UARTCharGet(UART0_BASE);
}
Write is of course a write cmd to the lcd. DIGITS and DIGITS_OBJECT_ID are the declarations of an element of the lcd. In this case a simple a screen with 3 digits. From the 5 cmd I calculate the checksum.
Everything works fine: I can read and write to the LCD. I can read and write with ID-filtering to the CAN. My only problem is to convert the incoming data of the CAN to something that I can work with, so that I can send it to my LCD.
I hope that you are understanding what I mean.