Welcome to the MIDI Sprout forum

Author Topic: Sprout kit version: how to upload a new program ?  (Read 1435 times)

Offline pelgrim

  • Newbie
  • *
  • Posts: 47
    • View Profile
Sprout kit version: how to upload a new program ?
« on: June 13, 2016, 02:33:31 AM »
How can I upload an adapted program to the sprout ?
I have a kit, so there is not the obvious usb connection like on other boards to connect to the pc.

I have no experience with these boards, I only have a tinyGlo+ (https://www.kickstarter.com/projects/mrjohnk/tinyglo-0)
that I got working with the arduino IDE, closely following instructions.

When I got instructions, first thing I want to do is putting a power safe mode in there that disables the LED light show.

Offline sam

  • Sam
  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • Understand How Your Tools Work!
    • View Profile
    • Electricity for Progress
Re: Sprout kit version: how to upload a new program ?
« Reply #1 on: June 14, 2016, 11:35:56 AM »
I have put two posts under the 'Code' topic which discuss the code and flashing to the ATMEGA chip.

The easiest way to 'reprogram' your sprout would be to connect a programmer like a USBTiny ISP to the MISO, MOSI, etc pins of the ATMEGA Chip and reprogram right on the breadboard.
  you can also use an Arduino as ISP to program the chip.
« Last Edit: June 14, 2016, 11:38:31 AM by sam »

Offline pelgrim

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Sprout kit version: how to upload a new program ?
« Reply #2 on: August 14, 2016, 05:48:42 AM »
was looking into this post again.

I have my chip now on a pcb, and although it's in a socket, I feel nothing for it to put it in and out all the time for reprogramming.

Is there no other way to reprogram the chip then taking it out of the socket ?

I also don't have an arduino, nor do I need one.

Offline sam

  • Sam
  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • Understand How Your Tools Work!
    • View Profile
    • Electricity for Progress
Re: Sprout kit version: how to upload a new program ?
« Reply #3 on: August 14, 2016, 12:32:20 PM »
Yes included on the board is an ICSP header which I used to program the chips 'in circuit'.  This appears as a grouping of six holes at the corner of the circuit board.

By attaching a programmer to these ports, you can flash a new program to the ATMEGA328 chip.  You might want to solder some male or female header to the board in order to make it easy to attach the programmer.  I have been able to program a Sprout just by pressing the programmer against the board, but this does not always work well.

There are many different kinds of programmers which can flash the ATMEGA328 chip:
1. USB AVR programmer - These are a dedicated device which shows up in the arduino IDE and attaches to the ICSP header
2. STK500 - For advanced users who program in other environments than the Arduino IDE, these are powerful and expensive programmers.  I use this model to rapidly deploy programs to multiple devices in the wild.
3. Arduino as ISP - You can attach the ICSP header to any arduino and use that arduino's usb connection to program the Sprout

I know you said you didn't want to buy an arduino but by far the 'easiest' way is to grab an arduino Uno, upload your customized MIDI Sprout program to the arduino, and swap the chips on the Sprout.  In fact if you have an arduino, you can use the Arduino as ISP method above and not have pull any chips!  It will take an additional piece of hardware and some software configuration to make it all work correctly. 

Programming is a gateway drug to Hardware Design.  But it doesn't always apply the other way around.