hi all ,
this is my first post and i hope help from all .My problem is i can not compare my file my file is
$07 $06 $0D $CA $2E $56 $00 $C9 $77 .when this file recive i want flash led portc.3 on with pic16f688. i get corect boud 115200 with crystal 11.0592 Mhz i also check hserin and hserout
same. my code is below
@ DEVICE PIC16F688, HS_OSC, WDT_OFF, PWRT_OFF, MCLR_OFF, BOD_OFF,PROTECT_OFF
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 5 ' 115200 Baud @ 11.0592MHz, 0.0%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
RCSTA = $90 ' Enable serial port & continuous receive
TXSTA = $24 ' Enable transmit, BRGH = 1
SPBRG = 5 ' 115200 Baud @ 11.0592MHz, 0.0%
ANSEL = 0 'ALL DIGITAL
INTCON = 0 'Disable interrupts
DATAIN VAR byte[9]
main:
HSERIN [WAIT($07), str DATAIN\8]
'if datain = $07,$06,$0D,$CA,$2E,$56,$00,$C9,$77
hserout [str datain\9]
goto main
END
sorry for my english
Bookmarks