Hi, I want to try to use 38400 baud rate with 20Mz crystal. I want to test it first in the hyperterminal by entering this line "$GPGGA,115209.600,1114.5166,N,12500.3439,E,1,10,0 .83,16.9,M,55.4,M,,*5E" and I use this codebut I dont have any display on the recieve window. Please help..Code:DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1 DEFINE HSER_SPBRG 32 ' 38400 Baud @ -1.36% define HSER_BAUD 38400 DEFINE HSER_CLROERR 1 ' Clear overflow automatically define OSC 20 gpsin var portc.7 'rx gpsout var portc.6 'tx HH VAR byte MM VAR BYTE SS VAR BYTE ND VAR BYTE NM VAR BYTE NMD VAR WORD WD VAR BYTE WM VAR BYTE WMD VAR WORD AR VAR BYTE[20] START: SERIN2 gpsin,16572,[WAIT("$GPGGA"),WAIT(","),DEC2 hH,DEC2 mM,DEC2 sS,_ WAIT(","),DEC2 ND,DEC2 NM,WAIT("."),DEC3 NMD,WAIT(",N,"),_ DEC3 WD,DEC2 WM,WAIT("."),DEC3 WMD] PAUSE 1000 SEROUT2 gpsin,16572,[DEC2 HH,DEC2 MM,DEC2 SS,_ DEC2 ND,DEC2 NM,DEC3 NMD,DEC3 WD,DEC2 WM,DEC3 WMD,13,10] goto START end
regards,
mbox




Bookmarks