Static Compteur as Byte Dim Tab(1 to 8) as Byte Tab(1)=1:Tab(2)=3:Tab(3)=2:Tab(4)=6 Tab(5)=4:Tab(6)=12:Tab(7)=8:Tab(8)=9 Compteur=Compteur+1 If Compteur>8 then Compteur=1 WriteByte Port, Tab(Compteur)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionStatic Compteur as Byte 'Variable qui va pointer l'octet à émettre Dim Tab(1 to 8) as Byte 'Tableau contenant les octets à émettre Tab(1)=1:Tab(2)=3:Tab(3)=2:Tab(4)=6 'Initialisation du tableau Tab(5)=4:Tab(6)=12:Tab(7)=8:Tab(8)=9 'Initialisation du tableau Compteur=Compteur+1 'Incrémentation du compteur If Compteur>8 then Compteur=1 'Si on arrive à la fin de tableau, on repointe le premier octet WriteByte Port, Tab(Compteur) 'Emission de l'octet
Static Compteur as Byte Dim Tableau(1 to 8) as Byte Tableau(1)=1:Tableau(2)=3:Tableau(3)=2:Tableau(4)=6 Tableau(5)=4:Tableau(6)=12:Tableau(7)=8:Tableau(8)=9 Compteur=Compteur+1 If Compteur>8 then Compteur=1 WriteByte Port, Tableau(Compteur)