I am trying to program an Arduino MEGA 2560 R3 with Flowcode 6.
I have a very simple program, attached, which is just supposed to be toggling one I/O pin on and off. When I do this with pin D0 of an Arduino UNO, it works as expected. When I try this with the Arduino MEGA 2560, the pin remains tri-stated.
I'm guessing that the data direction register isn't getting configured. Is this a known problem on the MEGA? Is there something else I need to do?
Flowcode with AtMEGA 2560
Moderator: Benj
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Flowcode with AtMEGA 2560
Hi Billuck!
I have removed your unused component from the dashboard, the display and a potentiometer. After this I am able to compile to hex.
I think you are able to program the Mega now.
Best regard
Jorgen
I have removed your unused component from the dashboard, the display and a potentiometer. After this I am able to compile to hex.
I think you are able to program the Mega now.
Best regard
Jorgen
- Attachments
-
- Hello World_Mega_ work_NOW.fcfx
- (8.35 KiB) Downloaded 227 times
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: Flowcode with AtMEGA 2560
I know it is something simple. I tried it on a new MEGA r3. no success.
I tried your corrected? code, even deleted the subroutine and POT. no success
Hooked up a LED. Blinks as commanded on an UNO. No success on a MEGA.
Checked the orientation of the AVRISP programmer on the header.
I tried the 6 variants for Mega 2530.
I tried your corrected? code, even deleted the subroutine and POT. no success
Hooked up a LED. Blinks as commanded on an UNO. No success on a MEGA.
Checked the orientation of the AVRISP programmer on the header.
I tried the 6 variants for Mega 2530.
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Flowcode with AtMEGA 2560
Ok, I Will try to program a Mega with your program later today and see what happen. Maybe it is something with your driver.
Have you tryed to program with Xloader?
Have you tryed to program with Xloader?
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: Flowcode with AtMEGA 2560
You have brought up a very good point. It was a setting within the downloader. Thanks for swatting my brain.
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: Flowcode with AtMEGA 2560
BTW, can FC compile and transfer to chip, as indicated by one of the buttons?
- 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: Flowcode with AtMEGA 2560
Hello,
Yes Flowcode can program an Arduino via it's USB connection as long as the bootloader is present on the Arduino. The only Arduino we cannot program correctly is the Mega2560 without the R3 marking, for this we recommend the Xloader tool.
Flowcode can also program the AVR devices using a number of programmers. The default is the AVRISP mkII but we also support the TinyISP and a number of other programming tools supported by the AVRdude programming software.
The programming is done using batchfiles which all reside in this folder "Flowcode 6\compilers\avr\batchfiles".
avrc_*** are the programming batch files.
The batch file being called is fixed for Arduino but can be edited for other AVR targets by clicking Build -> Compiler Options -> Programmer Tab.
Yes Flowcode can program an Arduino via it's USB connection as long as the bootloader is present on the Arduino. The only Arduino we cannot program correctly is the Mega2560 without the R3 marking, for this we recommend the Xloader tool.
Flowcode can also program the AVR devices using a number of programmers. The default is the AVRISP mkII but we also support the TinyISP and a number of other programming tools supported by the AVRdude programming software.
The programming is done using batchfiles which all reside in this folder "Flowcode 6\compilers\avr\batchfiles".
avrc_*** are the programming batch files.
The batch file being called is fixed for Arduino but can be edited for other AVR targets by clicking Build -> Compiler Options -> Programmer Tab.
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
-
- Posts: 159
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Re: Flowcode with AtMEGA 2560
When using the AVRISP mk2, I have been erasing the device. I assume that this includes the boot loader. Can I reinstall the boot loader? If so, where can i get it?
- 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: Flowcode with AtMEGA 2560
Hello,
Yes if you've programmed using the AVRISP then the bootloader will have been overwritten. Bootloaders and instructions to reflash can be found on the Arduino website.
Yes if you've programmed using the AVRISP then the bootloader will have been overwritten. Bootloaders and instructions to reflash can be found on the Arduino website.
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