HI, All,
I have an issue with the PWM Output not working on my Arduino mega 2560.
I have tried different output pins and setting and have not been successful. Could someone please help me in resolving this issue.
I have attached My code, and every thing apart form the PWM is running fine on our hardware.
any help would be appreciated.
Thanks
Tristan
Arduino Mega 2560
Moderator: Benj
-
- Posts: 13
- Joined: Wed Aug 29, 2012 8:49 pm
- Has thanked: 3 times
Arduino Mega 2560
- Attachments
-
- 620277_solidcure_16_remote_fully_addressable.fcf_avr
- (83.98 KiB) Downloaded 262 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Arduino Mega 2560
Hello Tristan,
I've just tried the Mega 2560 and the PWM is working fine. Which PWM channel are you using? It could be that the numbering of the PWM channels is maybe not as you are expecting. I think PWM channel 2 should be connected to Arduino Digital Pin 4. If you like I can make a list of all the Mega's PWM pins and what they relate to on the Arduino hardware.
I've just tried the Mega 2560 and the PWM is working fine. Which PWM channel are you using? It could be that the numbering of the PWM channels is maybe not as you are expecting. I think PWM channel 2 should be connected to Arduino Digital Pin 4. If you like I can make a list of all the Mega's PWM pins and what they relate to on the Arduino hardware.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Arduino Mega 2560
Hi
This may help , if it helps save the fcd , then pop it in your fcd folder and choose the new device, it lists the pwm pins ie pwm(1) pwm(16) etc on the chip view(see screenshots here http://www.matrixmultimedia.com/mmforum ... ins#p37017), also note that in flowcode you have 16 pwm pins instead of 14, also please bear in mind the pwm channels are numbered as per the atmel datasheet not the arduino standard, also one to note is 2 pwm channels (1 and 5) are shared on pin pb7 so if you selected channels 1 and 5 you would only get 1 to work as they share a pin not sure why just atmels wierd way of doing things)
Regards
Dazz p.s benj you can add the attached to the master fcd file if you want so there the standard fcd and the one showing pwm)
This may help , if it helps save the fcd , then pop it in your fcd folder and choose the new device, it lists the pwm pins ie pwm(1) pwm(16) etc on the chip view(see screenshots here http://www.matrixmultimedia.com/mmforum ... ins#p37017), also note that in flowcode you have 16 pwm pins instead of 14, also please bear in mind the pwm channels are numbered as per the atmel datasheet not the arduino standard, also one to note is 2 pwm channels (1 and 5) are shared on pin pb7 so if you selected channels 1 and 5 you would only get 1 to work as they share a pin not sure why just atmels wierd way of doing things)
Regards
Dazz p.s benj you can add the attached to the master fcd file if you want so there the standard fcd and the one showing pwm)

To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 13
- Joined: Wed Aug 29, 2012 8:49 pm
- Has thanked: 3 times
Re: Arduino Mega 2560
Thanks for the replies guys..
What you have said is now making sence, As I was going buy what was on the arduino board and not the chip.
I am on the iPad at the moment so when I get back to the pc I will take a look at what you send me dazz.
Thanks guys.
What you have said is now making sence, As I was going buy what was on the arduino board and not the chip.
I am on the iPad at the moment so when I get back to the pc I will take a look at what you send me dazz.
Thanks guys.