For what it's worth, I've look at that for several minutes, and that is not intuitively obvious to me what it is supposed to mean. As well as truly backing you into a corner for future expansion.
I hesitate putting in my 2 cents worth, but looking toward a little more ability and conciseness in the future, I would like to see something like this- myarray(2,3)(4:6)="abcd". This would mean replace the forth thru sixth characters of row 2, column 3 of my matrix with "abcd". I know this is way beyond current design plans. I'm not saying do it now, you have enough to do, but don't code yourself into a corner, leave a little room for later expansion notation wise. For now, just myarray(3)(2) for...
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 ">...