PDA

View Full Version : HSERIN 5 bytes from PC



Pic2008
- 22nd January 2009, 11:03
How do I receive 5 bytes in 1 packet send from PC serial port?

From C code in PC,

BYTE data_out[10]
data_out[0]=1
data_out[1]=2
data_out[2]=3
data_out[3]=4
data_out[4]=5
serial.Write(data_out,5)

Using the following, I can't seem to get it to work. if send and receive 1 byte, then it is ok. The baud rate setting is correct.



data_in var byte[10]
HSERIN [DEC5 data_in]


I'm using DT serial interrupt.
Pls help.

mackrackit
- 23rd January 2009, 03:53
HSERIN [data_in\5]

Pic2008
- 24th January 2009, 03:08
Thanks for the solution.

mackrackit
- 24th January 2009, 03:12
Thanks for the solution.
It really worked? :eek: