Download - Programmation du mOway
![Page 1: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/1.jpg)
Programmation du mOway
Baccalauréat STI Génie Electronique 2012
![Page 2: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/2.jpg)
Programmation du mOway
1. Démarche2. AlgoStudio3. MPLAB4. Moway GUI5. Moway
Sommaire
![Page 3: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/3.jpg)
Programmation du mOway
1. Démarche2. AlgoStudio3. MPLAB4. Moway GUI5. Moway
Sommaire
![Page 4: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/4.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
La programmation du mOway peut être décomposée en quatre étapes.
![Page 5: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/5.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
Analyse
ConceptionImplémentation
Intégration
& Tests
![Page 6: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/6.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
Analyse du cahier des charges
et de l’existant (ici le mOway)Le cahier des
charges doit:
Que doit faire le mOway ?
Définir les objectifs que doit
atteindre la solution.
Indiquer les contraintes à respecter
impérativement.
Diminuer les risques d’erreur lors de la
réalisation ou l’installation. Etre un outil
de dialogue entre les différents acteurs.
![Page 7: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/7.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
Conception d’une solution
technique
...peut être représentée sous
forme d’algorithme ou d’algorigramme.
Produire une solution technique.
Comment doit faire le mOway ?
Architecture et traitements effectués,...
![Page 8: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/8.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
Implémentation
Produire le code source à partir de l’algorigramme.
Comment programmer le mOway ?
Compiler le code source en code
machine.
Programme en C
FichierHEX
![Page 9: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/9.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
Transférer le code machine
dans le mOway.
Le mOway, respect-il le cahier des charges ?
Vérifier si le cahier des charges est
respecté.
Intégration& Tests
Revoir la conception,
si nécessaire.
![Page 10: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/10.jpg)
Programmation du mOway
1. Démarche2. AlgoStudio3. MPLAB4. Moway GUI5. Moway
Sommaire
![Page 11: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/11.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
A la mise sous tension, la DEL rouge du mOway doit s’allumer
pendant 5 secondes.
Algo
rigr
amm
e
ExempleCahier des
charges
Conception
![Page 12: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/12.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayProgramme source en C
ProductionSemi-
Automatique
![Page 13: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/13.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayCe bloc vous permet
de déclarer les variables dont vous
avez besoin.
Les commentaires sont précédés de //.
![Page 14: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/14.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayPour utiliser les actionneurs et
capteurs du moway, ces deux lignes de
code sont necessaires.
![Page 15: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/15.jpg)
Click Droit
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayInsertion et édition de la séquence qui allume la DEL rouge
du moway.
Double Click
![Page 16: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/16.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayInsertion et édition de la séquence qui allume la DEL rouge
du moway.
![Page 17: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/17.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayInsertion et édition de la séquence qui allume la DEL rouge
du moway.
![Page 18: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/18.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayInsertion et édition de la séquence qui allume la DEL rouge
du moway.
![Page 19: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/19.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayComme pour
l’insertion de la séquence
précédente.
![Page 20: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/20.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayComme pour
l’insertion de la séquence
précédente.
![Page 21: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/21.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayInsertion et édition de la structure qui réalise une boucle
infinie.
![Page 22: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/22.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayInsertion et édition de la structure qui réalise une boucle
infinie.
![Page 23: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/23.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayInsertion et édition de la structure qui réalise une boucle
infinie.
![Page 24: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/24.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayAlgo Studio permet donc de
générer un programme en C,…
…que l’on peut copier et coller dans le projet « Moway » de MPLAB.
![Page 25: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/25.jpg)
Programmation du mOway
1. Démarche2. AlgoStudio3. MPLAB4. Moway GUI5. Moway
Sommaire
![Page 26: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/26.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayQuelques fichiers du
projet Moway sur MPLAB
Bibliothèque de fonctions liées aux capteurs, aux DEL et à la gestion du port de communication du mOway.
lib_sen_moway.c lib_mot_moway.cBibliothèque renfermant des
fonctions liées à la gestion de la motorisation
du mOway.
Programme principal, à compléter en fonction du
cahier des charges.
main.c
![Page 27: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/27.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwaymain.c
![Page 28: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/28.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwaymain.c
Votre programme est à insérer ici !
![Page 29: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/29.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwaymain.c
![Page 30: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/30.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
lib_mot_moway.c
![Page 31: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/31.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOway
lib_sen_moway.c
![Page 32: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/32.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayCompilation
Si il n’y a pas d’erreur, le
fichier HEX est prêt à être
envoyé au mOway à l’aide de Moway GUI.
![Page 33: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/33.jpg)
Programmation du mOway
1. Démarche2. AlgoStudio3. MPLAB4. Moway GUI5. Moway
Sommaire
![Page 34: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/34.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayIntégration
Sélectionnez le fichier HEX
généré par MPLAB.
Vérifiez le transfert du
programme et la charge du moway.
![Page 35: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/35.jpg)
Programmation du mOway
1. Démarche2. AlgoStudio3. MPLAB4. Moway GUI5. Moway
Sommaire
![Page 36: Programmation du mOway](https://reader036.vdocuments.fr/reader036/viewer/2022081420/56815ebe550346895dcd414a/html5/thumbnails/36.jpg)
1. Démarche2. Algo Studio3. MPLAB4. Moway GUI5. Moway
Programmation du mOwayTests
Pour lancez le programme, il faut retirer le cordon USB et mettre le moway sous tension.