News:

Forum may be experiencing issues.

Main Menu

Raspberry Pi AVR Programmer - Success!!

Started by Ettore_M, September 08, 2013, 02:35:42 PM

Previous topic - Next topic

Ettore_M

I've just programmed my first ATTiny85 using RPi's ISP pins and a patched avrdude which uses RPi's GPIOs for programming...! I don't have to mention I used the usual (and simple) blink.c program as my first program..  ::)

I  don't know. I just felt proud for myself when the LED start blinking..  ;D

Any ideas for useful projects??

Hector
" I would first try what I call The American Approach, which is simply this: "If X is good, then 2X simply HAS TO BE twice as good."  ;D "
- Culturejam

RobA

Cool. I haven't tried using my RPi as a programmer. It would actually be a bit of a pain since it sits in a different place than I sit when I use it. Still, I think I need to try this out now. There are endless numbers of applications for the AVR's. I'm sure you'll dream up quite a few.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rockā€¢it Frog (rock.it-frog.com), DIY effects (coming soon).

Ettore_M

Sure thing!  :)

If you ever get to use it as a programmer, I'm here for any help. I searched a lot and I had a couple of unsuccessful tries before I could make it!  ;)

Hector
" I would first try what I call The American Approach, which is simply this: "If X is good, then 2X simply HAS TO BE twice as good."  ;D "
- Culturejam

rullywowr

That's awesome.  I have been delving deeper into the AVR universe myself, especially with ATtiny85 and others.  Here is a mockup of a board I designed to make it easy to prototype with the ATtiny85...it has header pins which stick the whole rig into the breadboard and a ISP 6-pin programmer.  I have other revisions which have a barrel plug and 5v regulator but this is my mini version:




  DIY Guitar Pedal PCB projects!

Ettore_M

#4
That's nice! I'm gonna be building something like this...

How do you program them? Do you use a dedicated AVR programmer, or maybe an Arduino as ISP programmer?

Main thing with ISP programming on Raspberry Pi is that you actually "bitbang" the programs to the chip (without any buffers --> ISP), and on a 3.3V supply, because 5V must not get back to RPi's GPIO pins, as it will destroy the RPi itself. The 3.3V thing kind of make it harder to explore an AVR's full capabilities. So, soon I'll be building a USB AVR programmer or even an Arduino.

Hector
" I would first try what I call The American Approach, which is simply this: "If X is good, then 2X simply HAS TO BE twice as good."  ;D "
- Culturejam

rullywowr

I tried to respond yesterday but the site was not working...

I prefer to program using the ISP (6pin) interface.  It is quick and allows you to use the entire chip's memory.  I used to use my Arduino UNO as an ISP which works well, however its a pain to have to wire up all 6 connections every time you want to program another AVR.  Plus if you had a project you were using the Arduino for I was going to make a shield which would work however I prefer this:



I got this USBtinyISP programmer from eBay for $12USD shipped.  I really like it a lot as it has both 10 and 6 pin connections (cables included) and it just works.

I see you solved the ol' chicken and egg problem (you can't program an AVR except with an ISP or another AVR)...but as you found out bit banging is slow.   You certainly could turn your newly programmed AVR into a dedicated ISP programmer.  The hardest part for me was learning that you have to hold the SHIFT key down when you click "upload program" using the Arduino IDE.  After that, smooth sailing.

I suppose you could use a logic converter to shift between 3.3v and 5v logics but in the end having a dedicated ISP programmer is awesome.  Highly suggested.



  DIY Guitar Pedal PCB projects!

gtr2

1776 EFFECTS STORE     
Contract PCB designer

catfud

Out of curiousity, has anyone here put an AVR/microcontroller that they've programmed into a guitar effect circuit? I imagine it could make for some interesting mods.

Ettore_M

Nice little programmer this USBTiny. And with ISP, it makes it perfect, really compact and easy to wire.

I feel your pain with the Arduino. If only you could see my current RPi setup. 26-pin (I think) GPIO cable, going to the breadboard, and then I have to wire it all up every time. Now, I don't care as I'm still in the beginning, learning stuff. It's better off that way. But later, I'll want easier and quicker setups.

Yes, exactly like that. I'll upload a bootloader on my ATTiny85 and I'm gonna build the Little Wire project. It's an USB ISP programmer using a ATTiny85 and it's based on the TinyISP of yours. Just a little simpler. More basic, but still does its job. I'll post results soon. Maybe, we could make a project for a DIY AVR programmer. That would be fun!

Can I ask? Do you still use  Arduino IDE to upload your programs to your AVRs?

Hector
" I would first try what I call The American Approach, which is simply this: "If X is good, then 2X simply HAS TO BE twice as good."  ;D "
- Culturejam

rullywowr

It has been done...check out the video from Make Magazine's Colin:

http://www.youtube.com/watch?v=_X0bL6WS-VY

Basically he is using a digital pot fed with tables that simulate sawtooth, sine, and other types of waves to control the distortion.  The AVR microcontrollers really don't have the horsepower to do real time high-quality audio processing.  Other than that, there are some ideas where you can use the AVR as a programmable LFO, or perhaps to switch to complex arrays of components (caps, diodes come to mind).

I'm sure there is some potential for some really cool sounds...



  DIY Guitar Pedal PCB projects!

Ettore_M

Quote from: catfud on September 09, 2013, 09:42:26 PM
Out of curiousity, has anyone here put an AVR/microcontroller that they've programmed into a guitar effect circuit? I imagine it could make for some interesting mods.
Me not. But, that's our ultimate goal here. See Josh's new relay bypass boards, they use a microcontroller.

My personal goal is an easy DIY tap tempo for PT delays (no digital pots). That's what got me started. I have a project going on, but it's still really early. Maybe a simpler tap tempo tremolo.

Hector
" I would first try what I call The American Approach, which is simply this: "If X is good, then 2X simply HAS TO BE twice as good."  ;D "
- Culturejam

rullywowr

Quote from: Ettore_M on September 09, 2013, 09:55:41 PM

Can I ask? Do you still use  Arduino IDE to upload your programs to your AVRs?

Hector

Yes, I still use the Arduino IDE just due to the ease of use and huge amounts of libraries and programs which exist for it.  While it is noble to build a DIY programmer, there are some really awesome ones out there already...I have seen one even that uses all SMD and fits inside a USB plug housing..having trouble finding that one right now but the littlewire is pretty cool

Check out:
http://www.instructables.com/id/VUSBTiny-AVR-SPI-Programmer/
http://littlewire.cc/



  DIY Guitar Pedal PCB projects!

Ettore_M

I'll do that too, with the Arduino IDE. Thanks!

Thanks for the link too. I've checked it out, as many other DIY AVR programmer. I'll just go with the Little Wire. It can be built on a piece of vero with a USB male mounted, and 6 (or 10) pin ISP outputs. I think it can be just compact as you USBtiny. That's what I'm going for.

Hector
" I would first try what I call The American Approach, which is simply this: "If X is good, then 2X simply HAS TO BE twice as good."  ;D "
- Culturejam

rullywowr

Yeah, I like the little wire a lot.  Great size and uses the ATtiny chips.



  DIY Guitar Pedal PCB projects!

Ettore_M

Yes! And luckily, I have one on hand, and the bootloader for it is on the Net free. :)
" I would first try what I call The American Approach, which is simply this: "If X is good, then 2X simply HAS TO BE twice as good."  ;D "
- Culturejam