Charles replied:
Yes, I believe it can be trusted with a variable. I've used this form to receive a variable number of characters based on a length parameter received immediately prior to the...
Yup, I will do so asap.... Sorry, didn't have much time yesterday.
flotulopex - 23rd February 2021, 06:49Of course, since the macro only uses the low byte of R4 to index the array. That would also make it fail when using a constant >255.
In any case, the "example" posted in the first place had a BYTE...
it fails of course for more than 255 chrs
9025
BalBuffer VAR BYTE[300]
BalCount VAR word
latb.7=1
Well, I'll give it a try with a 18F1220 when I'm back home tonight.
flotulopex - 22nd February 2021, 10:57It's the one I always use: 16F690.
flotulopex - 22nd February 2021, 10:54Unfortunately Charles Leo is not monitoring this forum. I 'll make a post on support.melabs.com to clarify this, since the manual is not very clear on the matter.
I 'd rather be 100% sure that...
or even
9024
BalCount = 40HSEROUT [STR BalBuffer\BalCount,13,10]
debug STR BalBuffer\BalCount,13,10
debug "full load",13,10
debug STR BalBuffer,13,10
it works for me
9023
;pic18f26k22 tx demo
#CONFIG
CONFIG FOSC = INTIO67
CONFIG PLLCFG = OFF
CONFIG PRICLKEN = OFF
Re: HSEROUT using STR modifier - length parameter as variable not working
For now, here a my two test programs with 16F690 and 18F1220.
flotulopex Yesterday, 13:11Surprisingly (to me), both accept the STR length as variable in the 3 ways I'm using it (HSEROUT, SEROUT2 and DEBUG).
I'll go back...