I2cout pcf8574
Archiver
Posts: 46,084
Hi,
I need some help with code needed to operate a PCF8574
I need a One Liner to send a low to pin 12 (P7)?
Please Larry
I need some help with code needed to operate a PCF8574
I need a One Liner to send a low to pin 12 (P7)?
Please Larry
Comments
I don't know if this has been addressed already, but the following
will work:
I2Cpin CON 0 ' SDA on 0; SCL on 1
DevType CON %0100 << 4 ' Device type
DevAddr CON %000 << 1 ' address = %000 -> %111
Wr8574 CON DevType | DevAddr ' write to PCF8574
MixDDR CON %00000000 ' 1 = input, 0 = output
Initialize:
I2COUT I2Cpin, Wr8574, MixDDR, 1
DEBUG "LED",CR
PAUSE 1000
Make sure pins AD0, AD1, AD2 are all grounded. An LED on P0 of the
8574 should light up. (the 8574 outputs a negative voltage, not
positive, wire LED accordingly)
-Michael Brown
--- In basicstamps@y..., "Lawrence C. Windrem" <lwindrem@p...> wrote:
> Hi,
>
> I need some help with code needed to operate a PCF8574
>
>
> I need a One Liner to send a low to pin 12 (P7)?
>
>
> Please Larry