Yesterday I ran this many times with the same result, bunches of 121 characters. Today, with everything exactly the same, no more 121 characters. ?? The only thing I can figure is that it was some problem with the driver on my computer that cleared up with a reboot this morning. Please disregard this whole mess. Sorry for wasting all your time.
Thank you. Yes, using USART_BLOCKING works, but I still don't understand why it trashed a completely unrelated variable. In the help for HSerGetString, it says to use the USART_TX_BLOCKING, but down in the example, it used USART_BLOCKING, so a little confusing. (Same for HSerGetNum.) I'm not sure what you meant by "Also the the string is can only be up to 40 bytes unless dim ed other." I certainly didn't want the program to set the length of mystr to 121. It seems the length wasn't actually 121,...
don't know why the previous post is showing mystr after HSerGetString <yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy> len=121</yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy> at the end. I've edited it twice, but can't get rid of whatever is causing the post to show extra stuff after len=121, it shouldn't be there.
don't know why the previous post is showing mystr after HSerGetString <yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy> len=121</yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy> at the end. I've edited it twice, but can't get rid of whatever is causing the post to show extra stuff after len=121, it shouldn't be there. s.b. mystr after HSerGetString <yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy> len=121</yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy>
I'm having trouble with HSerGetString trashing one of my string variables. Here is the program #option Explicit #chip 16f1765,32 #startup InitPPS, 85 #define PPSToolPart 16LF1765 Sub InitPPS Dir PORTC.3 Out RC3PPS = 0x0016 // TX > RC3 RXPPS = 0x0004 // RA4 > RX End Sub #define USART_BAUD_RATE 115200 #DEFINE USART_TX_BLOCKING #DEFINE USART_DELAY OFF wait 100 ms dim mystr as string dim t1,t2 as String mystr="123.456" HserPrintCRLF hserprint "mystr before HSerGetString <" HSerPrint mystr hserprint ">...
I'm having trouble with HSerGetString trashing one of my string variables. Here is the program #option Explicit #chip 16f1765,32 #startup InitPPS, 85 #define PPSToolPart 16LF1765 Sub InitPPS Dir PORTC.3 Out RC3PPS = 0x0016 // TX > RC3 RXPPS = 0x0004 // RA4 > RX End Sub #define USART_BAUD_RATE 115200 #DEFINE USART_TX_BLOCKING #DEFINE USART_DELAY OFF wait 100 ms dim mystr as string dim t1,t2 as String mystr="123.456" HserPrintCRLF hserprint "mystr before HSerGetString <" HSerPrint mystr hserprint ">...
I'm having trouble with HSerGetString trashing one of my string variables. Here is the program #option Explicit #chip 16f1765,32 #startup InitPPS, 85 #define PPSToolPart 16LF1765 Sub InitPPS Dir PORTC.3 Out RC3PPS = 0x0016 // TX > RC3 RXPPS = 0x0004 // RA4 > RX End Sub #define USART_BAUD_RATE 115200 #DEFINE USART_TX_BLOCKING #DEFINE USART_DELAY OFF wait 100 ms dim mystr as string dim t1,t2 as String mystr="123.456" HserPrintCRLF hserprint "mystr before HSerGetString <" HSerPrint mystr hserprint ">...
Yup. Too bad it takes hours and hours to find these easy solutions.