NETMF pin map
| |||||
Cpu.Pin
|
Port
|
Cpu.Pin
|
Port
|
Cpu.Pin
|
Port
|
0
|
PA0
|
32
|
PC0
|
64
|
PE0
|
1
|
PA1
|
33
|
PC1
|
65
|
PE1
|
2
|
PA2
|
34
|
PC2
|
66
|
PE2
|
3
|
PA3
|
35
|
PC3
|
67
|
PE3
|
4
|
PA4
|
36
|
PC4
|
68
|
PE4
|
5
|
PA5
|
37
|
PC5
|
69
|
PE5
|
6
|
PA6
|
38
|
PC6
|
70
|
PE6
|
7
|
PA7
|
39
|
PC7
|
71
|
PE7
|
8
|
PA8
|
40
|
PC8
|
72
|
PE8
|
9
|
PA9
|
41
|
PC9
| ||
10
|
PA10
|
42
|
PC10
| ||
11
|
PA11
|
43
|
PC11
| ||
12
|
PA12
|
44
|
PC12
| ||
13
|
PA13
|
45
|
PC13
| ||
14
|
PA14
|
46
|
PC14
| ||
15
|
PA15
|
47
|
PC15
| ||
16
|
PB0
|
48
|
PD0
| ||
17
|
PB1
|
49
|
PD1
| ||
18
|
PB2
|
50
|
PD2
| ||
19
|
PB3
|
51
|
PD3
| ||
20
|
PB4
|
52
|
PD4
| ||
21
|
PB5
|
53
|
PD5
| ||
22
|
PB6
|
54
|
PD6
| ||
23
|
PB7
|
55
|
PD7
| ||
24
|
PB8
|
56
|
PD8
| ||
25
|
PB9
|
57
|
PD9
| ||
26
|
PB10
|
58
|
PD10
| ||
27
|
PB11
|
59
|
PD11
| ||
28
|
PB12
|
60
|
PD12
| ||
29
|
PB13
|
61
|
PD13
| ||
30
|
PB14
|
62
|
PD14
| ||
31
|
PB15
|
63
|
PD15
|
C# Example:
LED = new OutputPort((Cpu.Pin)5, true); //PA5
// Assign the I/O port PA5 as a output port for LED display.
PWM
CHANNEL
|
Physical Pin
|
ANALOG CHANNEL
|
Physical Pin
| |
0
|
PC6
|
0
|
PA6
| |
1
|
PA7
|
1
|
PA2
| |
2
|
PC7
|
2
|
PA3
| |
3
|
PA8
|
3
|
PC0
| |
4
|
PB0
|
4
|
PC1
| |
5
|
PB1
|
5
|
PA4
| |
6
|
PB5
|
6
|
PC2
| |
7
|
PB4
|
7
|
PC3
| |
8
|
PB3
|
8
|
PA5
| |
9
|
PB11
|
9
|
PB0
| |
10
|
PB10
|
10
|
PB1
| |
11
|
PA10
| |||
12
|
PA9
| |||
13
|
PA15
| |||
14
|
PB8
| |||
15
|
PB9
|
C# Example :
AnalogInput Sensor1 = new AnalogInput(Cpu.AnalogChannel.ANALOG_3);
// Assign the Analog input channel 3 as a Sensor1
PWM Moto1Pwm = new PWM(Cpu.PWMChannel.PWM_0, 10000, 0.5, false);
// Assign PWM channel 0 as Moto1Pwm output and working at 10KHz, 50% duty cycle
沒有留言:
張貼留言