If you know the length of the response, 12 in this case:
Since the normal response packet (except image data) seems to be 6 bytes and the camera response to a SYNC is an ACK (6 bytes) and a SYNC (6 bytes) I'd probably do it in two stepsCode:HSERIN2 1000,SYNC,[COM\12]
Code:COM1 VAR BYTE[6] COM2 VAR BYTE[6] HSERIN2 1000,SYNC,[COM1\6] HSERIN2 1000,SYNC,[COM2\6]
Not quiet sure about this. Doesn't seem to be valid.
I have instead declared 12 different variables and trying to get the response in them...i.e. - HSERIN 500,SYNC,[COM,ID,P1,P2,P3.....]
But it does not work, must be something with the baud, any idea what is the MAX baud we can do with 8MHz osc. I will appreciate if you can show as to how you can calculate it.
The following text is taken from the manual. You will probably need to include the STR modifier.
STR ArrayVar\n{\c}
Receive string of n characters optionally ended in character c
Since you are dealing with HSEROUT2 (Hardware), my guess is that the answer to your question will be in the PIC datasheet.
"No one is completely worthless. They can always serve as a bad example."
Anonymous
ok. I tried to get 512 bytes using string (STR command) and the following statements
The data seems to be getting corrupted as I believe some bytes arriving in HEX format don't add up in a sensible way in string format. Like $00 will be considered as null. Is there any idea as to how to get them in HEX format?Code:MESS1 VAR BYTE[512] HSERIN2 [STR MESS1\512]
The maximum number of bytes in an array is 96 according to the manual.
"No one is completely worthless. They can always serve as a bad example."
Anonymous
Bookmarks