Problem with modulo (%) and reset

Ah Ha, I knew something was mangled in those if statements, but what do I know I'm just a hardware guy faking the programming stuff. :wink:

Lefty