Hi Darrel,

in fact, row 1 problem was not related to software!! after i tried your last code. i found nothing changed.

I then checked all npn transistors used in rows. i found the transistor on portb.0 is not working properly !! i changed the transistor and the problem was solved.

all portb transistors were bc337 25 npn transistors except portb.0 that was bc337 40

i dont know if 40 is different than 25 !! but i think the transistor itself is not working

thx Darrel for your help

BW