Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top