PDA

View Full Version : Receiving Packet Array In Usart



crhomberg
- 18th April 2007, 23:03
Is it correct syntax and or possible to receive 8 bytes of data in one command like:

hserin 1,timeout,[DATA1,DATA2,DATA3,DATA4,DATA5,DATA6,DATA7,DATA8]

I seem to only get the 1st digit and sometimes the second.

Regards

Chris

skimask
- 18th April 2007, 23:31
Is it correct syntax and or possible to receive 8 bytes of data in one command like:

hserin 1,timeout,[DATA1,DATA2,DATA3,DATA4,DATA5,DATA6,DATA7,DATA8]

I seem to only get the 1st digit and sometimes the second.

Regards

Chris

string var byte[8]
cr var byte : cr = 13

HSERIN 1, timeout, [ STR string \cr ]

receives 8 characters ending in a carraige return, or skip the CR at the end.
Page 76-77 of the little green book.

P.S. No need to create multiple threads on the same subject. Most of us will follow the subject matter.