Does anyone do Attiny programming?

Sprinkles

Newly Enlightened
Joined
Aug 26, 2009
Messages
111
Location
Nor Cal
I was just wondering if anyone does, or can do, Atmel chip programming? I was curious.....I was contemplating getting into it (buying the materials, learning coding....etc....but was hoping to get some insight first.)

Thanks!
GR
 

bbawkon

Newly Enlightened
Joined
May 20, 2011
Messages
73
I use Atmel, Microchip, and many 8051 variants every day... Atmel programming is quite easy once you get over the initial understanding.. If you want a simple way to get started, have a look at MikroBasic for AVR (Atmel). It just doesn't get any easier than that.

Ben
 

Sprinkles

Newly Enlightened
Joined
Aug 26, 2009
Messages
111
Location
Nor Cal
Thanks. I've been wondering why more people haven't tried to reprogram the Attiny chips (mounted on drivers for lights) to get exactly what they want in a light. I've seen it once or twice, but it's random, and it's not available for others to use. I was thinking how AWESOME it would be to be able to do that. Looks like I'm going to have to take a crash course....!!!!!

Many people like the programmable lights and the low-lows and all those specific "wants" in a "perfect" llight (haha).
 

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,411
I started working with Atmel microcontrollers a little over a month ago. To someone who's never taken a lick of electrical engineering it can be quite daunting at first, but it gets easier quickly. Be prepared to learn about things you never thought you'd need to know, like voltage regulators, transistors and capacitors.

I'm working with the Attiny13A in the QFN footprint, which means it has no legs coming off the sides to solder to. All the pads are on the bottom. I wasn't able to find a socket to place the tiny controller into to program it so I had to make one from scratch with wires and hot glue (along with a regulated power supply). It was a huge amount of work but the first time I powered it up made it worth it.

My suggestions:
- Use a microcontroller with EEPROM. Non-volatile storage is a god-send.
- Once you pick your microcontroller, read the datasheet over and over again. It's all gibberish at the start but the pieces will quickly fall into place and you'll find it's the very best source of info.
- Wire your RESET pin to VCC through a 4.5k resistor (if it's a "reset low" device). I really wish I'd figured this out earlier. If you don't apply power to RESET, the microcontroller is stuck in a reset loop forever.

and most importantly:

- Respect your eyes. I spent 11 hours one day creating my programming socket out of wires a half-millimeter thick. The next day I could barely focus them. It's 2 weeks later and the eye strain is still bothering me. Do your intricate work in short bursts and give your eyes plenty of rest. Blink often. I know, it sounds really silly, but my biggest takeaway from the entire experience has been that I don't want to wreck my vision over a hobby.

All that said, the very first time you load code onto your tiny device and fire it up, it's a great feeling to watch your LED's light up and dance to your tune.
 

Sprinkles

Newly Enlightened
Joined
Aug 26, 2009
Messages
111
Location
Nor Cal
Thanks for the info!

Hopefully I can avoid the complications of other SMD's and etc. as I'm going to stick to programming while still mounted on an esisting LED driver (avoiding the need to solder/desolder): you can use an 8pin SOIC clip (3m makes some and other cheapies exist too) to do the job. I plan on flashing my own program (easily modified) for driving LED's how someone wants - not how it comes. I "THINK" it can be done easily enough.....I also think the hardest part is going to be the programming. Maybe there's someone willing to let me bounce ideas/problems off of as I get into it more??

Just a thought....
 

bbawkon

Newly Enlightened
Joined
May 20, 2011
Messages
73
You made a QFN Socket? My god.. These chips are in-circuit programmable! A few via holes, test points, or a broken out header and you can program away..
 

moderator007

Enlightened
Joined
Jan 1, 2010
Messages
990
Hi Sprinkles,

There is a member of another forum who done the same thing you are trying to do. His name is tido. His thread is very interesting reading. He gives some ideas as of what you need and what he did. His files are free for download all you have to do is program the attiny13 on the board. I dont know if linking another forum is allowed here. So if you do a google search for "How To Build a Flashlight With Perfect Modes" it will be the first link. I have been wanting to try this myself.
 

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,411
You made a QFN Socket? My god.. These chips are in-circuit programmable! A few via holes, test points, or a broken out header and you can program away..

No room on my PCB for a programming header - space constraints are incredibly tight.
 

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,411
You made a QFN Socket? My god.. These chips are in-circuit programmable! A few via holes, test points, or a broken out header and you can program away..

Since I have no problem admitting that I'm somewhat proud of my creation, some pics for your viewing pleasure. You can see where the eye strain came from. :)

socket1r.jpg


socket2.jpg
 

bbawkon

Newly Enlightened
Joined
May 20, 2011
Messages
73
That is quite the creation :) I say again.. My god.

It's not QUITE as bad as I originally pictured since that is a DFN, not a QFN, but it still looks pretty horrendous to fabricate. Wouldn't it have been easier to use pogo-pins? Drill some holes in a non-conductive material (plastic/fr4/cement/whatever) that line up with the pads on the DFN, insert pogo pins?

Ben
 

Microa

Enlightened
Joined
Mar 10, 2011
Messages
256
I am also an one month old newbie. I like to use SOIC-8 packing MCU but DIP is more convenient for testing. Go ahead and enjoy DIY.
 

georges80

Flashlight Enthusiast
Joined
Oct 23, 2002
Messages
1,262
Location
Sunnyvale, CA
Pogo pins and you don't need to waste room for a 3x2 header on the board. Many of the pads needed for programming can then be easily accessed where they go to various places on the design.

Here's a 15mm diameter driver using a QFN TINY45 on a boost driver (components both sides).

pogo.jpg


cheers,
george.
 

MikeAusC

Enlightened
Joined
Jul 8, 2010
Messages
995
Location
Sydney, Australia
An alternative approach is to use a Picaxe chip - you program in Basic on a PC and loaded it to a special MicroChip device. Available from 8 pin to 28 pin.
 
Top