You are on page 1of 2

/*

* calculadora_Ing.c
*
* Created: 04/09/2014 10:34:07 a.m.
* Author: dell
*/

/*
* CONTADOR_9.c
*
* Created: 27/03/2013 04:03:17 p.m.
* Author: HP
*/
#include <avr/io.h>
#include <util/delay.h>
#define time _delay_ms(1000)
#define display PORTB
#define direc PORTC
int resultado;

int BCD[]={63,6,91,79,102,109,124,7,127,103};
int uni,dec=0;
int vuelta=100;
direc=192;

DDRB=0xff;
DDRA=0x00;
DDRC=0xc0;
DDRD=0x00;

while(1)
{

if(PINC==1)
{
resultado=PINA+PINC;
}
if(PINC==2)
{
resultado=PINA-PINC;
}
if(PINC==3)
{

resultado=PINA*PINC;
}
if(PINC==4)
{
resultado=PINA/PINC;

You might also like