Hi, Martin

Did you remark, you add 1 to PortB value at each time ...sounds pretty good for a loop ...you jump off for portB = 0

But take care: with Portx = y ... no capacitive load allowed !!!

That's all !!!

Alain

PS: I have a look to Elec.Prat. programs I have already downloaded ...