STM32F103C8_Barrido_Display Barrido de un Display de Ánodo Común

Dependencies:   mbed

Committer:
Antulius
Date:
Wed Nov 13 00:51:19 2019 +0000
Revision:
2:49e089d4d1ac
Parent:
1:dc2ae76df12d
barrido del teclado

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Antulius 0:9f7581d1af6f 1 /* ###########################################################################
Antulius 0:9f7581d1af6f 2 ** Archivo : main.c
Antulius 2:49e089d4d1ac 3 ** Proyecto : STM32-F103C8_Barrido_Teclado
Antulius 0:9f7581d1af6f 4 ** Procesador : STM32F103C8
Antulius 0:9f7581d1af6f 5 ** Herramienta : Mbed
Antulius 0:9f7581d1af6f 6 ** Version : Driver 01.01
Antulius 0:9f7581d1af6f 7 ** Compilador : GNU C Compiler
Antulius 0:9f7581d1af6f 8 ** Fecha/Hora : 14-07-2015, 11:48, # CodeGen: 0
Antulius 0:9f7581d1af6f 9 ** Descripción :
Antulius 0:9f7581d1af6f 10 ** Este proyecto hace...
Antulius 0:9f7581d1af6f 11 ** This module contains user's application code.
Antulius 0:9f7581d1af6f 12 ** Componentes : GPIO, Timer, etc .
Antulius 0:9f7581d1af6f 13 ** Configuraciones : Includes, Stacks y Drivers externos
Antulius 0:9f7581d1af6f 14 ** Autores :
Antulius 0:9f7581d1af6f 15 ** ATEAM Development Group:
Antulius 0:9f7581d1af6f 16 ** - Antulio Morgado Valle
Antulius 0:9f7581d1af6f 17 **
Antulius 0:9f7581d1af6f 18 ** Versión : Beta
Antulius 0:9f7581d1af6f 19 ** Revisión : A
Antulius 0:9f7581d1af6f 20 ** Release : 0
Antulius 0:9f7581d1af6f 21 ** Bugs & Fixes :
Antulius 0:9f7581d1af6f 22 ** Date : 20/10/2019
Antulius 0:9f7581d1af6f 23 ** Added support for Led_RGB
Antulius 0:9f7581d1af6f 24 ** 22/09/2018
Antulius 0:9f7581d1af6f 25 ** Added LCD Menu, Beta version (with bugs)
Antulius 0:9f7581d1af6f 26 **
Antulius 0:9f7581d1af6f 27 ** ###########################################################################*/
Antulius 0:9f7581d1af6f 28 /*
Antulius 0:9f7581d1af6f 29 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Antulius 0:9f7581d1af6f 30 : Includes
Antulius 0:9f7581d1af6f 31 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Antulius 0:9f7581d1af6f 32 */
Antulius 2:49e089d4d1ac 33 #include "stm32f103c8t6.h"
Antulius 0:9f7581d1af6f 34 #include "mbed.h"
Antulius 0:9f7581d1af6f 35 //#include "Led_RGB.h"
Antulius 0:9f7581d1af6f 36 //#include "Serial.h"
Antulius 0:9f7581d1af6f 37 //#include "stdio.h"
Antulius 0:9f7581d1af6f 38
Antulius 0:9f7581d1af6f 39 /*
Antulius 0:9f7581d1af6f 40 :...............................................................................
Antulius 0:9f7581d1af6f 41 : Definiciones
Antulius 0:9f7581d1af6f 42 :...............................................................................
Antulius 0:9f7581d1af6f 43 */
Antulius 1:dc2ae76df12d 44 #define on 0 // Estado para boton presionado
Antulius 1:dc2ae76df12d 45 #define off 1 // Estado para boton sin presionar
Antulius 1:dc2ae76df12d 46 #define hold 2 // Estado para boton mantenido
Antulius 1:dc2ae76df12d 47 #define release 3 // Estado para boton liberado
Antulius 1:dc2ae76df12d 48 #define TRUE 1
Antulius 1:dc2ae76df12d 49 #define FALSE 0
Antulius 1:dc2ae76df12d 50 #define Ticker_Period 1000 // Periodo de Tiempo del Ticker (us)
Antulius 1:dc2ae76df12d 51 #define Rate_Period 2 // Tiempo de Encendido de los Digitos (ms)
Antulius 1:dc2ae76df12d 52 #define Scan_Time 2 // Tiempo de Barrido del Display (ms)
Antulius 1:dc2ae76df12d 53 #define Shift_Time 2 // Tiempo de corrimiento (x Counter_Time)
Antulius 1:dc2ae76df12d 54 #define Counter_Time 100 // Tiempo de counter (ms)
Antulius 1:dc2ae76df12d 55 #define String_Size 20 // Tamaño del Buffer de Caracteres
Antulius 1:dc2ae76df12d 56 #define Digit_Null 0xFF // Valor para apagar los Segmentos
Antulius 1:dc2ae76df12d 57 #define Degree_Symbol 0x0F // Valor para el Símbolo de Grados
Antulius 1:dc2ae76df12d 58 #define DO2 0.0078125 // 128 Hz (Escala Filosófica)
Antulius 1:dc2ae76df12d 59 #define DOs2 0.0073740180703125 // 136 Hz
Antulius 1:dc2ae76df12d 60 #define RE2 0.006960146234375 // 144 Hz
Antulius 1:dc2ae76df12d 61 #define REs2 0.0065695032421875 // 152 Hz
Antulius 1:dc2ae76df12d 62 #define MI2 0.006200785359375 // 161 Hz
Antulius 1:dc2ae76df12d 63 #define FA2 0.005852762015625 // 171 Hz
Antulius 1:dc2ae76df12d 64 #define FAs2 0.0055242717265625 // 181 Hz
Antulius 1:dc2ae76df12d 65 #define SOL2 0.0052142181796875 // 192 Hz
Antulius 1:dc2ae76df12d 66 #define SOLs2 0.0049215666015625 // 203 Hz
Antulius 1:dc2ae76df12d 67 #define LA2 0.004645340296875 // 215 Hz
Antulius 1:dc2ae76df12d 68 #define LAs2 0.004384617375 // 228 Hz
Antulius 1:dc2ae76df12d 69 #define SI2 0.0041385277109375 // 242 Hz
Antulius 1:dc2ae76df12d 70 #define DO3 0.00390625 // 256 Hz
Antulius 1:dc2ae76df12d 71 #define DOs3 0.00368700903515625 // 271 Hz
Antulius 1:dc2ae76df12d 72 #define RE3 0.0034800731171875 // 287 Hz
Antulius 1:dc2ae76df12d 73 #define REs3 0.00328475162109375 // 304 Hz
Antulius 1:dc2ae76df12d 74 #define MI3 0.0031003926796875 // 323 Hz
Antulius 1:dc2ae76df12d 75 #define FA3 0.0029263810078125 // 342 Hz
Antulius 1:dc2ae76df12d 76 #define FAs3 0.0055242717265625 // 362 Hz
Antulius 1:dc2ae76df12d 77 #define SOL3 0.00260710908984375 // 384 Hz
Antulius 1:dc2ae76df12d 78 #define SOLs3 0.00246078330078125 // 406 Hz
Antulius 1:dc2ae76df12d 79 #define LA3 0.0023226701484375 // 431 Hz
Antulius 1:dc2ae76df12d 80 #define LAs3 0.0021923086875 // 456 Hz
Antulius 1:dc2ae76df12d 81 #define SI3 0.00206926385546875 // 483 Hz
Antulius 1:dc2ae76df12d 82 #define DO4 0.00390625 // 512 Hz
Antulius 1:dc2ae76df12d 83 #define DOs4 0.001843504517578125 // 542 Hz
Antulius 1:dc2ae76df12d 84 #define RE4 0.00174003655859375 // 575 Hz
Antulius 1:dc2ae76df12d 85 #define REs4 0.001642375810546875 // 609 Hz
Antulius 1:dc2ae76df12d 86 #define MI4 0.00155019633984375 // 645 Hz
Antulius 1:dc2ae76df12d 87 #define FA4 0.00146319050390625 // 683 Hz
Antulius 1:dc2ae76df12d 88 #define FAs4 0.001381067931640625 // 724 Hz
Antulius 1:dc2ae76df12d 89 #define SOL4 0.001303554544921875 // 767 Hz
Antulius 1:dc2ae76df12d 90 #define SOLs4 0.001230391650390625 // 813 Hz
Antulius 1:dc2ae76df12d 91 #define LA4 0.00116133507421875 // 861 Hz
Antulius 1:dc2ae76df12d 92 #define LAs4 0.00109615434375 // 912 Hz
Antulius 1:dc2ae76df12d 93 #define SI4 0.001034631927734375 // 966 Hz
Antulius 1:dc2ae76df12d 94 #define DO5 0.001953125 // 1024 Hz
Antulius 0:9f7581d1af6f 95 /*
Antulius 0:9f7581d1af6f 96 +-------------------------------------------------------------------------------
Antulius 0:9f7581d1af6f 97 | Configuración de Puertos
Antulius 0:9f7581d1af6f 98 +-------------------------------------------------------------------------------
Antulius 0:9f7581d1af6f 99 */
Antulius 2:49e089d4d1ac 100 BusIn Renglones (PA_8, PA_9, PA_10, PA_11); // Definición para los Renglones
Antulius 2:49e089d4d1ac 101 BusOut Anodos (PB_6, PB_7, PB_8, PB_9); // Definición para los Ánodos
Antulius 1:dc2ae76df12d 102 BusOut Catodos (PA_0, PA_1,PA_2,PA_3,PA_4,PA_5,PA_6,PA_7); // Definición para los Cätodos
Antulius 2:49e089d4d1ac 103 DigitalOut Led_Verde (PC_11); // Led de Actividad del Programa
Antulius 2:49e089d4d1ac 104 DigitalOut Led_Rojo (PB_11); // Led de Actividad del Programa
Antulius 2:49e089d4d1ac 105 PwmOut Buzzer (PB_13); // Salida del Buzzer
Antulius 2:49e089d4d1ac 106 Ticker Barrido; // Interrupción por el Temporizador
Antulius 2:49e089d4d1ac 107 // ***** Host PC Terminal Communication channels
Antulius 2:49e089d4d1ac 108 Serial Terminal (PA_2, PA_3); // Inicializa la comunicación serial a la PC (Tx,Rx)
Antulius 2:49e089d4d1ac 109 //Serial Terminal(USBTX, USBRX); // Activa la Terminal a traves del Puerto USB
Antulius 0:9f7581d1af6f 110 /*
Antulius 0:9f7581d1af6f 111 +-------------------------------------------------------------------------------
Antulius 0:9f7581d1af6f 112 | Variables Globales de Usuario
Antulius 0:9f7581d1af6f 113 +-------------------------------------------------------------------------------
Antulius 0:9f7581d1af6f 114 */
Antulius 1:dc2ae76df12d 115 uint16_t Rate=1000;
Antulius 2:49e089d4d1ac 116 // Offset: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
Antulius 2:49e089d4d1ac 117 //Caracter a Desplegar: 0 1 2 3 4 5 6 7 8 9 A b C d E f G h I j K L M n o P q r S t u V W X y Z space a e /e @ ñ [ ] U /U /_ - _ _/_ /= = == ° +/c +n +/c +u o c n /c u ^ ¬ + > ^ / v < v > i +i /i +/i ii +ii # /# J /J -J -/J | || | + /+ F +F /F +/F null ! " # $ % & ' ( ) * + - . / : ; < > ? @
Antulius 2:49e089d4d1ac 118 uint8_t Segmentos[]={0x81,0xE7,0x49,0x43,0x27,0x13,0x11,0xC7,0x01,0x03,0x05,0x31,0x99,0x61,0x19,0x1D,0x91,0x35,0xBD,0xE3,0x2D,0xB9,0x85,0x75,0x71,0x0D,0x07,0x7D,0x13,0x39,0xF1,0xB1,0xA1,0x25,0x23,0x49,0xFF,0x41,0x09,0x03,0x11,0x55,0x99,0xC3,0xA1,0x85,0xDF,0x7F,0xFB,0xDB,0x7B,0x5F,0x5B,0x0F,0x1F,0x8F,0x4F,0x2F,0x71,0x79,0x75,0x73,0xF1,0x3F,0x9F,0xCF,0x6F,0x7D,0xF9,0xF3,0x77,0xFD,0xBF,0xF7,0xEF,0xF5,0xAF,0x6D,0x37,0xE3,0xB9,0x9D,0xC7,0xBD,0xA5,0xE7,0x3D,0x67,0x1D,0x47,0x63,0x39,0x00};
Antulius 1:dc2ae76df12d 119 uint8_t Digitos[]={0x08,0x04,0x02,0x01,0x00,0x0F}; // Millares, Centenas, Decenas, Unidades, Apagados, Encendidos
Antulius 1:dc2ae76df12d 120 uint8_t Numeros[]={1,0,2,4};
Antulius 1:dc2ae76df12d 121 uint8_t Cadena[]={33,0,21,10,36,14,28,18,22,36,35,10,12,10,29,14,23,12,24,36,36};
Antulius 1:dc2ae76df12d 122 uint8_t Tecla[]={1,2,3,10,4,5,6,11,7,8,9,12,75,0,74,13};
Antulius 1:dc2ae76df12d 123 uint8_t Boton[]={1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1};
Antulius 1:dc2ae76df12d 124 uint8_t Boton_Ant[]={1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1};
Antulius 1:dc2ae76df12d 125 uint8_t Edo_Boton[]={off,off,off,off, off,off,off,off, off,off,off,off, off,off,off,off};
Antulius 1:dc2ae76df12d 126 uint8_t Renglon[]={0,0,0,0};
Antulius 1:dc2ae76df12d 127 uint8_t punto_decimal=0; //Posición del punto decimal: 0=sin punto, 1=unidades, 2=decenas, 3=centemas 4=millares,
Antulius 1:dc2ae76df12d 128 uint8_t cont_1ms;
Antulius 1:dc2ae76df12d 129 uint8_t cont_10ms;
Antulius 1:dc2ae76df12d 130 uint8_t cont_100ms;
Antulius 1:dc2ae76df12d 131 uint8_t cont_1s;
Antulius 1:dc2ae76df12d 132 uint8_t scan_rate=25;
Antulius 1:dc2ae76df12d 133 uint8_t shift_rate=0;
Antulius 1:dc2ae76df12d 134 uint16_t counter=250;
Antulius 1:dc2ae76df12d 135 uint8_t i=0;
Antulius 1:dc2ae76df12d 136 uint8_t j=0;
Antulius 1:dc2ae76df12d 137 uint8_t valor=0;
Antulius 1:dc2ae76df12d 138 uint8_t nchar=0;
Antulius 1:dc2ae76df12d 139 bool flag1=FALSE;
Antulius 1:dc2ae76df12d 140 bool flag2=FALSE;
Antulius 1:dc2ae76df12d 141 bool Blinking=FALSE;
Antulius 1:dc2ae76df12d 142 bool mode=0;
Antulius 0:9f7581d1af6f 143
Antulius 0:9f7581d1af6f 144 /*
Antulius 0:9f7581d1af6f 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Antulius 0:9f7581d1af6f 146 | Definición de Funciones Prototipo y Rutinas de los Vectores de Interrupción
Antulius 0:9f7581d1af6f 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Antulius 0:9f7581d1af6f 148 */
Antulius 1:dc2ae76df12d 149 void Barrido_OnInterrupt(void);
Antulius 1:dc2ae76df12d 150 void Buzzer_SetPeriodMode(float Periodo,bool Estado);
Antulius 0:9f7581d1af6f 151 /*
Antulius 0:9f7581d1af6f 152 #===============================================================================
Antulius 0:9f7581d1af6f 153 |
Antulius 0:9f7581d1af6f 154 | P R O G R A M A P R I N C I P A L
Antulius 0:9f7581d1af6f 155 |
Antulius 0:9f7581d1af6f 156 #===============================================================================
Antulius 0:9f7581d1af6f 157 */
Antulius 1:dc2ae76df12d 158 int main()
Antulius 1:dc2ae76df12d 159 {
Antulius 1:dc2ae76df12d 160 // Inicialización de variables, puertos e interrupciones
Antulius 2:49e089d4d1ac 161 confSysClock(); // Configure system clock (72MHz HSE clock, 48MHz USB clock)
Antulius 1:dc2ae76df12d 162 Barrido.attach_us(&Barrido_OnInterrupt, Ticker_Period); // Periodo de Interrupción del Timer = 1ms (Ticker_Period=1000)
Antulius 2:49e089d4d1ac 163 Renglones.mode(PullUp); // Habilita los Pull-Up's de las entradas de los renglones
Antulius 2:49e089d4d1ac 164 Terminal.baud(115200); // Establece la velocidad de Transmisión de la Terminal
Antulius 2:49e089d4d1ac 165 Terminal.printf("\e[2J"); // Clear Screen
Antulius 2:49e089d4d1ac 166 Terminal.printf(" System is Wake Up!.\n\r"); // e inicia la comunicación serial
Antulius 2:49e089d4d1ac 167 Terminal.printf ("\t\e[1;37;41mInstituto Politecnico Nacional\e[0m\n\r");
Antulius 2:49e089d4d1ac 168 Terminal.printf ("\e[1;37;42mESCUELA SUPERIOR DE INGENIERIA MECANICA Y ELECTRICA\e[0m\n\r\v");
Antulius 2:49e089d4d1ac 169 Terminal.printf ("\t\e[1;34;40mBarrido \e[1;37;40mdel \e[1;31;40mDisplay \e[1;33;40mde \e[1;32;40m7 Segmentos\e[0m \e[1;35;40my \e[1;36;40mTeclado \n\r\v\v\e[0m");
Antulius 2:49e089d4d1ac 170 while (TRUE)
Antulius 2:49e089d4d1ac 171 { //El Programa principal está aquí !!!
Antulius 2:49e089d4d1ac 172 nchar=0; // Inicializa el contador de caracteres a desplegar
Antulius 2:49e089d4d1ac 173 if (flag1==TRUE)
Antulius 2:49e089d4d1ac 174 {
Antulius 2:49e089d4d1ac 175 // Buzzer_SetPeriodMode(LA4,FALSE);// Apaga el Buzzer
Antulius 2:49e089d4d1ac 176 // Buzzer=off; // Apaga el Buzzer
Antulius 2:49e089d4d1ac 177 //------------------ Barrido de los Digitos ------------------------
Antulius 2:49e089d4d1ac 178 Anodos=Digitos[4]; // Apaga todos los Digitos (Evita fantasmas)
Antulius 2:49e089d4d1ac 179 Catodos=Segmentos[Numeros[i]]; // Escribe los segmentos del Dígito
Antulius 2:49e089d4d1ac 180 if (i==4-punto_decimal) Catodos=(Segmentos[Numeros[i]]& 0xFE); // Enciende el punto decimal
Antulius 2:49e089d4d1ac 181 Anodos=Digitos[i]; // Activa el Dígito/columna
Antulius 2:49e089d4d1ac 182 //------------------ Barrido del Teclado ---------------------------
Antulius 2:49e089d4d1ac 183 valor=Renglones; // Lee los renglones. Posibles valores: 0xFF,0xFE,0xFD,0xFB,0xF7
Antulius 2:49e089d4d1ac 184 if (valor==0x0E)
Antulius 2:49e089d4d1ac 185 {
Antulius 2:49e089d4d1ac 186 if (i==0) printf ("Tecla=1\r");
Antulius 2:49e089d4d1ac 187 if (i==1) printf ("Tecla=2\r");
Antulius 2:49e089d4d1ac 188 if (i==2) printf ("Tecla=3\r");
Antulius 2:49e089d4d1ac 189 if (i==3) printf ("Tecla=F1\r");
Antulius 2:49e089d4d1ac 190 }
Antulius 2:49e089d4d1ac 191 if (valor==0x0D)
Antulius 2:49e089d4d1ac 192 {
Antulius 2:49e089d4d1ac 193 if (i==0) printf ("Tecla=4\r");
Antulius 2:49e089d4d1ac 194 if (i==1) printf ("Tecla=5\r");
Antulius 2:49e089d4d1ac 195 if (i==2) printf ("Tecla=6\r");
Antulius 2:49e089d4d1ac 196 if (i==3) printf ("Tecla=F2\r");
Antulius 2:49e089d4d1ac 197 }
Antulius 2:49e089d4d1ac 198 if (valor==0x0B)
Antulius 2:49e089d4d1ac 199 {
Antulius 2:49e089d4d1ac 200 if (i==0) printf ("Tecla=7\r");
Antulius 2:49e089d4d1ac 201 if (i==1) printf ("Tecla=8\r");
Antulius 2:49e089d4d1ac 202 if (i==2) printf ("Tecla=9\r");
Antulius 2:49e089d4d1ac 203 if (i==3) printf ("Tecla=F3\r");
Antulius 2:49e089d4d1ac 204 }
Antulius 2:49e089d4d1ac 205 if (valor==0x07)
Antulius 2:49e089d4d1ac 206 {
Antulius 2:49e089d4d1ac 207 if (i==0) printf ("Tecla=*\r");
Antulius 2:49e089d4d1ac 208 if (i==1) printf ("Tecla=0\r");
Antulius 2:49e089d4d1ac 209 if (i==2) printf ("Tecla=#\r");
Antulius 2:49e089d4d1ac 210 if (i==3) printf ("Tecla=F4\r");
Antulius 2:49e089d4d1ac 211 }
Antulius 2:49e089d4d1ac 212 if (valor==0x0F)
Antulius 1:dc2ae76df12d 213 {
Antulius 2:49e089d4d1ac 214 if (i==0) printf ("Tecla=H\r");
Antulius 2:49e089d4d1ac 215 if (i==1) printf ("Tecla=O\r");
Antulius 2:49e089d4d1ac 216 if (i==2) printf ("Tecla=L\r");
Antulius 2:49e089d4d1ac 217 if (i==3) printf ("Tecla=A\r");
Antulius 2:49e089d4d1ac 218 }
Antulius 2:49e089d4d1ac 219
Antulius 2:49e089d4d1ac 220 // Renglon[i]=(valor>>i)&1; // Obtiene el valor de cada bit del renglón
Antulius 2:49e089d4d1ac 221 // Boton[i+j]=Renglon[i]; // Llena el renglon-columna correspondiente
Antulius 2:49e089d4d1ac 222 Terminal.printf("Tecla Oprimida: %c\r",valor);
Antulius 2:49e089d4d1ac 223 /* if (Boton[i+j]==1)
Antulius 2:49e089d4d1ac 224 {
Antulius 2:49e089d4d1ac 225 // Buzzer_SetPeriodMode(DO5,TRUE); // Selecciona Tono y lo habilita
Antulius 2:49e089d4d1ac 226 // Buzzer=on; // Enciende el Buzzer
Antulius 2:49e089d4d1ac 227 }
Antulius 2:49e089d4d1ac 228 if ( Boton[i+j] && Boton_Ant[i+j])
Antulius 2:49e089d4d1ac 229 {
Antulius 2:49e089d4d1ac 230 Edo_Boton[i+j]= off; // El Botón está Apagado
Antulius 2:49e089d4d1ac 231 }
Antulius 2:49e089d4d1ac 232 if (!Boton[i+j] && Boton_Ant[i+j])
Antulius 2:49e089d4d1ac 233 {
Antulius 2:49e089d4d1ac 234 Edo_Boton[i+j]= on; // El Botón está Encendido
Antulius 2:49e089d4d1ac 235 }
Antulius 2:49e089d4d1ac 236 if (!Boton[i+j] && !Boton_Ant[i+j])
Antulius 2:49e089d4d1ac 237 {
Antulius 2:49e089d4d1ac 238 Edo_Boton[i+j]= hold; // El Botón está Presionado
Antulius 2:49e089d4d1ac 239 }
Antulius 2:49e089d4d1ac 240 if ( Boton[i+j] && !Boton_Ant[i+j])
Antulius 2:49e089d4d1ac 241 {
Antulius 2:49e089d4d1ac 242 Edo_Boton[i+j]= release; // El Botón está Liberado
Antulius 2:49e089d4d1ac 243 }
Antulius 2:49e089d4d1ac 244 Boton_Ant[i+j]=Boton[i+j]; // Actualiza el valor del botón anterior
Antulius 2:49e089d4d1ac 245 if (valor != 0xFF)
Antulius 2:49e089d4d1ac 246 {
Antulius 2:49e089d4d1ac 247 Numeros[0]= Digit_Null; // Millares
Antulius 2:49e089d4d1ac 248 Numeros[1]= Digit_Null; // Centenas
Antulius 2:49e089d4d1ac 249 Numeros[2]= Digit_Null; // Decenas
Antulius 2:49e089d4d1ac 250 Numeros[3]= Tecla[i+j]; // Unidades
Antulius 2:49e089d4d1ac 251 mode=2;
Antulius 2:49e089d4d1ac 252 }
Antulius 2:49e089d4d1ac 253 */
Antulius 2:49e089d4d1ac 254 i++; // Incrementa la columna
Antulius 2:49e089d4d1ac 255 if (i==4) // Se terminó de barrer las columnas?
Antulius 2:49e089d4d1ac 256 {
Antulius 2:49e089d4d1ac 257 i=0; // Reinicia las columnas
Antulius 2:49e089d4d1ac 258 j=j+4; // Brinca al siguiente renglón
Antulius 2:49e089d4d1ac 259 if (j==16) j=0; // Se terminó de barrer los renglones? Reinicia los renglones
Antulius 2:49e089d4d1ac 260
Antulius 2:49e089d4d1ac 261 if (mode==1) // Se va a desplegar un mensaje?
Antulius 2:49e089d4d1ac 262 {
Antulius 2:49e089d4d1ac 263 Numeros[i]=Cadena[i+nchar]; // Cargamos 4 caracteres en el buffer de despliege
Antulius 2:49e089d4d1ac 264 if (nchar >= String_Size) nchar=0; // Restablece el contador de caractres
Antulius 2:49e089d4d1ac 265 }
Antulius 2:49e089d4d1ac 266 if (mode==2) // Se va a desplegar un el valor de la botonera
Antulius 1:dc2ae76df12d 267 {
Antulius 2:49e089d4d1ac 268 if ( Blinking==1) punto_decimal=3; // Activa los puntos del Reloj
Antulius 2:49e089d4d1ac 269 if ( Blinking==0) punto_decimal=0; // Desactiva los puntos del Reloj
Antulius 2:49e089d4d1ac 270 if (i==4-punto_decimal)
Antulius 2:49e089d4d1ac 271 Catodos=Segmentos[Numeros[i]&0xFE]; // Enciende el punto decimal
Antulius 2:49e089d4d1ac 272 Terminal.printf("Tecla Oprimida: %c\r",valor);
Antulius 2:49e089d4d1ac 273 }
Antulius 2:49e089d4d1ac 274 Led_Rojo=!Led_Rojo; // Parpadeo del Led Rojo
Antulius 2:49e089d4d1ac 275 }
Antulius 1:dc2ae76df12d 276
Antulius 2:49e089d4d1ac 277 flag1=FALSE; // Apaga la Bandera 1
Antulius 2:49e089d4d1ac 278 }
Antulius 2:49e089d4d1ac 279 if (flag2==TRUE) // Está puesta la Bandera 2?
Antulius 2:49e089d4d1ac 280 {
Antulius 2:49e089d4d1ac 281 Led_Verde=!Led_Verde; // Parpadeo del Led Verde
Antulius 2:49e089d4d1ac 282 flag2=FALSE; // Apaga la Bandera 2
Antulius 2:49e089d4d1ac 283 }
Antulius 2:49e089d4d1ac 284 }
Antulius 0:9f7581d1af6f 285 }
Antulius 1:dc2ae76df12d 286 /* END main() */
Antulius 0:9f7581d1af6f 287 /*
Antulius 0:9f7581d1af6f 288 ................................................................................
Antulius 0:9f7581d1af6f 289 : Rutinas de los Vectores de Interrupción
Antulius 0:9f7581d1af6f 290 ................................................................................
Antulius 0:9f7581d1af6f 291 */
Antulius 2:49e089d4d1ac 292 void Barrido_OnInterrupt() // Rutina de Atención al Ticker
Antulius 0:9f7581d1af6f 293 {
Antulius 2:49e089d4d1ac 294 cont_1ms++; // Incrmenta el contador de milisegundos
Antulius 2:49e089d4d1ac 295 scan_rate--; // Decrementa el tiempo de despliege
Antulius 2:49e089d4d1ac 296 counter--; // Decrementa el contador de eventos
Antulius 1:dc2ae76df12d 297 if(!scan_rate) // Se terminó el tiempo de barrido
Antulius 1:dc2ae76df12d 298 {
Antulius 1:dc2ae76df12d 299 scan_rate=Rate_Period; // Restablece el tiempo de barrido?
Antulius 1:dc2ae76df12d 300 flag1=TRUE; // Enciende la bandera para las rutinas de despliege y teclado
Antulius 1:dc2ae76df12d 301 }
Antulius 1:dc2ae76df12d 302 if (cont_1ms>=10)
Antulius 1:dc2ae76df12d 303 {
Antulius 1:dc2ae76df12d 304 cont_10ms++;
Antulius 1:dc2ae76df12d 305 cont_1ms=0;
Antulius 1:dc2ae76df12d 306 }
Antulius 1:dc2ae76df12d 307 if (cont_10ms>=10)
Antulius 1:dc2ae76df12d 308 {
Antulius 1:dc2ae76df12d 309 cont_100ms++;
Antulius 1:dc2ae76df12d 310 cont_10ms=0;
Antulius 1:dc2ae76df12d 311 }
Antulius 1:dc2ae76df12d 312 if (cont_100ms>=10)
Antulius 0:9f7581d1af6f 313 {
Antulius 1:dc2ae76df12d 314 cont_1s++;
Antulius 1:dc2ae76df12d 315 cont_100ms=0;
Antulius 1:dc2ae76df12d 316 }
Antulius 1:dc2ae76df12d 317 if (cont_1s>=10)
Antulius 1:dc2ae76df12d 318 {
Antulius 1:dc2ae76df12d 319 cont_1s=0;
Antulius 1:dc2ae76df12d 320 }
Antulius 1:dc2ae76df12d 321 if (!counter) // Se terminó de contar?
Antulius 1:dc2ae76df12d 322 {
Antulius 1:dc2ae76df12d 323 counter=500; // Restablece el contador
Antulius 1:dc2ae76df12d 324 Blinking= !Blinking; // Parpadeo
Antulius 1:dc2ae76df12d 325 shift_rate --; // Decrementa el tiempo del corrimiento
Antulius 1:dc2ae76df12d 326 flag2=TRUE; // Prende la bandera para realizar un desplazamiento
Antulius 1:dc2ae76df12d 327 }
Antulius 1:dc2ae76df12d 328 if (!shift_rate) // Se terminó el tiempo de corrimiento?
Antulius 1:dc2ae76df12d 329 {
Antulius 1:dc2ae76df12d 330 mode=!mode; // Tiempo entre desplazamientos del mensaje
Antulius 1:dc2ae76df12d 331 shift_rate = Shift_Time; // Restablece el tiempo de los corrimientos
Antulius 1:dc2ae76df12d 332 }
Antulius 1:dc2ae76df12d 333 }
Antulius 1:dc2ae76df12d 334 /* END Events */
Antulius 1:dc2ae76df12d 335
Antulius 0:9f7581d1af6f 336 /*
Antulius 0:9f7581d1af6f 337 ________________________________________________________________________________
Antulius 0:9f7581d1af6f 338 |
Antulius 0:9f7581d1af6f 339 | Funciones Prototipo
Antulius 0:9f7581d1af6f 340 |_______________________________________________________________________________
Antulius 0:9f7581d1af6f 341 */
Antulius 0:9f7581d1af6f 342 // Las Funciones Prototipo van aquí !
Antulius 1:dc2ae76df12d 343 void Buzzer_SetPeriodMode(float Periodo,bool Estado)
Antulius 0:9f7581d1af6f 344 {
Antulius 1:dc2ae76df12d 345 Buzzer.period(Periodo);
Antulius 1:dc2ae76df12d 346 Buzzer.pulsewidth(Periodo/2);
Antulius 1:dc2ae76df12d 347 if (Estado==1)Buzzer=0.5;
Antulius 1:dc2ae76df12d 348 if (Estado==0)Buzzer=0.0;
Antulius 0:9f7581d1af6f 349 }
Antulius 0:9f7581d1af6f 350
Antulius 1:dc2ae76df12d 351 /* END Routines */
Antulius 0:9f7581d1af6f 352
Antulius 1:dc2ae76df12d 353 /* END program */
Antulius 2:49e089d4d1ac 354 /*+-----------------------------------------------------------------------------
Antulius 2:49e089d4d1ac 355 *+ CD4041 Quad Buffer/Inverter
Antulius 2:49e089d4d1ac 356 *+------------------------------------------------------------------------------
Antulius 2:49e089d4d1ac 357 *+
Antulius 2:49e089d4d1ac 358 *+ |\ 1
Antulius 2:49e089d4d1ac 359 *+ | \------- A1
Antulius 2:49e089d4d1ac 360 *+ 3 | \
Antulius 2:49e089d4d1ac 361 *+ PB_12 -----| >
Antulius 2:49e089d4d1ac 362 *+ | / 2
Antulius 2:49e089d4d1ac 363 *+ | /o------ COL1
Antulius 2:49e089d4d1ac 364 *+ |/
Antulius 2:49e089d4d1ac 365 *+
Antulius 2:49e089d4d1ac 366 *+
Antulius 2:49e089d4d1ac 367 *+ |\ 8
Antulius 2:49e089d4d1ac 368 *+ | \------- A2
Antulius 2:49e089d4d1ac 369 *+ 10 | \
Antulius 2:49e089d4d1ac 370 *+ PB_13 -----| >
Antulius 2:49e089d4d1ac 371 *+ | / 9
Antulius 2:49e089d4d1ac 372 *+ | /o------ COL2
Antulius 2:49e089d4d1ac 373 *+ |/
Antulius 2:49e089d4d1ac 374 *+
Antulius 2:49e089d4d1ac 375 *+
Antulius 2:49e089d4d1ac 376 *+ |\ 4
Antulius 2:49e089d4d1ac 377 *+ | \------- A3
Antulius 2:49e089d4d1ac 378 *+ 6 | \
Antulius 2:49e089d4d1ac 379 *+ PB_14 -----| >
Antulius 2:49e089d4d1ac 380 *+ | / 5
Antulius 2:49e089d4d1ac 381 *+ | /o------ COL3
Antulius 2:49e089d4d1ac 382 *+ |/
Antulius 2:49e089d4d1ac 383 *+
Antulius 2:49e089d4d1ac 384 *+
Antulius 2:49e089d4d1ac 385 *+
Antulius 2:49e089d4d1ac 386 *+ |\ 11
Antulius 2:49e089d4d1ac 387 *+ | \------- A4
Antulius 2:49e089d4d1ac 388 *+ 13 | \
Antulius 2:49e089d4d1ac 389 *+ PB_15 -----| >
Antulius 2:49e089d4d1ac 390 *+ | / 12
Antulius 2:49e089d4d1ac 391 *+ | /o------ COL4
Antulius 2:49e089d4d1ac 392 *+ |/
Antulius 2:49e089d4d1ac 393 *+
Antulius 2:49e089d4d1ac 394 *+------------------------------------------------------------------------------
Antulius 1:dc2ae76df12d 395 *+ Descripción del Display de 7 Segmentos de Anodos Comunes en modo multiplexado
Antulius 2:49e089d4d1ac 396 *+------------------------------------------------------------------------------
Antulius 1:dc2ae76df12d 397 *+ 13 12 11 10 9 8
Antulius 1:dc2ae76df12d 398 *+ | | | | | |
Antulius 1:dc2ae76df12d 399 *+ | | | | | |
Antulius 1:dc2ae76df12d 400 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 401 *+ | A a f A A b |
Antulius 1:dc2ae76df12d 402 *+ | 4 3 2 |
Antulius 1:dc2ae76df12d 403 *+ | ______________________________________________ |
Antulius 1:dc2ae76df12d 404 *+ | | ____ ____ _____ _____ | |
Antulius 1:dc2ae76df12d 405 *+ | | / / / / / / / / | |
Antulius 1:dc2ae76df12d 406 *+ | | /____ / /____ / . /____ / /____ / | |
Antulius 1:dc2ae76df12d 407 *+ | | / / / / . / / / / | |
Antulius 1:dc2ae76df12d 408 *+ | | /____ /. /_____/ . /____ /. /____ /. | |
Antulius 1:dc2ae76df12d 409 *+ | | | |
Antulius 1:dc2ae76df12d 410 *+ | |______________________________________________| |
Antulius 1:dc2ae76df12d 411 *+ | |
Antulius 1:dc2ae76df12d 412 *+ | A |
Antulius 1:dc2ae76df12d 413 *+ | e d p c g 1 |
Antulius 1:dc2ae76df12d 414 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 415 *+ | | | | | | |
Antulius 1:dc2ae76df12d 416 *+ | | | | | | |
Antulius 1:dc2ae76df12d 417 *+ 1 2 3 4 5 6 7
Antulius 1:dc2ae76df12d 418 *+
Antulius 1:dc2ae76df12d 419 *+ Display: HS410561K-D30
Antulius 1:dc2ae76df12d 420 *+
Antulius 1:dc2ae76df12d 421 *+
Antulius 1:dc2ae76df12d 422 *+ 13 12 11 10 9 8
Antulius 1:dc2ae76df12d 423 *+ | | | | | |
Antulius 1:dc2ae76df12d 424 *+ | | | | | |
Antulius 1:dc2ae76df12d 425 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 426 *+ | A g f p a b |
Antulius 1:dc2ae76df12d 427 *+ | 4 |
Antulius 1:dc2ae76df12d 428 *+ | ______________________________________________ |
Antulius 1:dc2ae76df12d 429 *+ | | ____ ____ _____ _____ | |
Antulius 1:dc2ae76df12d 430 *+ | | / / / / / / / / | |
Antulius 1:dc2ae76df12d 431 *+ | | /____ / /____ / . /____ / /____ / | |
Antulius 1:dc2ae76df12d 432 *+ | | / / / / . / / / / | |
Antulius 1:dc2ae76df12d 433 *+ | | /____ /. /_____/ /____ /. /____ /. | |
Antulius 1:dc2ae76df12d 434 *+ | | | |
Antulius 1:dc2ae76df12d 435 *+ | |______________________________________________| |
Antulius 1:dc2ae76df12d 436 *+ | |
Antulius 1:dc2ae76df12d 437 *+ | A A A |
Antulius 1:dc2ae76df12d 438 *+ | e 3 2 c d 1 |
Antulius 1:dc2ae76df12d 439 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 440 *+ | | | | | | |
Antulius 1:dc2ae76df12d 441 *+ | | | | | | |
Antulius 1:dc2ae76df12d 442 *+ 1 2 3 4 5 6 7
Antulius 1:dc2ae76df12d 443 *+
Antulius 1:dc2ae76df12d 444 *+ Display: BQ-M544RE
Antulius 1:dc2ae76df12d 445 *+
Antulius 1:dc2ae76df12d 446 *+
Antulius 2:49e089d4d1ac 447 *+ 12 11 10 9 8 7
Antulius 2:49e089d4d1ac 448 *+ | | | | | |
Antulius 2:49e089d4d1ac 449 *+ | | | | | |
Antulius 2:49e089d4d1ac 450 *+ --------------------------------------------------
Antulius 2:49e089d4d1ac 451 *+ | A a f A A b |
Antulius 2:49e089d4d1ac 452 *+ | 4 3 2 |
Antulius 2:49e089d4d1ac 453 *+ | ______________________________________________ |
Antulius 2:49e089d4d1ac 454 *+ | | ____ ____ _____ . _____ | |
Antulius 2:49e089d4d1ac 455 *+ | | / / / / / / / / | |
Antulius 2:49e089d4d1ac 456 *+ | | /____ / /____ / . /____ / /____ / | |
Antulius 2:49e089d4d1ac 457 *+ | | / / / / . / / / / | |
Antulius 2:49e089d4d1ac 458 *+ | | /____ /. /_____/ . /____ /. /____ /. | |
Antulius 2:49e089d4d1ac 459 *+ | | | |
Antulius 2:49e089d4d1ac 460 *+ | |______________________________________________| |
Antulius 2:49e089d4d1ac 461 *+ | |
Antulius 2:49e089d4d1ac 462 *+ | A A |
Antulius 2:49e089d4d1ac 463 *+ | e d p c g 1 |
Antulius 2:49e089d4d1ac 464 *+ --------------------------------------------------
Antulius 2:49e089d4d1ac 465 *+ | | | | | |
Antulius 2:49e089d4d1ac 466 *+ | | | | | | p1 = g
Antulius 2:49e089d4d1ac 467 *+ 1 2 3 4 5 6 p2 = c
Antulius 2:49e089d4d1ac 468 *+ p3 = d
Antulius 2:49e089d4d1ac 469 *+ Display: HS-5463BS p4 = e
Antulius 2:49e089d4d1ac 470 *+ Cátodo Común pu = b
Antulius 2:49e089d4d1ac 471 *+ pd = f
Antulius 2:49e089d4d1ac 472 *+
Antulius 2:49e089d4d1ac 473 *+
Antulius 1:dc2ae76df12d 474 *+ 16 15 14 13 11
Antulius 1:dc2ae76df12d 475 *+ | | | | |
Antulius 1:dc2ae76df12d 476 *+ | | | | |
Antulius 1:dc2ae76df12d 477 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 478 *+ | b g a c f |
Antulius 1:dc2ae76df12d 479 *+ | |
Antulius 1:dc2ae76df12d 480 *+ | ______________________________________________ |
Antulius 1:dc2ae76df12d 481 *+ | | ____ ____ _____ . _____ | |
Antulius 1:dc2ae76df12d 482 *+ | | / / / / / / / / | |
Antulius 1:dc2ae76df12d 483 *+ | | /____ / /____ / . /____ / /____ / | |
Antulius 1:dc2ae76df12d 484 *+ | | / / / / . / / / / | |
Antulius 1:dc2ae76df12d 485 *+ | | /____ /. /_____/ . /____ /. /____ /. | |
Antulius 1:dc2ae76df12d 486 *+ | | | |
Antulius 1:dc2ae76df12d 487 *+ | |______________________________________________| |
Antulius 1:dc2ae76df12d 488 *+ | |
Antulius 1:dc2ae76df12d 489 *+ | A A A A A |
Antulius 2:49e089d4d1ac 490 *+ | 4 3 d p e 2 p 1 |
Antulius 1:dc2ae76df12d 491 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 492 *+ | | | | | | | |
Antulius 1:dc2ae76df12d 493 *+ | | | | | | | |
Antulius 1:dc2ae76df12d 494 *+ 1 2 3 4 5 6 7 8
Antulius 1:dc2ae76df12d 495 *+
Antulius 1:dc2ae76df12d 496 *+ Display: KEM-3942BSR
Antulius 1:dc2ae76df12d 497 *+
Antulius 1:dc2ae76df12d 498 +*
Antulius 1:dc2ae76df12d 499 *+
Antulius 1:dc2ae76df12d 500 *+ 12 11 10 9 8 7
Antulius 1:dc2ae76df12d 501 *+ | | | | | |
Antulius 1:dc2ae76df12d 502 *+ | | | | | |
Antulius 1:dc2ae76df12d 503 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 504 *+ | A a f A A b |
Antulius 1:dc2ae76df12d 505 *+ | 4 3 2 |
Antulius 1:dc2ae76df12d 506 *+ | ______________________________________________ |
Antulius 1:dc2ae76df12d 507 *+ | | ____ ____ _____ _____ | |
Antulius 1:dc2ae76df12d 508 *+ | | / / / / / / / / | |
Antulius 1:dc2ae76df12d 509 *+ | | /____ / /____ / . /____ / /____ / | |
Antulius 1:dc2ae76df12d 510 *+ | | / / / / . / / / / | |
Antulius 1:dc2ae76df12d 511 *+ | | /____ /. /_____/ . /____ /. /____ /. | |
Antulius 1:dc2ae76df12d 512 *+ | | | |
Antulius 1:dc2ae76df12d 513 *+ | |______________________________________________| |
Antulius 1:dc2ae76df12d 514 *+ | |
Antulius 1:dc2ae76df12d 515 *+ | A |
Antulius 1:dc2ae76df12d 516 *+ | e d p c g 1 |
Antulius 1:dc2ae76df12d 517 *+ --------------------------------------------------
Antulius 1:dc2ae76df12d 518 *+ | | | | | |
Antulius 1:dc2ae76df12d 519 *+ | | | | | |
Antulius 1:dc2ae76df12d 520 *+ 1 2 3 4 5 6
Antulius 1:dc2ae76df12d 521 *+
Antulius 1:dc2ae76df12d 522 *+ Display: FYQ-2841BH
Antulius 1:dc2ae76df12d 523 *+
Antulius 1:dc2ae76df12d 524 *+
Antulius 2:49e089d4d1ac 525 *+ FRDM-KL46Z PTA17 PTA16 PTA15 PTA14
Antulius 2:49e089d4d1ac 526 *+ STM32-F103C8 PB_15 PB_14 PB_13 PB_12
Antulius 1:dc2ae76df12d 527 *+ A4 A3 A2 A1
Antulius 1:dc2ae76df12d 528 *+ Mill Cent Dec Uni
Antulius 0:9f7581d1af6f 529 *+
Antulius 2:49e089d4d1ac 530 *+ FRDM_KL25Z PTE23 PTE22 PTE21 PTE20 PTE5 PTE4 PTE3 PTE2 # Hex Offset
Antulius 2:49e089d4d1ac 531 *+ FRDM-KL46Z PTE23 PTE22 PTE21 PTE20 PTE19 PTE18 PTE17 PTE16 # Hex Offset
Antulius 2:49e089d4d1ac 532 *+ STM32-F103C8 PA_8 PA_9 PA_10 PA_11 PA_12 PA_15 PB_3 PB_4 # Hex Offset
Antulius 1:dc2ae76df12d 533 *+ a
Antulius 1:dc2ae76df12d 534 *+ ______ g f a b c d e p
Antulius 1:dc2ae76df12d 535 *+ / / 1 0 0 0 1 0 0 0 0 0x81 0
Antulius 1:dc2ae76df12d 536 *+ f / g / b 1 1 0 1 1 1 1 0 1 0xE7 1
Antulius 1:dc2ae76df12d 537 *+ /_____/ 1 0 1 1 0 1 0 0 2 0x49 2
Antulius 1:dc2ae76df12d 538 *+ / / 1 0 0 1 0 1 0 0 3 0x43 3
Antulius 1:dc2ae76df12d 539 *+ e / / c 1 1 0 1 0 0 1 0 4 0x27 4
Antulius 1:dc2ae76df12d 540 *+ /_____/ . 1 0 0 1 0 0 0 1 5 0x13 5
Antulius 1:dc2ae76df12d 541 *+ d p 1 0 0 0 0 0 0 1 6 0x11 6
Antulius 1:dc2ae76df12d 542 *+ 1 1 0 1 1 1 0 0 7 0xC7 7
Antulius 1:dc2ae76df12d 543 *+ 1 0 0 0 0 0 0 0 8 0x01 8
Antulius 1:dc2ae76df12d 544 *+ 1 0 0 1 0 0 0 0 9 0x03 9
Antulius 1:dc2ae76df12d 545 *+ 1 1 0 0 0 0 0 0 A 0x05 10
Antulius 1:dc2ae76df12d 546 *+ 1 0 0 0 0 0 1 1 b 0x31 11
Antulius 1:dc2ae76df12d 547 *+ 1 0 1 0 1 0 0 1 C 0x99 12
Antulius 1:dc2ae76df12d 548 *+ 1 0 0 0 0 1 1 0 d 0x61 13
Antulius 1:dc2ae76df12d 549 *+ 1 0 1 0 0 0 0 1 E 0x19 14
Antulius 1:dc2ae76df12d 550 *+ 1 1 1 0 0 0 0 1 f 0x1D 15
Antulius 1:dc2ae76df12d 551 *+ 1 0 0 0 1 0 0 1 G 0x91 16
Antulius 1:dc2ae76df12d 552 *+ 1 1 0 0 0 0 1 1 h 0x35 17
Antulius 1:dc2ae76df12d 553 *+ 1 1 0 1 1 1 1 1 i 0xBD 18
Antulius 2:49e089d4d1ac 554 *+ 1 0 0 0 1 1 1 0 J 0xE3 19
Antulius 1:dc2ae76df12d 555 *+ 1 0 1 0 0 0 1 0 k 0x2D 20
Antulius 1:dc2ae76df12d 556 *+ 1 0 1 0 1 0 1 1 L 0xB9 21
Antulius 1:dc2ae76df12d 557 *+ 1 1 0 0 1 0 0 0 M 0x85 22
Antulius 1:dc2ae76df12d 558 *+ 1 1 0 0 0 1 1 1 n 0x75 23
Antulius 1:dc2ae76df12d 559 *+ 1 0 0 0 0 1 1 1 o 0x71 24
Antulius 1:dc2ae76df12d 560 *+ 1 1 1 0 0 0 0 0 P 0x0D 25
Antulius 1:dc2ae76df12d 561 *+ 1 1 0 1 0 0 0 0 q 0x07 26
Antulius 2:49e089d4d1ac 562 *+ 1 1 1 0 0 1 1 1 r 0x7D 27
Antulius 1:dc2ae76df12d 563 *+ 1 0 0 1 0 0 0 1 s 0x13 28
Antulius 1:dc2ae76df12d 564 *+ 1 0 1 0 0 0 1 1 t 0x39 29
Antulius 1:dc2ae76df12d 565 *+ 1 0 0 0 1 1 1 1 u 0xF1 30
Antulius 2:49e089d4d1ac 566 *+ 1 0 0 0 1 0 1 1 V 0xB1 31
Antulius 1:dc2ae76df12d 567 *+ 1 0 0 0 1 0 1 0 w 0xA1 32
Antulius 1:dc2ae76df12d 568 *+ 1 1 0 0 1 0 1 0 X 0x25 33
Antulius 2:49e089d4d1ac 569 *+ 1 0 0 1 0 0 1 0 y 0x23 34
Antulius 1:dc2ae76df12d 570 *+ 1 0 1 0 1 1 0 0 Z 0x49 35
Antulius 2:49e089d4d1ac 571 *+ 1 1 1 1 1 1 1 1 space 0xFF 36
Antulius 2:49e089d4d1ac 572 *+ 0 1 0 0 0 0 0 1 a 0x41 37
Antulius 2:49e089d4d1ac 573 *+ 0 0 0 0 1 0 0 1 e 0x09 38
Antulius 2:49e089d4d1ac 574 *+ 0 0 0 0 0 0 1 1 /e 0x03 39
Antulius 2:49e089d4d1ac 575 *+ 0 0 0 1 0 0 0 1 @ 0x11 40
Antulius 2:49e089d4d1ac 576 *+ 0 1 0 1 0 1 0 1 ñ 0x55 41
Antulius 2:49e089d4d1ac 577 *+ 1 0 0 1 1 0 0 1 [ 0x99 42
Antulius 2:49e089d4d1ac 578 *+ 0 0 0 0 1 0 0 1 ] 0xC3 43
Antulius 2:49e089d4d1ac 579 *+ 1 0 1 0 0 0 0 1 U 0xA1 44
Antulius 2:49e089d4d1ac 580 *+ 1 0 0 0 0 1 0 1 /U 0x85 45
Antulius 2:49e089d4d1ac 581 *+ 1 1 0 1 1 1 1 1 /_ 0xDF 46
Antulius 2:49e089d4d1ac 582 *+ 0 1 1 1 1 1 1 1 - 0x7F 47
Antulius 2:49e089d4d1ac 583 *+ 1 1 1 1 1 0 1 1 _ 0xFB 48
Antulius 2:49e089d4d1ac 584 *+ 1 1 0 1 1 0 1 1 _/_ 0xDB 49
Antulius 2:49e089d4d1ac 585 *+ 0 1 1 1 1 0 1 1 /= 0x7B 50
Antulius 2:49e089d4d1ac 586 *+ 0 1 0 1 1 1 1 1 = 0x5F 51
Antulius 2:49e089d4d1ac 587 *+ 0 1 0 1 1 0 1 1 == 0x5B 52
Antulius 2:49e089d4d1ac 588 *+ 0 0 0 0 1 1 1 1 ° 0x0F 53
Antulius 1:dc2ae76df12d 589 *+ 1 1 1 1 0 0 0 1 + c 0xF1 38
Antulius 1:dc2ae76df12d 590 *+ 1 1 1 1 0 1 0 0 +/c 0xF4 39
Antulius 1:dc2ae76df12d 591 *+ 1 0 1 0 0 1 1 1 c 0xA7 40
Antulius 1:dc2ae76df12d 592 *+ 1 0 0 1 0 1 1 1 /c 0x97 41
Antulius 1:dc2ae76df12d 593 *+ 1 1 1 1 0 0 1 0 + u 0xF2 42
Antulius 1:dc2ae76df12d 594 *+ 1 1 1 1 1 0 0 0 + n 0xF8 43
Antulius 1:dc2ae76df12d 595 *+ 1 0 1 0 1 0 0 1 [ 0xA9 44
Antulius 1:dc2ae76df12d 596 *+ 1 0 0 1 1 1 0 0 ] 0x9C 45
Antulius 1:dc2ae76df12d 597 *+ 1 1 1 1 0 0 0 0 ° 0xF0 46
Antulius 1:dc2ae76df12d 598 *+ 1 1 1 1 1 1 0 0 ¬ 0xFC 47
Antulius 1:dc2ae76df12d 599 *+ 1 1 1 1 0 1 1 0 + > 0xF6 48
Antulius 1:dc2ae76df12d 600 *+ 1 1 1 0 0 1 1 1 ^ 0xE7 49
Antulius 1:dc2ae76df12d 601 *+ 1 0 1 0 1 1 1 1 / < 0xAF 50
Antulius 1:dc2ae76df12d 602 *+ 1 0 0 1 1 1 1 1 / v 0x9F 51
Antulius 1:dc2ae76df12d 603 *+ 1 1 0 1 0 1 1 1 > 0xD7 52
Antulius 1:dc2ae76df12d 604 *+ 1 1 1 1 0 0 1 1 v 0xF3 53
Antulius 1:dc2ae76df12d 605 *+ 1 1 1 1 1 0 0 1 < 0xF9 54
Antulius 1:dc2ae76df12d 606 *+ 1 1 1 1 1 1 0 1 / _ 0xBF 55
Antulius 1:dc2ae76df12d 607 *+ 1 1 1 1 0 1 1 1 - 0xF7 56
Antulius 1:dc2ae76df12d 608 *+ 1 0 1 1 1 1 1 1 _ 0xFD 57
Antulius 1:dc2ae76df12d 609 *+ 1 1 1 1 0 1 0 1 = 0xF5 58
Antulius 1:dc2ae76df12d 610 *+ 1 0 1 1 0 1 1 1 / = 0xB7 59
Antulius 1:dc2ae76df12d 611 *+ 1 0 1 1 0 1 0 1 == 0xB5 60
Antulius 1:dc2ae76df12d 612 *+ 1 0 1 1 1 1 0 1 _¬ 0xBD 61
Antulius 1:dc2ae76df12d 613 *+ 1 1 0 0 1 1 1 1 ii 0xCF 62
Antulius 1:dc2ae76df12d 614 *+ 1 1 1 1 1 0 1 0 # 0xFA 63
Antulius 1:dc2ae76df12d 615 *+ 1 0 0 1 1 1 1 0 j 0x9E 64
Antulius 1:dc2ae76df12d 616 *+ 1 1 0 1 1 1 0 0 /j 0xDC 65
Antulius 1:dc2ae76df12d 617 *+ 1 1 1 0 1 0 0 1 - j 0xE9 66
Antulius 1:dc2ae76df12d 618 *+ 1 0 1 0 1 0 1 1 -/j 0xAB 67
Antulius 1:dc2ae76df12d 619 *+ 1 0 0 0 1 1 1 0 - J 0x8E 68
Antulius 1:dc2ae76df12d 620 *+ 1 1 0 1 1 0 0 0 -/J 0xD8 69
Antulius 1:dc2ae76df12d 621 *+ 1 1 1 0 1 0 1 1 | 0xEB 70
Antulius 1:dc2ae76df12d 622 *+ 1 1 0 0 1 0 1 0 || 0xCA 71
Antulius 1:dc2ae76df12d 623 *+ 1 1 0 1 0 1 1 0 + 0xD6 72
Antulius 1:dc2ae76df12d 624 *+ 1 1 1 0 0 0 1 1 /+ 0xE3 73
Antulius 1:dc2ae76df12d 625 *+ 1 0 0 1 1 0 1 1 espacio 0xFF 74
Antulius 0:9f7581d1af6f 626 *+
Antulius 1:dc2ae76df12d 627 *+ Nota: Cada dígito se activa al hacer la señal A correspondiente en "alto"
Antulius 1:dc2ae76df12d 628 *+ y enviar las señales de los segmentos que se desean encender en "bajo"
Antulius 0:9f7581d1af6f 629 *+
Antulius 2:49e089d4d1ac 630 *+----------------------------------------------------------------------------*/
Antulius 2:49e089d4d1ac 631 /*..............................................................................
Antulius 1:dc2ae76df12d 632 :
Antulius 2:49e089d4d1ac 633 : TECLADO MATRICIAL DE 4X4 DE MEMBRANA
Antulius 1:dc2ae76df12d 634 :
Antulius 1:dc2ae76df12d 635 : C1 C2 C3 C4
Antulius 1:dc2ae76df12d 636 : | | | |
Antulius 1:dc2ae76df12d 637 : | | | |
Antulius 1:dc2ae76df12d 638 : | 1 | 2 | 3 | F1
Antulius 1:dc2ae76df12d 639 : R1 __/ ________/ ________/ ________/
Antulius 1:dc2ae76df12d 640 : | | | |
Antulius 1:dc2ae76df12d 641 : | 4 | 5 | 6 | F2
Antulius 1:dc2ae76df12d 642 : R2 __/ ________/ ________/ ________/
Antulius 1:dc2ae76df12d 643 : | | | |
Antulius 1:dc2ae76df12d 644 : | 7 | 8 | 9 | F3
Antulius 1:dc2ae76df12d 645 : R3 __/ ________/ ________/ ________/
Antulius 1:dc2ae76df12d 646 : | | | |
Antulius 1:dc2ae76df12d 647 : | * | 0 | # | F4
Antulius 1:dc2ae76df12d 648 : R4 __/ ________/ ________/ ________/
Antulius 1:dc2ae76df12d 649 :
Antulius 1:dc2ae76df12d 650 :
Antulius 1:dc2ae76df12d 651 : Función: REN1 REN2 REN3 REN4 COL1 COL2 COL3 COL4
Antulius 1:dc2ae76df12d 652 : Pin: 1 2 3 4 5 6 7 8
Antulius 2:49e089d4d1ac 653 ................................................................................
Antulius 2:49e089d4d1ac 654 :
Antulius 2:49e089d4d1ac 655 : TECLADO MATRICIAL DE 4X4 DE PUSH BOTTONS
Antulius 2:49e089d4d1ac 656 :
Antulius 2:49e089d4d1ac 657 : C1 C2 C3 C4
Antulius 2:49e089d4d1ac 658 : | | | |
Antulius 2:49e089d4d1ac 659 : | | | |
Antulius 2:49e089d4d1ac 660 : | S1 | S2 | S3 | S4
Antulius 2:49e089d4d1ac 661 : R1 __/ ________/ ________/ ________/
Antulius 2:49e089d4d1ac 662 : | | | |
Antulius 2:49e089d4d1ac 663 : | S5 | S6 | S7 | S8
Antulius 2:49e089d4d1ac 664 : R2 __/ ________/ ________/ ________/
Antulius 2:49e089d4d1ac 665 : | | | |
Antulius 2:49e089d4d1ac 666 : | S9 | S10 | S11 | S12
Antulius 2:49e089d4d1ac 667 : R3 __/ ________/ ________/ ________/
Antulius 2:49e089d4d1ac 668 : | | | |
Antulius 2:49e089d4d1ac 669 : | S13 | S14 | S15 | S16
Antulius 2:49e089d4d1ac 670 : R4 __/ ________/ ________/ ________/
Antulius 2:49e089d4d1ac 671 :
Antulius 2:49e089d4d1ac 672 :
Antulius 2:49e089d4d1ac 673 : Función: COL1 COL2 COL3 REN4 REN1 REN2 REN3 REN4
Antulius 2:49e089d4d1ac 674 : Pin: 1 2 3 4 5 6 7 8
Antulius 2:49e089d4d1ac 675 **+----------------------------------------------------------------------------*
Antulius 0:9f7581d1af6f 676 *+
Antulius 0:9f7581d1af6f 677 *+ Powered by
Antulius 0:9f7581d1af6f 678 *+
Antulius 0:9f7581d1af6f 679 *+ T H E A N T U L I U ' S T E A M R&D Unltd
Antulius 0:9f7581d1af6f 680 *+
Antulius 0:9f7581d1af6f 681 *+ Research, Development, Systems, Equipment, Support & Spare Parts.
Antulius 0:9f7581d1af6f 682 *+ (C) Copyright 1989-2019, All Rights Reserved
Antulius 0:9f7581d1af6f 683 *+
Antulius 0:9f7581d1af6f 684 *+ Welcome to The Beaners Proyect Community!
Antulius 0:9f7581d1af6f 685 *+----------------------------------------------------------------------------*/
Antulius 2:49e089d4d1ac 686 /* END Documentation */
Antulius 0:9f7581d1af6f 687 /* END Mbed */