ATmega32 Datasheet is wrong?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So , I found something that makes no sense...
In picture number1:

----------------------------------

It is said that the address control unit can detect the device`s own slave address , by matching the received address with the one in the TWAR , and according to TWCT settings the slave can ACK the transmitter or not . so far so good.

 

In picture number2:

---------------------------------

In Slave Receive mode , the first step is to initialize the TWAR and TWCR , TWCR |=(1 << TWEN) | (1 << TWEA); ,,,, TWEA must be set to ACK The Master of receiving the address ... so that means every device becomes a slave should set the TWEA ....

 

In picture number3:

--------------------------------

It is said that the current TWI Hardware and bus status is that Master Lost arbitration and it should change to slave to find if it is addressed or not , so we should set TWCR |=(1 << TWINT )| (1 << TWEA); , to let ACK the transmitting master , but in the photo it is only setting TWINT only without setting TWEA ...

so does this mean that ATmega datasheet is wrong????

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I suggest you look at the app note and code provided by Atmel/MC for using the TWI as slave device.

https://www.microchip.com/wwwApp...

Hope that helps

Multimaster is a complex mode, and seldom used as most I2C projects use master or slave, not both.

 

Jim

 

 

 

 

 

Last Edited: Thu. Mar 26, 2020 - 01:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Might be worth a read...

 

http://www.robotroom.com/Atmel-A...

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss