Tool used: Keil Compiler for 8051
Microcontroller used: Intel 8051AH (with 32 I/O Pins, Two timers/counters, 5 interrupts with 2 priority levels)
//Program to handle ports of 8051
#include <reg51.h>
void main()
{
P0=0x50;
P1=0x10;
P0=P1+P0;
}
The Port0 holds the data of 50H and Port1 holds 10H, both added together and result is in Port0 as 0x60;
Comments
Post a Comment