I am at a loss here, I have researched over 30 online douments using HSERIN and for the most part they are all almost identicle. They all seem to be based on the MELABS HSERIN Sample, which is what mine is based off here. here is my code as it stands right now
Note that HSEROUT - I get no data on my pc... dont know whyCode:'**************************************************************** INCLUDE "LCD_D.bas" define OSC 4 ' PORTA is input define HSER_BAUD 9600 DEFINE HSER_CLROERR 1 DEFINE HSER_EVEN 0 DEFINE HSER_ODD 0 RCSTA = $90 TXSTA = $24 TRISD = 0 ' PORTD is output Char var byte[8] Hserout ["Hello World", 13, 10] Mainloop: hserin 5000, Timeout, [Char] LCDOUT $FE, 2 LCDOUT $FE, $80 LCDOUT "MY DATA = ", DEC Char GOTO mainloop ' Repeat Timeout: Hserout ["Hello World", 13, 10] goto mainloop END
on HSERIN it sometimes changes the number but its rare and random. and the numbers may not be the same after reset.
For right now, I just need to send a 16bit number to the PC and have the PC send a 16 bit number to the PIC, if this has to be done by sending the characters (2) from the PC to the PIC (i.e. AE ZT... etc...) for it to store each letter in its own byte and then the PIC can read 2 bytes together thats ok. sending from PIC to PC, im not sure what to expect right now




Bookmarks