Best Answer NooM, 11 April 2013 - 12:30 PM
i dont think the netduino 1 has pwm on the led.
also only 4 pwm channs
(5,6,9,10);
so iam not suprised your code crashes
http://www.netduino....duino/specs.htm
Go to the full post  | |||||||||||||||||||||||||||
PWM freezing due to PWMChannels mapping
Started by Sinan, Apr 11 2013 10:05 AM
PWM Netduino PWMChannels
Best Answer NooM, 11 April 2013 - 12:30 PM
i dont think the netduino 1 has pwm on the led. also only 4 pwm channs (5,6,9,10);
so iam not suprised your code crashes
http://www.netduino....duino/specs.htm Go to the full post
3 replies to this topic
#1Posted 11 April 2013 - 10:05 AM I am trying to work with PWM but failed to access the onboard led. None of the examples found on the forum will function as expected.
The simple example below crashes on a Netduino1 with the 4.2.01 framework.
[font="'courier new', courier, monospace;"]using System;
As soon as it hits the pwm initialization, the board freezes. After many variations of this code and too many erase&reboot sessions, I have checked the enumeration of the available PWMChannels.
[font="'courier new', courier, monospace;"] Debug.Print("None: " + PWMChannels.PWM_NONE.ToString()); Rather disturbing debug.print results: [font="'courier new', courier, monospace;"]None: -1
Same code for PWM_Pin_D6 works as expected (checked with a logic analyzer).
Is the code freezing due to the missing mappings for these pins? And, can I do something to access the onboard led and the pins 3 and 11?
Regards, Sinan #2Posted 11 April 2013 - 12:30 PM Best Answer i dont think the netduino 1 has pwm on the led. also only 4 pwm channs (5,6,9,10);
so iam not suprised your code crashes
http://www.netduino....duino/specs.htm
#3Posted 11 April 2013 - 02:01 PM NooM is correct. Specs for the Netduino 1 I/O are:
digital i/o features ? all 20 digital and analog pins: GPIO ? digital pins 0-1: UART 1 RX, TX ? digital pins 2-3: UART 2 RX, TX [color=#ff0000;]? digital pins 5-6: PWM, PWM[/color] ? digital pins 7-8: UART 2 RTS, CTS [color=#ff0000;]? digital pins 9-10: PWM, PWM[/color] ? digital pins 11-13: SPI MOSI, MISO, SPCK ? analog pins 4-5: I2C SDA, SCL
#4Posted 11 April 2013 - 04:00 PM
Noom, Thanks for the answer, I missed that in the specs.
Intellisense for .NetMF can be annoyingly misleading some times.
Thanks again, Cheers, Sinan Also tagged with one or more of these keywords: PWM, Netduino, PWMChannels
0 user(s) are reading this topic0 members, 0 guests, 0 anonymous users | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | |||||||||||||||||||||||||||