electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Help concerning an AT89C2051


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Help concerning an AT89C2051
Author Message
rikonor



Joined: 19 Feb 2008
Posts: 2


Post20 Feb 2008 15:41   

Help concerning an AT89C2051


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
Back to top
Google
AdSense
Google Adsense




Post20 Feb 2008 15:41   

Ads




Back to top
nandhu015



Joined: 11 Feb 2006
Posts: 641
Helped: 46
Location: Tamilnadu, India


Post20 Feb 2008 17:21   

Re: Help concerning an AT89C2051


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

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

Nandhu
Back to top
laktronics



Joined: 06 Jan 2007
Posts: 945
Helped: 156


Post20 Feb 2008 18:21   

Re: Help concerning an AT89C2051


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
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Help concerning an AT89C2051
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
NEED HELP ON AT89C2051 (4)
TAFE programmer an AT89C2051-HELP!!! (3)
help line follower mobot atmel at89c2051 (4)
help concerning an automobile battery charger !! (4)
Help needed concerning jdm programmer . (7)
Need help! interfacing at89c2051 & PCF8591 in displaying (1)
can any one HELP ME?...concerning FSK (1)
help concerning a car audio cd radio receiver (2)
I need ur help concerning an IR interface for mobile phones (5)
Need some help concerning the study of a FHSS system (4)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS