TP3_2GII

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mohamedwajdi
Date:
Tue Oct 11 07:49:07 2022 +0000
Commit message:
TP3

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 11 07:49:07 2022 +0000
@@ -0,0 +1,18 @@
+
+//----------------------   08_TP4_Ex1_1    ----------------------------
+// Affichage d'un chiffre hexadécimal (de 0 à F) toutes  les secondes 
+//---------------------------------------------------------------------
+#include "mbed.h"
+BusOut   Aff_7Seg(PB_3, PA_15, PA_12, PA_11, PA_10, PA_9, PA_8);
+BusOut   D(PB_12,PB_13,PB_14,PB_15);
+int Caract_7Seg[] = {0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 
+                     0x7F, 0x6F, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71 };
+char Compteur;
+int main() {
+    D=1;  // 1er Aff ->D=1,  2eme Aff ->D=2, 3eme Aff->D=4, 4eme Aff->D=8
+    while(1) {
+        Aff_7Seg = Caract_7Seg[(Compteur++)%16 ];
+        wait(1);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 11 07:49:07 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file