Main Site Documentation

Another Ceberus pin mapping question


#1

Guys, following on from this post (http://www.tinyclr.com/forum/topic?id=11158) and in an attempt to reduce the number of sockets I’m using and to over come an issue with the Gadgeteer PWM library, I’d like to initialise another pin on my Ceberus directly, instead of using an extender class.

I already use


Microsoft.SPOT.Hardware.PWM servo = new PWM(Cpu.PWMChannel.PWM_0, period, high1, PWM.ScaleFactor.Microseconds, false); // This is socket 3 pin 7

for using PWM to drive a servro. Now I’d like to use pin 4 on that socket as a general purpose digital output port. Ive set it up using the following


Microsoft.SPOT.Hardware.OutputPort blade = new OutputPort((Cpu.Pin)9, false);

But this pin never seems to go high. Pin 4 on socket three is identified as PC1 according to this information (http://wiki.tinyclr.com/index.php?title=FEZ_Cerberus_Developer) which is actually pin 9 according to this information (http://www.ghielectronics.com/downloads/Gadgeteer/Mainboard/Cerberus/FEZ%20Cerberus%20sch.pdf). I must be missing another piece of the jigsaw somewhere.

Any help would be much appreciated.

Many thanks,

J.


#2

What about…

GT.Socket socket = GT.Socket.GetSocket(3, false, null, "");
DigitalOutput digitalOutput = new DigitalOutput(socket,GT.Socket.Pin.Four ,false,null);

#3

Perfect.

Thanks for the prompt reply.

Just when you think you’re starting to really understand this stuff something as fundemental as a pin mapping really lets you know how much more this is to learn.

J.


#4

Thats where Gadgeteer takes the pain away as you don’t need to worry about what pin goes where etc…