ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

PROYECTO CON TECLADO Y DISPLAY 7 SEGMENTOS


Enviado por   •  8 de Septiembre de 2019  •  Informes  •  8.862 Palabras (36 Páginas)  •  105 Visitas

Página 1 de 36

PROYECTO CON TECLADO Y DISPLAY 7 SEGMENTOS

Juan David Toloza Ramirez, (jdtoloza@libertadores.edu.co)            

          Laura Fernanda Cardona Pardo, (lfcardonap@libertadores.edu.co)

INTRODUCCION

Segundo corte de Circuitos digitales 3, en el siguiente informe encontrara los temas vistos en este corte, vera la explicación del código del teclado y el display de 7 segmentos que se realizo en el programa keil

OBJETIVOS ESPECIFICOS

Diseñar un código en la tarjeta DISCOVERY KIT STM32F429 con la función de encender un 7 segmento, de forma ordenada: 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.

Diseñar un código en la tarjeta DISCOVERY KIT STM32F429 implementado un teclado de 3X4

OBJETIVOS GENERALES

Documentación del tema

Análisis de los códigos implementados, para cada uno de los casos vistos este corte.

PROBLEMAS A RESOLVER

Tarjeta DISCOVERY KIT STM32F429

De la tarjeta Discovery Kit ----------------------------------------- Diagrama Tarjeta Discovery Kit

[pic 1] [pic 2]

Pines utilizados

Códigos realizados

Programa µ5

[pic 3]

  1. Siete segmentos

Se realizo un código, con el objetivo de encender el siete segmentos de forma uniforme, proyectando 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, para este código se debió tener en cuentas el manual de la tarjeta, para así mirar los pines que podíamos utilizar para enviar la señal al 7 segmento.

[pic 4]

#include

#include "STM32F4xx.h"

int main (void)                                        

{

int cont=0;

int  DD = 10000000;                                                

 retardo para la secuencia de leds

RCC->AHB1ENR |= (1UL<<0);       /* Habilita reloj puerto A */

RCC->AHB1ENR |= (1UL<<6);            // Habilita reloj puerto G

inicialización del G puerto de los leds y puerto A para el botón

        GPIOG->MODER &= ~(3UL<<2*15);        // configuración pin 15

        GPIOG->MODER |= (1UL<<2*15);        // salida

        GPIOG->OTYPER &= ~(1UL<<15);        // push pull

        GPIOG->OSPEEDR |= (1UL<<2*15);        // velocidad media

        GPIOG->PUPDR &= ~(3UL<<2*15);         // sin pull up ni pull down

        

        GPIOG->MODER &= ~(3UL<<2*13            // configuración pin 13

        GPIOG->MODER |= (1UL<<2*13);         //salida

        GPIOG->OTYPER &= ~(1UL<<13);         // push pull

        GPIOG->OSPEEDR |= (1UL<<2*13);         // velocidad media        

        GPIOG->PUPDR &= ~(3UL<<2*13);         // sin pull up ni pull down

        

        GPIOG->MODER &= ~(3UL<<2*11);       // configuración pin 11

        GPIOG->MODER |= (1UL<<2*11);        // salida

        GPIOG->OTYPER &= ~(1UL<<11);        // push pull

        GPIOG->OSPEEDR |= (1UL<<2*11);        // velocidad media

        GPIOG->PUPDR &= ~(3UL<<2*11);         // sin pull up ni pull down

        

        GPIOG->MODER &= ~(3UL<<2*9);          // configuración pin 9

        GPIOG->MODER |= (1UL<<2*9);        // salida

        GPIOG->OTYPER &= ~(1UL<<9);          // push pull

        GPIOG->OSPEEDR |= (1UL<<2*9);        // velocidad media

             GPIOG->PUPDR &= ~(3UL<<2*9);              // sin pull up ni pull down

        

        GPIOG->MODER &= ~(3UL<<2*7);           // configuración pin 7

        GPIOG->MODER |= (1UL<<2*7);        // salida

        GPIOG->OTYPER &= ~(1UL<<7);                 // push pull

        GPIOG->OSPEEDR |= (1UL<<2*7);        // velocidad media

        GPIOG->PUPDR &= ~(3UL<<2*7);            // sin pull up ni pull down

        

        GPIOG->MODER &= ~(3UL<<2*5);           // configuración pin 5

        GPIOG->MODER |= (1UL<<2*5);         //salida

        GPIOG->OTYPER &= ~(1UL<<5);                       // push pull

        GPIOG->OSPEEDR |= (1UL<<2*5);         // velocidad media        

        GPIOG->PUPDR &= ~(3UL<<2*5);         // sin pull up ni pull down

        

        GPIOG->MODER &= ~(3UL<<2*2);          // configuración pin 2

        GPIOG->MODER |= (1UL<<2*2);        // salida

        GPIOG->OTYPER &= ~(1UL<<2);         // push pull

        GPIOG->OSPEEDR |= (1UL<<2*2);        // velocidad media

        GPIOG->PUPDR &= ~(3UL<<2*2);            // sin pull up ni pull down

        

        

        while (1)

        {

                

                GPIOG->ODR |= (1UL<<15);        

                GPIOG->ODR |= (1UL<<13);        

                GPIOG->ODR |= (1UL<<11);        

                GPIOG->ODR |= (1UL<<9);        

                GPIOG->ODR |= (1UL<<7);        

                GPIOG->ODR |= (1UL<<5);

       

                            //Prende 0

                for (cont=0;cont

...

Descargar como (para miembros actualizados)  txt (19.3 Kb)   pdf (690.2 Kb)   docx (844.2 Kb)  
Leer 35 páginas más »
Disponible sólo en Clubensayos.com