Hello Beto,

Beto>>I think that another char counter must be used or a'clear-array' sub must be implemented but how this is done?<<

Mister-e has in my opinion the best way to accomplish the task. just read each character until End of line comes.

If you still want to use your array of twenty... you can initialize the whole array each time you go into your routine...
Notice I added 3 lines just below your readline...
This is not as good of a way to accomplish what you want as Mister-e's, but I believe it may do the job for you.

something like this:

readline:

for dirarray=0 to 19
string[dirarray]=" "
next dirarray

dirarray = 0 'reset pointer char to 0 (the array)
lineloper:
i2cread porta.2,porta.1,$a0,direccion,[j] 'read char
if (j=0 ) then doneline '0 = end of line
string[dirarray] = j 'make string
dirarray=diarray+1;
direccion = direccion +1 'inc addr
pause 100
goto lineloper 'next char
doneline:
direccion = direccion +1 'skip the enf of line (0)
return 'we done