Pic 16F877

Fermé
hmayna - 17 mars 2012 à 15:57
nicolay1 Messages postés 145 Date d'inscription mardi 22 février 2011 Statut Membre Dernière intervention 21 juin 2012 - 17 mars 2012 à 16:23
Bonjour, ht i have a big problem how i can prgrame Dé électronique




2 réponses

nicolay1 Messages postés 145 Date d'inscription mardi 22 février 2011 Statut Membre Dernière intervention 21 juin 2012 8
Modifié par nicolay1 le 17/03/2012 à 16:22
you are english ? do you use flow code or an other environement of programation with isis ? or your system is real ? How do you know wich number you want ?
0
nicolay1 Messages postés 145 Date d'inscription mardi 22 février 2011 Statut Membre Dernière intervention 21 juin 2012 8
17 mars 2012 à 16:23
but use a real counter and 7 6_Or_gates is easier ^^
0
nicolay1 Messages postés 145 Date d'inscription mardi 22 février 2011 Statut Membre Dernière intervention 21 juin 2012 8
Modifié par nicolay1 le 17/03/2012 à 16:20
I suppose that your dé set 1 after 2 after 3,4,5,6,1,2,3 etc
you have to do a while/whileEnd and in it a value which is increment it began at 1 and when it is at 6 it became again at 1.
You have now a counter ^^.
you have certainly a lot of out, your dé have certainly 7 LED, you should switch on each LED if your value is the good value... a exemple : you want to put the 1.
the shema of your dé :
1---------4
2----7----5
3---------6
each number is the number of the LED and the number of the out (fotr the led 1 is B1 and this out is linked to the LED one)
also if you want to have the one on your de you have to swich on the led 7 ;)
if you have the two on you de the LED 1 and 6
number 3 : 176
number 4 : 1346
number 5 : 13746
number 6 : 741963

finally your programme is like that :
value=1
while(TRUE)
if the value is 4
then 1->B1
1->B3
1->B4
1->B6
if end
if the value is 5
then 1->B1
1->B3
1->B4
1->B6
1->B7
if end
value=value+1
if value=6
then value = 1
ifEnd
whileEnd
do you anderstand everything ? :)
there is a mistake in my algorithme ^^ find it :)
0