Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Re: PCF8574AT setzt Port 0 nicht Kategorie: Programmierung Basic (von H.J.W. - 1.09.2006 20:40)
 Als Antwort auf Re: PCF8574AT setzt Port 0 nicht von Maiker - 1.09.2006 19:51
Hello and sorry for the english.
When a MASTER sends a byte over the I2C bus it must receive an ACK from the slave.
When a MASTER reads a byte over the I2C bus it must send an ACK to the slave.

It looks like that you forgot an I2C_GETACK after the first I2C_WRITE and used an I2C_SENDACK after the second I2C_WRITE which should also be a I2C_GETACK.

I have no experience with the I2C assembler routines but maybe the changes I made will work.
Greetings,
H.J. Windt

#main

BaseAdr = Base8574a

sys I2C_START
 
    BASIC_IO = BaseAdr       'moduladresse
sys I2C_WRITE
sys I2C_GETACK ‘<<<<<-----’

BASIC_IO =  &b11111111      'alle 8 ports sollten auf 1 sein
sys I2C_WRITE
sys I2C_GETACK ‘<<<<<-----’

sys I2C_STOP

 Antwort schreiben

Bisherige Antworten: