A
A
Alex Other planet2019-05-23 22:58:59
Atmel AVR
Alex Other planet, 2019-05-23 22:58:59

Who worked with two wire interface (I2C), why is it so difficult to get address and data transmission confirmations?

ATmega8, TWI hardware interface, read the datasheet, assembled the circuit on the assembly line, ATmega8 master transmitter, PCF8574 slave receiver. To pull up the SCL, SDA lines to VCC, I used the internal resistors of the ATmega8. Using the example in the datasheet, I typed the code on the AVR ASM and launched it in Proteus 8 to begin with. It works flawlessly, confirming all actions. Clock frequency ATmega8 7372800 Hz, TWI transmitter tuned to 100 kHz. In reality, the transmitter starts up and the frequency corresponds to the selected one, but the receipt of the address (0x40) and data (0xff) is not accompanied by the correct confirmation codes. The status of the PCF8574 pins has not changed. How much are the installation features of the PCF8574 significantly affected, and what is wrong at all? Programmatically in Proteus like Ok.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vanyamba-electronics, 2019-05-24
@BadElectrician

For some reason, the pull-ups built into the ATmega don't work with the TWI interface. You need to add physical resistors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question