You are on page 1of 1

INICIO

int resp=0, cent; int carga=1; unsigned short kp=1,


can; char txt[8]; char keypadPort at PORTB;

void interrupt()

adcon1=0b00001110; intcon.f7=1; intcon.f6=1; intcon.f2=0;


intcon.f5=1; Keypad_Init();

T0CON.f7=1; T0CON.f6=1; T0CON.f5=0; T0CON.f3=0;

T0CON.f2=1; T0CON.f1=1

WHILE

num = ADC_Read(0);

FIN resp=(num*78.0)/1023.0;

kp = Keypad_Key_press();

cent=(num*100.0)/1023.0;

inttostr(cent,txt);

switch (kp)

You might also like