Arduino Mega 2560

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
trisbillers
Posts: 13
Joined: Wed Aug 29, 2012 8:49 pm
Has thanked: 3 times

Arduino Mega 2560

Post by trisbillers »

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
Attachments
620277_solidcure_16_remote_fully_addressable.fcf_avr
(83.98 KiB) Downloaded 262 times

User avatar
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

Post by Benj »

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.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: Arduino Mega 2560

Post by dazz »

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
Arduino Mega ADK 2560 pwm.fcd
(21.78 KiB) Downloaded 249 times
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

trisbillers
Posts: 13
Joined: Wed Aug 29, 2012 8:49 pm
Has thanked: 3 times

Re: Arduino Mega 2560

Post by trisbillers »

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.

Post Reply