I have found im having the same problem, but I think Ive found a fix, you can tinker with it more. the program does not like the reset to 0 loop, also the name VAR make it 1 more than what you want so make it a 26, also put the loop first before doing serin/out and maybe add a pause 100 inside the loop. Im going to post my code for 8 bytes, its working great so far, i removed the loop and set each one seperately, it helped get rid of bad serial character loss/corruption dont know why though.
Hope this helps or gives ideas!Code:include "LCD_D.BAS" Define OSC 20 'USE ECIO, NOT ECPIO define HSER_BAUD 2400 DEFINE HSER_BITS 8 DEFINE HSER_CLROERR 1 RCSTA = $90 TXSTA = $20 'DO NOT USE $24 TRISC = %10000000 TRISD = 0 Name Var Byte[8] Gain: Name[0] = 0 Name[1] = 0 Name[2] = 0 Name[3] = 0 Name[4] = 0 Name[5] = 0 Name[6] = 0 Name[7] = 0 Name[8] = 0 HSERIN 5000,test,[STR Name\8] : Pause 250 HSEROUT [STR Name, 13, 10] LCDOUT $FE, 2 LCDOUT $FE, $80 LCDOUT Name[0],Name[1],Name[2],Name[3],Name[4],Name[5],Name[6],Name[7] pause 250 Goto Gain test: pause 100 goto gain




Bookmarks