My baud settings are as follows:
Code:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
DEFINE HSER_BAUD 9600
DEFINE HSER_SPBRG  51 ' 9600 Baud
BAUDCON.3 = 1         ' Enable 16 bit baudrate generator
DEFINE HSER2_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER2_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER2_CLROERR 1 ' Clear overflow automatically
DEFINE HSER2_BAUD 14400
my code is as follows:

Code:
com var byte[12]

GETPIC:
		PAUSE 3000
		COM=0
		GOSUB SYNC
GOTO GETPIC
; UART2 IS CONNECTED TO THE CAMERA (www.4dsystems.com.au/downloads/micro-CAM/Docs/uCAM-DS-rev7.pdf)
; UART1 IS CONNECTED TO MY PC
SYNC:
		HSEROUT2 [$AA,$0D,$00,$00,$00,$00]
		HSERIN2	1000,SYNC,[COM]
		HSEROUT [$AA,$0D,$00,$00,$00,$00]' this statement and the ones below should not execute
		HSEROUT	[COM,13,10]
		HSEROUT2 [$AA,$0E,$0D,$00,$00,$00]
	GOTO GETPIC
RETURN
I should not get any response on my PC as I have removed my MAX232 and there is no way the data can go to the camera. But I get the following:

Code:
AA 0D 00 00 00 AA 0D 0A
why is com getting loaded with AA 0D 0A and then after a few loops of the same, it changes.