Tray: FOR x = 0 To 7, since portC goes from 0 to 7.

Cheers

Al.