Télécharger Imprimer la page

Picaxe 14M Mode D'emploi page 4

Publicité

Utilisation des entrées.
Par commande digitale :
Par commande analogique :
main:
readadc 0,b1
if b1 < 75 then light1
if
b1 < 175 then light2
goto light3
light1:
high 1
low 2
low 3
goto main
light2:
low 1
high 2
low 3
goto main
light3:
low 1
low 2
high 3
goto main
http://henri.lichiere.free.fr/electronique/picaxe-14m/
Microcontrôleur PICAXE-14M (PIC16F684)
inter, microswitch, ILS ...
Exécuter 'action' lorsque l'inter est ouvert :
if pin0 = 0 then action
Exécuter 'action' lorsque l'inter est fermé :
if pin0 = 1 then action
Exécuter 'action' lorsque l'inter est ouvert :
if pin0 = 1 then action
Exécuter 'action' lorsque l'inter est fermé :
if pin0 = 0 then action
potentiomètre, LDR, thermistance ...
'pin0  b1
'boucle
'boucle
'boucle
main:
readadc 0,b1
if b1<50 then light1
if b1<100 then light2
if b1<145 then light3
if b1<175 then light4
goto main
hL – 2009
Page 4/8

Publicité

loading

Ce manuel est également adapté pour:

Pic16f684