Anda di halaman 1dari 2

Start

Assigning Port bits as required I/Os Initializing Ports for I/O operation

P2=0xff.

While(1)

K=P2 temp=K & 0xff

Switch (temp)

If temp=0x01

Forward direction

If temp=0x02

Reverse direction

If temp=0x04

Left

If temp=0x08

Right

If temp=0x10

Arm up

If temp=0x20

Arm down

Anda mungkin juga menyukai