$regfile = "at26def.dat" $crystal = 1000000 Config Porta = Output Dim N1 As Byte Declare Sub Routine(n1 As Byte) For N1 = 1 To 8 Call Routine(n1) Waitms 500 Porta = 0 Waitms 500 Next N1 Porta = 0 End Sub Routine(n1 As Byte) Local N2 As Byte N2 = 2 ^ N1 Porta = N2 - 1 End Sub