Is this circuit correct to drive a car with 4x4 matrix keypad?
http://www.instructables.com/id/Cellphone-Ope...ep3/SCEMATIC-OF-CELLPHONE-OPERATED-LANDROVER/
Is this programme correct with this circuit for same purpose that is to drive car with matrix keypad?
[code lang="c"]#include
void main(void)
{
unsigned int k, h;
DDRA=0x00;
DDRD=0XFF;
while (1)
{
k =~PINA;
h=k & 0x0F;
switch (h)
{
case 0x02:
{
PORTD=0x89;
break;
}
case 0x08:
{
PORTD=0x86;
break;
}
case 0x04:
{
PORTD=0x85;
break;
}
case 0x06:
{
PORTD=0x8A;
break;
}
case 0x05:
{
PORTD=0x00;
break;
}
}
}
}[/code]
http://www.instructables.com/id/Cellphone-Ope...ep3/SCEMATIC-OF-CELLPHONE-OPERATED-LANDROVER/
Is this programme correct with this circuit for same purpose that is to drive car with matrix keypad?
[code lang="c"]#include
void main(void)
{
unsigned int k, h;
DDRA=0x00;
DDRD=0XFF;
while (1)
{
k =~PINA;
h=k & 0x0F;
switch (h)
{
case 0x02:
{
PORTD=0x89;
break;
}
case 0x08:
{
PORTD=0x86;
break;
}
case 0x04:
{
PORTD=0x85;
break;
}
case 0x06:
{
PORTD=0x8A;
break;
}
case 0x05:
{
PORTD=0x00;
break;
}
}
}
}[/code]