I was looking into the PIC calculator. I would like to incorporate USART into the code as advised.
I have got few statements from the PIC calculator which are:
and alsoCode:DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0 DEFINE HSER_SPBRG 12 ' 4800 Baud @ 4MHz, 0.17% DEFINE HSER_CLROERR 1 ' Clear overflow automatically
I would like to ask, if these are the only statements which I need to put in the code and then replace DEBUG with HSERIN & HSEROUT and also use my simple RF modules on TX & RX pins of my PIC instead of the ones I am using now?Code:RCSTA = $90 ' Enable serial port & continuous receive TXSTA = $20 ' Enable transmit, BRGH = 0 SPBRG = 12 ' 4800 Baud @ 4MHz, 0.17%
I mean would these statements be correct?Also Dave, to answer your question -Code:HSEROUT "MT3",code,"S" & HSERIN [WAIT("MT3"),code,STR string\1\10]
. I am using simple RF modules and not any special kind.If you are using radio modules like the ones found at rentron.com then they need to be "trained" to receive data.




Bookmarks