Main Site Documentation

Which PWM pin is which?


#1

Guys,

I been experiencing some issues with the Gadgeteer PWM code and have moved to using the netmf code directly; thanks Andre & Architect. This was easy to do on the spider as the schematic told me which PWM pin was whch.


            PWM servo = new PWM(Cpu.PWMChannel.PWM_0, period, high1, PWM.ScaleFactor.Microseconds, false);

However, the Cerberus only shows if a pin is PWM capable and not which one it is. Can anyone help me identify which PWM is which so I can mograte my app from the Spider to the Cerberus please?

Thanks,

Jason.


#2

Socket 2
PWM7 = PWMChannel.PWM_0;
PWM8 = PWMChannel.PWM_1;
PWM9 = PWMChannel.PWM_2;

Socket 4
PWM7 = PWMChannel.PWM_3;
PWM8 = PWMChannel.PWM_4;
PWM9 = PWMChannel.PWM_5;

Socket 5
PWM7 = PWMChannel.PWM_6;
PWM8 = PWMChannel.PWM_7;
PWM9 = (Cpu.PWMChannel)8;

Socket6
PWM7 = PWMChannel.PWM_6;
PWM8 = PWMChannel.PWM_7;
PWM9 = (Cpu.PWMChannel)8;


#3

Justin,

many thanks. Is this on a datasheet somewhere, or do you just know it?

J.


#4

I cheated and looked at the mainboard driver code :smiley:


#5

@ andre.m - It’s not cheating unless you get caught :whistle:


#6

Justin,

I see that socket 6 has PWM outputs on pins 7, 8 and 9 as does socket 5 but the schematic for the FEX Cerberus shows no PWM on sockets 4 or 2 as you suggest. Am I reading your list correctly. Should I assume therefore that if I want to use the PWM function on socket 5, pin 7 I should initialise my object as such:


PWM servo = new PWM(Cpu.PWMChannel.PWM_6, period, high1, PWM.ScaleFactor.Microseconds, false);

Regards,

J.


#7

Sorry it’s sockets 3,4,5,6 and not 2…

Yes how you have looks correct


#8

@ Jason - As my young Padawan has pointed out in the links the PWM are labled TM1_CH1 etc so it’s not overly obvious they are PWM…


#9

@ andre.m - Indeed my young apprentice :smiley:

But in saying that you will zoom past me soon enough :wink: