Hello All, I have connected 3 LED's to P2_5, P2_6 and P2_7 ports of 89C52 uC and have the following code in Keil.
#include <stdio.h> #include <at89x52.h> void nothing(); void main() { int i; P0 = 0x00; P1 = 0x00; P2 = 0x00; P3 = 0x00; for(i = 0; i < 200; i++){ P2_6 = 1; nothing(); P2_6 = 0; nothing(); } for(i = 0; i < 200; i++){ P2_7 = 1; nothing(); P2_7 = 0; nothing(); } while(1){ P2_5 = 1; nothing(); P2_5 = 0; nothing(); } } void nothing() { int i; for(i = 0; i < 0x5000; i++) }