Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21570 Discusiones

Como puedo mostrar mensajes dependiendo del switch activado

AMati4
Principiante
1.122 Vistas

Hola

Estoy tratando de mostrar un mensaje en pantalla (salida VGA) por medio de un switch, es decir que cuando mueva un switch este de un mensaje distinto pero no lo he logrado. Estoy construyendo sobre una plantilla de ejmplo. Y apesar de que los mensajes de "Altera DE2" y "Char Buffer", el mensaje de "POR FIN" cuando muevo un switch no sale.

¿Que puedo estar haciendo mal?

 

int main(void)   {   int key = 0;       /* create a message to be displayed on the VGA display */   char text_top_row[40] = "Altera DE2\0";   char text_bottom_row[40] = "Char Buffer\0";           /* output text message near the middle of the VGA monitor */   VGA_text (35, 29, text_top_row);   VGA_text (35, 30, text_bottom_row);       while(1)   {   key = IORD_ALTERA_AVALON_PIO_DATA(SW_BASE);   IOWR_ALTERA_AVALON_PIO_DATA(LED_ROJO_BASE,key);       if(key = 0x01)   {       char text_texto1_row[40] = "POR FIN\0";   VGA_text (35, 31, text_texto1_row);       }   }   }

 

0 kudos
2 Respuestas
KennyTan_Altera
Moderador
746 Vistas
Is there any update?
Responder