Show Posts
Pages: 1 2 3 [4] 5
46  Using Arduino / Microcontrollers / Re: Using Arduino to upload a sketch to a second MCU without removing Arduino MCU on: June 21, 2013, 11:18:30 pm
Right... I just figured it out.

You can use an Arduino with ArduinoISP on it to program a second MCU via the ICSP pins.

The bit that was throwing me of was that you have to burn the bootloader each time before using File->Upload Using Programmer.

From what I understand ArduinoISP will over write the bootloader like a real ISP. But I get the idea it needs the bootloader to actually write to the MCU.
(Hence the need to write the boot loader to the second MCU before sending the actual sketch)

This also removes the need to remove the MCU from the Arduino that is doing the programming.

Here are some of the links that put me on the right path...
http://wirejungle.wordpress.com/2010/08/16/programming-arduino-with-arduino/
http://letsmakerobots.com/node/35649
47  Using Arduino / Microcontrollers / Re: Using Arduino to upload a sketch to a second MCU without removing Arduino MCU on: June 21, 2013, 10:26:16 pm
If you have an ISP device and separate ICSP headers for both processors you can use Upload Using Programmer to upload sketches.  You can get a USBasp programmer for under $4.

Sorry I am still consuming the information....

Am I correct in saying that you can load the ArduinoISP sketch onto an Arduino board, connect it to a ATMEGA328 MCU and upload another sketch to the ATMEGA328 from the Arduini IDE ->File-> Upload Use Programmer (After setting the programmer to ArduinoISP) menu?
48  Using Arduino / Microcontrollers / Using Arduino to upload a sketch to a second MCU without removing Arduino MCU on: June 21, 2013, 06:16:43 pm
Hi.

I am designing a shield that has a second MCU on it. How can I upload a sketch to the second MCU using an Arduino+Arduino IDE without removing its MCU? (Basically using the Arduino as Programmer.)

Example: I have a Arduino Uno SMD that I want to use to program the second MCU.

I have already manged to burn a bootloader to the second MCU by using Nick Gammon's sketch that you run on the Arduino and then
burn the bootloader to the second MCU. http://www.gammon.com.au/forum/?id=11635 (Amazing stuff by the way!!!)

I don't mind if the sketch get flushed to both MCU's  (I tried wiring up the RX/TX from the Arduino to the Second MCU and uploading but that
also didn't work )

Nick also has a nice tutorial on how to use an Arduino to upload a HEX file to another MCU but you need a SDCard to store the HEX.

Is there a reason that two ATMega328 MCU can't be programmed in parallel?

any clues or ideas?
49  Using Arduino / Microcontrollers / Re: Arduino Due on a Breadboard? on: June 21, 2013, 06:02:13 pm
I totally agree... I would also like to see an introduction into use the ARM based MCU used on the Arduino DUE.

I think the issue with creating a breadboard compatible breakout board for the SAM3X8E is that it has 144 pins vs the 28 you have on the ATMege328.

Far out 72 pins per side... smiley Would almost fill up the length of your breadboard. It can be shortened by only breaking out the important pins.

50  Using Arduino / Microcontrollers / Re: Upload Sketch using ISP - Is possible ? on: June 21, 2013, 05:13:03 pm
Take a look at NickGammon's writeup, I think this will help you

http://www.gammon.com.au/forum/?id=11635


Thanks for that!!! Nick Gammon has some amazing stuff going... I had a look at his hex writer that writes hex files from an SD card to a target board.

Well worth the read...  http://www.gammon.com.au/forum/?id=11638
51  Using Arduino / Microcontrollers / Re: Upload Sketch using ISP - Is possible ? on: June 21, 2013, 02:59:29 pm
Take a look at NickGammon's writeup, I think this will help you

http://www.gammon.com.au/forum/?id=11635


thanks for that... I was wondering about the reset pin... smiley

Nick Gammon to the rescue, again. (He has a nice write-up on RS485 to smiley
52  Using Arduino / Microcontrollers / Re: Upload Sketch using ISP - Is possible ? on: June 21, 2013, 02:10:49 pm
As retro pointed out:
- Did you Select Uno as the target board?   (Tools -> Board)
- Did you select the correct serial port for the Uno board?   (Tools -> Serial Port)
- Did you upload the ArduinoISP sketch to your Uno?    (File -> Upload)
- Did you then wire the Mega up for ISP communications with the Uno?
- Did you then select "Arduino as ISP" as the programmer?   (Tools -> Programmer)
- Did you then select Mega as the target board?   (Tools -> Board)
- Did you then select "Upload using Programmer"?   (File -> Upload using Programmer)

thanks for the above info.

I managed to get it working once but now I can't get it going again.

I have two Arduino Duemilanove's that I am testing with and I connected the two via the ICSP pins. (Can I do it this way or is the wiring wrong?)

On the target chip I want to program. Do I first have to upload the bootloader before this will work? (How do I know if board has a bootloader installed?)
53  Using Arduino / Microcontrollers / Re: smd atmega328: flashing bootloader seems okay, programming yields sync-error on: June 21, 2013, 01:03:18 pm
I just wondering. What is the main reason that we can't use Arduino UNO SMD to program other MCU's?

I know if you have the DIP version you need to take the MCU out...
54  Using Arduino / Programming Questions / Re: Forcing users of your library to implement functions for their hardware. on: May 27, 2013, 04:58:20 am
thanks Majenko and  Aarondc... I managed to get it work with my library. smiley-grin
55  Using Arduino / Programming Questions / Re: Forcing users of your library to implement functions for their hardware. on: May 27, 2013, 04:35:46 am
Thanks for the suggestions....

Will this work with C or is this just a C++ thing?
56  Using Arduino / Programming Questions / Re: Forcing users of your library to implement functions for their hardware. on: May 27, 2013, 04:13:59 am
In C# this can be done with interfaces and events. But I can't seem to find a example of this for Arduino.

I have looked at Function pointers but my libraries code can't see the code in the Arduino IDE.
57  Using Arduino / Programming Questions / Forcing users of your library to implement functions for their hardware. on: May 27, 2013, 04:11:12 am
Hi...

I am not sure how to ask this but I will try my best to explain what I want to do.

I want to execute a function inside my custom library that needs to be declared inside
the ino Arduino IDE file.

What this achieves is that I can execute user defined code inside my library at
required intervals. Basically I have an event and I want to give the user the capability
to define what they want to do when my event fires.

Being able to do the above enables the user to write code suited for their hardware to
work with my library. 

I am sure this is doable I just can't get working with the Arduino IDE.
58  Development / Other Software Development / Re: Library Examples with config files. (Linking issues) on: March 12, 2013, 03:03:45 am
Thanks for that...  smiley-cool
59  Development / Other Software Development / Re: CodeBlocks Arduino IDE - real C++ IDE for Arduino (Rev. 20130308) on: March 12, 2013, 02:31:13 am
Looks very interesting!!!
60  Development / Other Software Development / Re: Library Examples with config files. (Linking issues) on: March 12, 2013, 02:27:15 am

Do you have a link to the Arduino IDE code? I would not mind taking it apart... The IDE is just a simple wrapper so it might not be that hard.

Your second option sounds a lot like dependency injection where you need to inject all your data/settings/object into the constructor/Initializing function. (That will be a lot of work cause I have hundreds of settings.)

thinking of it, I could use a define statement that specifies the board type and configures the config file based on that. Might be the best option as the user starting out with the library will then not see the hundreds of settings and get confused by it.

Pages: 1 2 3 [4] 5