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.

Internal register and default address of AT89C51 and AT89C52

Status
Not open for further replies.

Maverickmax

Advanced Member level 1
Joined
Dec 6, 2004
Messages
404
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,298
Activity points
3,689
at89c51 internal

Hi

I know I should have looked into datasheet but I am kind of hurry at the moment so does anyone know how many internal registers does AT89C51/AT89C52? What is the device address (default) for AT89C51 and AT89C52? Can I make my own device address??

The reason for this request is Im in the process of learning to implement I2C method therefore I need to be familiar with the internal registers and default address before conducting further work.

Thank in advance

Maverickmax
 

registers of at89c51

Hi maverick,

AT89C51 and AT89C52 has no hardware support (special registers) by default for I2C bus.
If you want to use these microcontroller for I2C implementation you have to do a what is called "bit bang" procedure.
For learning about I2C you can look here:
http://neptune.lisa.univ-paris12.fr/Electronik/F_I2C.htm
 

at89c51 register

Silivo

Oh I see

I will look 'Bit-bangs' up now. Do you know any ATMEL microcontroller has I2C (device address and internal address)?

Btw thank you for letting me know :)

Maverickmax

Added after 2 hours 20 minutes:

Hi

I am kind of familiar with bit-banging approach but the question is should I create my own device addresses in my prototupe function code for multi-slaves?

Im a bit confused atm

Maverickmax
 

from 89c2051 lookbit

Thank you

Can anyone ask answer my question about making my own device address?

Let say I have have two slaves and I selected them to be 0xA1 and 0xB1 respectively in my prototype function in my software. Is it ok or not?

Maverickmax
 

at89c51 register pdf

Hi maverickmax,

So you want a slave with address 10100001 and one with address 10110001

Yes, it's OK for read them.
For write you must have 0xA0 and 0xB0 as slave address.

Inside the site mentioned before in my previous post you can read:

Each byte consists of 8 bits. The 8th bit in the SLAVE address has a special meaning. When it is set to 0 it means you want to write to your SLAVE. When it is set to 1 it means that you you want to READ. You could see this as follow. The Even addresses are WRITE addresses, the ODD addresses are READ addresses. Each device has a consecutive WRITE and READ address.


Example: a PCF8574 General purpose 8 BIT I/O port.
SLAVE address to WRITE is (01000000)b = 64d
SLAVE address to READ is (01000001)b = 65d


So you can have a theoretical maximum of 128 device on you BUS. Practically this is not the case. There have been set up a couple of addresses which you are not allowed to use. There are some that have been reserved by PHILIPS for special purposes.


ADDRESS R/W

0000 000 0 : general call address
0000 000 1 : start byte

0000 001 x : CBUS address
0000 010 x : address reserved for different bus format.

0000 011 x |
0000 100 x |
0000 101 x |} to be defined
0000 110 x |
0000 111 x |

This implements that all addresses below 16 are reserved for special purposes

However bear in mind that an I2C peripheral address is composed of two parts. The fixed part is defined by the I2C bus committee and is assigned based on device type. Thus be carefully do not use such kind of device in your system. Otherwise you can get in conflict with them since they have the slave address hardware configured on the chip.
 

    Maverickmax

    Points: 2
    Helpful Answer Positive Rating
at89c52 register

Hi Slivio

Thank you for clarifying everything.

I can program the slave to carry the device address. Hence the master will transmit the device address in to alert the slaves. For example the first slave compare its device address with the transmission of device address from master, and if it recognise the device address, it will be ready to listen for further instruction from the master while 2nd slave ignore.

Am i right?

I am soz if Im a pain in the ass! I am a terribly slow learner!!!

Maverickmax
 

Re: Internal register and default address of AT89C51 and AT8

Maverickmax said:
For example the first slave compare its device address with the transmission of device address from master, and if it recognise the device address, it will be ready to listen for further instruction from the master while 2nd slave ignore.

Am i right?

YES. That's the point.

Maverickmax said:
I am soz if Im a pain in the ass! I am a terribly slow learner!!!

Well, you can't drive a car like one among race team.

Maverickmax said:
I know I should have looked into datasheet but I am kind of hurry at the moment

But ever don't rush.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top