FEZ Cerbuino Bee Pins Error


Has anyone experienced any errors using the GHIElectronics.Gadgeteer.FEZCerbuinoBee.Pins class? I am noticing that the pins associations may be off and trying to access some of the GPIO pins throws a Microsoft.SPOT.Hardware errors.

From my test, pin A0_AnalogChannel is on pin labeled A2 and pin A2_AnalogChannel is on physical pin labeled A0. These two pins are the only pins I can used from A0 - A5 as referencing the others gives a System.ArgumentException in the Microsoft.SPOT.Hardware.dll. This error also shows up when referencing GHIElectronics.Gadgeteer.FEZCerbuinoBee.Pins.D13 which I can understand if it is really tied to the debug led.

A0_AnalogChannel = A2
A1_AnalogChannel = System.ArgumentException
A2_AnalogChannel = A0
A3_AnalogChannel = System.ArgumentException
A4_AnalogChannel = System.ArgumentException
A5_AnalogChannel = System.ArgumentException


@ kirklynk - From your screenshot, it looks like you are using 8 precision bits. We only support 12. The mainboard driver mappings for the A0-A5 header analog channels are also incorrect though. They’ll be fixed in the next SDK. The correct version is below:

public const Cpu.AnalogChannel A0_AnalogChannel = (Cpu.AnalogChannel)10;
public const Cpu.AnalogChannel A1_AnalogChannel = (Cpu.AnalogChannel)8;
public const Cpu.AnalogChannel A2_AnalogChannel = (Cpu.AnalogChannel)9;
public const Cpu.AnalogChannel A3_AnalogChannel = (Cpu.AnalogChannel)7;
public const Cpu.AnalogChannel A4_AnalogChannel = (Cpu.AnalogChannel)4;
public const Cpu.AnalogChannel A5_AnalogChannel = (Cpu.AnalogChannel)5;

@ John, thanks you for your quick response. I started with 12 for the precision bits parameter then 10 and stop at 8, each one as the same effect and throws the System.ArgumentException. I will try using your code snippet and will post the results of my findings.

BTW I am using .NET Micro 4.3 and the latest Gadgeteer SDK.

Okay, I think I have narrowed down the reasons behind why I am getting the errors whenever the various ports are accessed. So here is what I have found so far, whenever I add the Ethernet ENC28 Module to socket 1 then several of the digital pins becomes unusable, likewise whenever the character display module is added to socket 3 then A1, A3-A5 becomes unusable. This leads my to conclude that some of the header pins shares the same mapping as the ones on the sockets which result in a Microsoft.SPOT.Hardware error if both are reference for different purposes…

@ kirklynk - You are correct, some of the pins on the sockets are shared with the headers. You can see which pins go where here: http://www.ghielectronics.com/downloads/schematic/FEZ_Cerbuino_Bee_SCH.PDF