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.

Help concerning an AT89C2051

Status
Not open for further replies.

rikonor

Newbie level 2
Joined
Feb 19, 2008
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
Hi

I'm trying to build a circuit with an Atmel AT28C2051,
It is supposed to recieve serial data on the serial port (RxD - pin 2 [port 3.0]).
However, no matter what code I write and burn onto it,
It shows "1" on all port pins (except port 1.0 % 1.1, which require external resistors, and since I'm not using those pins I did not use those resistors).

I tried writing many different programs (in C51, and of course included 'reg51.h') that are supposed to change the output levels to "0",
but it hasn't worked.

The microcontroller has an external clock (12mhz crystal and 2 22pF capcitors),
and an automatic reset (comprising of a 100kOhm resistor and a 1µF capacitor).

I read on the datasheet that after holding RST for 2 machine cycles the microcontroller is reset and all port pins are set to 'high'.

Is there anything wrong with the circuit or maybe the rom didn't get flashed at all?
(I used LEAPER-48 usb universal writer with the IC Writer program).

Help greatly appreciated,
thanks,
Or
 

At reset all the port pins of 2051 will be 1.

You have to change it at the startup (if you want)

Nandhu
 
Hi,
Do you mean that in your software you are trying to set port pins to zero, but it is not taking place?
If that is the case, check if your reset pin shows low voltage after power on, I mean it should be low after the initial reset pulse. If not low, correct the mistake, mostly in wiring. I would suggest you to use a 10uF capacitor with a 15K pull down at reset pin, even though your values may be also OK. The idea in reducing the resistance is to reduce the influence of the internal resistance and to make sure that the meter resistance will be less important while checking the reset pin voltage.
Another cause for all port pins being high can be due to failure of the oscillator, open/shorts in connections of the crystal, a bad crystal etc. Check osc.pin2 with a scope and see if small amplitude of oscillations exists. With a digital multimeter this pin should show around 2.5V, eventhough it may not confirm working of the oscillator.
Check continuity of ground pin to the controller by measuring Vcc across pins 10 and 20 on the chip itself.
If your programmer has verified correctly after programming, no need to worry about false programming, but if there is any mistake in your code, it may again fail to clear port pins.
Regards,
Laktronics
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top