Build comments & programming help

Finally got around to building my MIDIpal today. Once I got accustomed to the microscopic size of the components, all has gone well so far. I’ve stopped after step 10, and decided to test power and try to flash the firmware. Some comments/questions:

  • Nowhere in the documentation does it say what DC power supply is required - would be nice to add that. By reading the forum, it seems that anywhere between 5v-9v is OK, but I could not find what minimum current is necessary. I am using a DC 9V, 0.66A, center pin positive wall wart, and that gives me 3.3V at the test points as expected.
  • Nowhere in the build does it say where to connect the battery wires. Would be helpful for noobs and kit builders (like me) who appreciate things as cookbook-ish as possible! Also, probably worth commenting in the build notes at that point that the switch in that location chooses between battery and wall wart power; I wasted time scratching my head to figure out why I was not getting any power at the test points when powering by battery, only to realize later that the switch was in the wrong position.
  • Now where I need help, the firmware flashing. I have a Ladyada usbtiny, and am using avrdude. After typing the following to set the fuses:

avrdude -B 100 -V -p m328p -c usbtiny -P usb -e -u -U efuse:w:0xfd:m -U hfuse:w:0xd4:m -U lfuse:w:0xff:m -U lock:w:0x2f:m

I get:

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

Does this mean that avrdude does not see the chip? I tried it with the usbtiny 6 pin connection oriented in both directions when connecting to the ISP header (btw, it kind of stinks that you can connect it either way? I suppose I need to look up the usbtiny cable pin configurations, and those on the MIDIpal ISP header, to know which is the correct way to attach them?)

Thanks in advance…

  • I have updated the assembly instructions to specify the power supply required for testing (it was already in the manual) ; and I have added the bit about the battery clip leads.
  • I will make an illustration about the positions for the power switch.

Regarding the error message you get, it means that avrdude does not see the chip. Here is how to hook up the cable (there’s a little line on the PCB indicating on which side the pin 1 of the connector / red cable is):

I hope that the USB tiny has the same pinout!

Is the board powered when you are trying to flash it? The AVR ISP requires the board to be powered externally during programming. I don’t know if the USB tiny attempts to power the board but I doubt so (it has no way of figuring out if the board must be powered at +5V or +3.3V).

Thanks Olivier.

I had thought I looked through all manuals for the power supply specs, I must have missed. Anyway thanks for adding also to the build manual, and the other additions too.

The USBtiny does have a red line on the cable, and yes, I was powering the board. I retried just now using your picture as a guide, and still get the same error. So is my next place to look for problems at the chip itself? I’m wondering if I was maybe too aggressive in using solder wick to remove some of the bridges that I had, and maybe not all pins are well connected? Is there any way to test the adequacy of the soldering of the chip, other than trying to initialize it? (and check for no adjacent pin connectivity, which I did check and all is good there).

Unplug the USBtiny. Check that the ISP connector pins are well connected to the matching m328p leads using this diagram:

Thanks Olivier, will check tonight!

Hi dnigrin,

I can see that you’re using an usbtiny programmer.

Incidentally, i’ve experienced a lot of difficulties programming my midipal also because the usbtiny firmware provided by sparkfun is simply not compliant with windows seven.
Even though the tool was detected by my windows system properly, it just wouldn’t work and i’ve had several error messages.
In the end, I exhumed one computer working under XP, installed the firmware on it and everything went well and straightforward.

If you read the usbtiny page comments on sparkfun, you’ll notice that some users have provided a (pretty annoying to realize) tip to have this little programmer working under windows seven. I hadn’t it working, but anyway i was too pissed to try and take my time to really understand what’s going on.

So, if you’re under windows seven (or vista maybe), and if it’s the first time you’re using the usbtiny programmer under this OS… You might consider this track.

edit : oh, and btw, if the board is self-powered (think about the little switch on the usbtiny), it’s not a problem trying to put the 6 pin cable in one and the other direction.
From what I remember, the proper way to connect it is, when you’ve got the midipal in front of you, the cable is ahead of the header, not on your side.

Thanks MicMicMan, but on OS X here… thanks for the tip re: which way to orient the cable, I’m pretty sure that’s how I had it (not in front of it now…)

OK, false alarm - the problem was the jumper on the usbtiny (I think this is what you meant MicMicMan when you said “think about the little switch on the usbtiny”). Anyway, I had the jumper ON, and it should have been OFF. Now the flashing went fine! Thanks all for the help…

Fully up and running, worked first time!

Only complaint - 4 of the screws are too long! There were 8 screws, 4 short and 4 long; 8 short are needed… Will have to find some replacements.

One feature I love - the little “hooks” in the bottom of the case to hold the (included rubber bands, which in turn hold the battery in place, to keep it from flopping around inside the case. Great touch)

jumper eh? wonder what the purpose of that is? any more info on this? must have a look later and see if mine had it switched on or not…

on the tinyusb there’s a tiny switch (at least on mine it’s a switch and not a jumper) to allow you either to power the µC through the programmer, either to have it self-powered.

On mine it’s a jumper - more info here

actually we’re not speaking of exactly the same product
how weird is that

I mixed the Spacers from 2 Suppliers for the very first run. Although both being the same Specs one fits and about 15 Spacers doesn’t (i don’t checked them). I can send you the replacement screws.

The Battery Hooks a an Hommage to Jonny Ive Minimalism :wink:

@MicMicMan - interesting! Basically the same core product, but looks like Sparkfun added a switch rather than a jumper, as on the Adafruit version…

@fcd72 - Johnny (and Steve!) would be proud… :wink: Thanks in advance for the replacement screws, I will email you my info.