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.

help me with AT89C2051

Status
Not open for further replies.

mstechca

New Member
I made myself a rather basic circuit using Atmel's AT89C2051 IC.
Basically all it does is detect that the chip is valid and then proceeds to run the code.

Once I insert the microcontroller (or uC for short) into the socket, it appears to be properly detected by the circuit, BUT once I reset the uC, the circuit does not work. When I checked the outputs of each pin P1.0 through P1.7 they were all 1's. Probably because they were at an impedant state, and I used pull-up resistors (1K) to make each pin a logic high by default.

I am a bit confused with Atmel's documentation because:

1. It states that when Pins P3.3 through P3.7 are all logic 0 (which I set them to), and Pin P3.2 is logic 1 (also set), and the reset pin is high, the first thing that is output on the P1 pins is the binary code 00011110, because that is part of the uC's signature. This is what I want to happen on every reset.

2. It states that as soon as I make reset logic 1 from the logic 0 state, P1's output will be all logic 1's.

So what I am asking is, How do I make the uC output the signature (as described above), every time I reset it without having to remove and then reinsert the uC?
 
I replied to your other post.

according to the datasheet,
you have to reset the micro
reset high, p3.2 high

(this resets the address counter at xtal pin)
apply 5V to the reset pin,
set prog(P3.2) high
P3.3, P3.4, P3.5 and P3.7 all low.

read the first byte @ p1 should be 1Eh,
pulse xtal high then low again
and read the second byte @ p1, should be 21h

you have to make sure your switching circuit for the reset pin is working properly.
 
In addition to my above post, if you are having trouble you can get this book here:
https://www.amazon.com/gp/product/0...102-5949777-2538510?s=books&v=glance&n=283155

its only $11.00 CDN!!
I myself bought one for $13.00 and it was well worth the money.

Easy to understand with schematic diagrams, and sample code. I only wish I would have spent the $13 earlier, it would have saved a pile of headaches!

IF you are burning up 89C micros lef and right you are OBVIOUSLY doing something wrong. In just a few hours reading you will be surprised!

Good luck.
 

Attachments

  • kennethayla.jpg
    kennethayla.jpg
    1.8 KB · Views: 372
Status
Not open for further replies.

Latest threads

Back
Top