Altera DE2-115 Guia do Utilizador Página 66

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 107
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 65
SFSU - Embedded Systems Tutorial Nano- Electronics & Computing Research Lab
65
sprintf (text,"%d & %d = %d ",number1,number2,number1 & number2);
}
else
{
sprintf( text_top_VGA, "My ALU");
sprintf (text,"%d | %d = %d ",number1,number2,number1 | number2);
}
Characters are written on the screen through “VGA_text” function.
void VGA_text(int x, int y, char * text_ptr)
{
int offset;
volatile char * character_buffer = (char *) 0x00101000; // VGA character buffer
offset = (y << 7) + x;
while ( *(text_ptr) )
{
*(character_buffer + offset) = *(text_ptr); // write to the character buffer
++text_ptr;
++offset;
}
}
You can obtain the software code by opening the main.c file which is attached with this
tutorial.
Vista de página 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 106 107

Comentários a estes Manuais

Sem comentários