I use I2C communication of Atmega32L, interactive with STA013 Mpeg decode, but i have some trouble..
- I sent I2C_start OK, checksum OK
- I sent I2C_SL_W OK, checksum is 0x18 SL_W and ACK returned (match the Atmega32L datasheet)
- then I load 0x01 to write to STA by the next instruction.
- I sent I2C_write_byte OK, checksum is 0x30 Data and NACK returned
- I sent I2C_re_start OK
- I sent I2C_SL_R but now, checksum is 0x48 meaning address and NACK returned.
All i want first is read the content of address 0x01 from STA. But I can't read anything cause STA always send back my request with NACK, meaning stop connection...
Do u think this's cause by anything, plz help me solve this maze. It's the only one STA i'v got and it'll be so terrible if smth happend to it :cry:
P/S: I use STK500 board, to connect with STA, i use PORTC 0-5 for I2C comm, SDI,CLK for data to STA, RESET and DATA_REQ. RESET is active low, so i've already set this bit high.
My atmega run at 8Mhz, I2C freq = 100kHz... If you need more info or code... plz tell me.
Thanks for ur help!!