Hi jkbh,

I didn't take the time to look up the data sheet on this micro but:

"Y3 var latd.3" At what point did you declare Portd.3 = latd.3?

All of your X variables have been assigned to a port pin but none of the Y variables have a specific port assignment. I'm still a beginner at programming but this stood out to me.

BobK