Simple LED program not working with P89v51rd2

Status
Not open for further replies.

bsr

New Member
I have programmed P89v51rd2 by using Universal lab tool(Parallel).
when I connected it in pcb all ports are showing high. I connected LED to p0.0.
P0 port is taped vcc throug 10kΩ.

observations:

Reset was 400msec high.
clock is 11.059Mhz.
EA is high.


please help.
 
#include<REG52.H>
#include<stdio.h>
void delay0(int);

void main(void)

{
while(1)
{
P0=0X00;
delay0(100);
P0=0xFF;
delay0(100);
}
}

void delay0(int a)
{

int i;
for(i=0;i<a;i++)
{
TMOD=0X01;
TL0=0X0;
TH0=0X0;
TR0=1;
while(TF0==0);
TR0=0;
}
}

the same code and circuit working with AT89S52.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…