Thanks Joe and you are right I just did not know what to choose. For some reason my cut and paste did not include this part:

Include "Modedefs.bas"

'********************* Declaired Pins **************************
Clk var PortD.2
Dout VAR PortD.3
Din var PortD.0
Sclk var PortC.3
Mclk var PortC.1

I do not believe the other subroutines are necessary as the hope is to have this run continuously. I have never done an array so I have no idea exactly how this is written. I will certainly look at the subs and returns and just trying to take this one step at a time.

Best, Ed