Skip to content

Instantly share code, notes, and snippets.

@intfrr
Forked from yesidays/7segmentos.cpp
Created June 10, 2012 09:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intfrr/2904659 to your computer and use it in GitHub Desktop.
Save intfrr/2904659 to your computer and use it in GitHub Desktop.
Leer y escribir en display de 7 segmentos
#include <stdio.h>
#include <conio.h>
int main(void){
int i,j,k,cont;
char c;
int x[]={6,91,79,102,109,124,7,127,103,63};
int y[]={119,124,57,94,121,113,125,118,6,14,56,63,115,109,62,110};
char user[]={'a','b','c','d','e','f','g','h','i','j','l','o','p','s','u','y'};
char aux[5];
char cam[5];
clrscr();
printf("Ingresa una palabra\n");
printf("A,B,C,d,E,F,G,H,I,J,L,O,P,S,U,Y\n\n");
c = getchar();
while (c!='0'){
c = getchar();
for(k=0;k<=15;k++){
if (c==user[k]){
cont=y[k];
}
}
for (j=0;j<=15;j++){
for(i=0;i<=50;i++){
outportb(0x3BC,cont);
}
} }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment