Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[51] AT89C2051 Works in Proteus But it not works in Hardware.

Status
Not open for further replies.

yuvarajbe

Newbie level 5
Newbie level 5
Joined
Nov 12, 2013
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
79
hello ,

i am working on AT89C2051, i am trying to make a simple code as a start up for my full project .
i wrote i code just to switch the led on at P3^1 , it works in proteus but it is not working in real hardware .
also i tried to wrote a simple code in c language using Keil platform, and it burner by Willar Programmer. Here with I attached my code

anyone can give a help to solve the problem .

code:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <at892051.h>
 
/*function for delay of 1 sec*/
sbit p3=P3^1;
void delay()
   {
      unsigned int x;
      for(x=0;x<33000;x++);
      }
 
 
 
main()
   {
   int cnt = 0;
      for (;;)
     {
      p3=1;
           delay();
            p3=0;
           delay();        
     }
    }

 

Attachments

  • Programmer_screenshot.png
    Programmer_screenshot.png
    72.8 KB · Views: 170
Last edited by a moderator:

Hi,

it works in proteus
.. this tells me the code does work.

So what about your hardware?

Klaus
 

Hi,
In Hardware nothing happened.its idle mode.I have one more doubt.

I am using IDE Keil uvision 2 its Evaluation version.For this any problem occur???
 

Hi,
In Hardware nothing happened.its idle mode.I have one more doubt.

I am using IDE Keil uvision 2 its Evaluation version.For this any problem occur???
No problem in using IDE Keil uvision 2 Evaluation version. The Evaluation version is capable to handle the code size up to 2 kb and your code is less than this. Have you made your own hardware or you are using EVK board (or development board) ??.
 

Hi
Its my Own hardware. Connection shown below image.I connect port 3.1 instead of led pin in imagesch1.png
 

What is the resistance value of the resistor which is connected with led?
 
Resistance Value is 330ohm. But i directly measured the pin3.1 through multimeter. there is no response While i give high or low by coding.
 

Maybe you have compiled for Debug mode instead of release mode.
 
In the debug mode, debugger use .obj files, and generate hex file in the state of release mode.
I cant get what u said?
 

But i directly measured the pin3.1 through multimeter. there is no response While i give high or low by coding.

Just add one pull up resistor of 10K fromVcc to P3.1 and check by giving logic high and low!!

Capture.PNG
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top