USART can only receive 8bit data, if my application is required user to enter a 8bit command byte, then follow by 10bit or 16bit data byte, how can it be done?? any suggestion??
the simple coding i written below can only store 8bit command byte in Parser_Command and 8bit data byte in Parser_Data....
the simple coding i written below can only store 8bit command byte in Parser_Command and 8bit data byte in Parser_Data....
Code:
WaitForData_Flag = 0;
while(1)
{
if(RCIF)
{
ReceiveByte = RCREG;
{
if(WaitForData_Flag)
WaitForData_Flag = 0;
Parser_Data = ReceiveByte;
DoProcess();
else
Parser_Command = ReceiveByte;
WaitForData_Flag = 1;
}
}