GPIO pins for FEZ Cerb40 II

Hi,

This should be very, very basic but I’m struggling with it…

I’m using FEZ Cerb40 II with SDK 4.3 and I’m trying to use an output pin. But I’m having a hard time figuring out how to specify the correct pin…
To use PC0, for example, I’ve tried a number of combinations without luck…

        OutputPort LED;
        LED = new OutputPort(GHI.Pins.G400.PC0, true);

        LED = new OutputPort((Cpu.Pin)8, true);

Can someone please help me on this?

As a suggestion: why not implement the GPIO mapping just like it’s available for G400, G120 and EMX?

Thanks,

Also check out GHI.Pins Generic.GetPin. You can use something like
static OutputPort resetOled = new OutputPort(Generic.GetPin(‘C’, 0), true);

1 Like

Thank you.

GHI.Pins.Generic.GetPin(‘C’, 0) seems to be the best option. It’s well documented here:
https://www.ghielectronics.com/docs/6/locating-ios

I was already using what is there at https://www.ghielectronics.com/docs/7/digital-outputs.
I did miss the link to “Locating IOs” at the top.