FEZ Hydra and I2C PCF8574


Does somebody successfully used socket 5 on FEZ Hydra to connect with the I2C IO Expander PCF8574AP from NXP.

The chip is on my breadborad with the folowing Pinout

FEZ Hydra Socket 5 PCF8574AP
pin 2 pin 16
pin 8 pin 15
pin 9 pin 14
pin 10 pin 8

Nothing more, nothing less. Just these 4 pins connected together, no additionnal component.

If you look at the following document, you will see that the 7 bit address should be 0x38

I’m starting with “clean” new FEZ Hydra Gadgeteer project, and I write the following code. I run it and unfortunately, no pin came to 0V as espected :frowning:

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.Seeed;
using GTI = Gadgeteer.Interfaces;

namespace HyperionGadgeteer
public partial class Program

    GTI.I2CBus MyI2C;

    // This method is run when the mainboard is powered up or reset.   
    void ProgramStarted()
        // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
        Debug.Print("Program Started");
        ushort PHILLIPS_PFC8574A_ADDRESS = 0x38;
        int PHILLIPS_PFC8574A_CLOCK_IN_kHz = 100;
        GT.Socket socket = GT.Socket.GetSocket(5, true, null, null);
        MyI2C = new GTI.I2CBus(socket, PHILLIPS_PFC8574A_ADDRESS, PHILLIPS_PFC8574A_CLOCK_IN_kHz, null);

        byte[] ByteToWrite = new byte[1] { 0x00 };
        MyI2C.Write(ByteToWrite, 1000);





I think I2C is bugged on hydra…



Except if someone has already successfully connected a PCF8574 to his FEZ Hydra, I will try it later with the next SDK.

I2C is fixed already on the SDK found under beta forum.

Tried the new firmware. Still no success. The “I2C - EEPROM” tutorial always return success. With any device address.

Sure but it should work. We have it tested with many devices.

How can I get more information on error? With try catch?

I didn’t understand your question. I2C is tested to work on latest release with multiple devices. If you are seeing a problem, please provide a scope trace, details, more info on the problem. The driver may not report an error when using an invalid address but this doesn’t indicate it is not working.

Please use a scope to verify your connections.

I don’t have scope yet, but is it normal to have 3.2 V on SDA if I transmit nothing? It should not be 0 or 5V?

Yes normal

it was a code 21. 21 inch from screen :o

It is mandatory to put the chip address pins to ground. I let them floating. Newbie mistake.

Thanks to Dave for is 4X4 KEYPAD VIA PCF8574AP PORT EXTENDER


Thank you Gus for your patience.