Friday, January 27, 2012

AVRISP and JTAG ICE MkII Pinout


So, you lucky soul, you have a Atmel JTAG ICE Mk II on the bench. Can't remember the pinout for the AVRISP port? Or the color codes on the squid cable? Me either. How are you going to program your Atmega microcontroller now? With this reference guide.

This table shows color, AVRISP pin, and ATmega328P pin corresponding to MISO, MOSI, SCK, RESET, Vcc and GND.

Squid
ISP
ATmega
Function
Squid
Pin #
Color
Function

6-pin
AVRISP
Pin #

328P
Pin
TCK 1BlackSCK319
GND 2WhiteGND68,22
TDO 3GreyMISO118
VTref 4PurpleVcc27
TMS 5Bluencncnc
nSRST 6GreenRESET51
Vsupply 7Yellowncncnc
nTRST 8Orangencncnc
TDI 9RedMOSI417
GND 10Brownncncnc


Here's the AVRISP pinout diagram for both the 6-pin and 10-pin AVRISP header. Even if you're not using a JTAG ICE (I often use a Pololu USB programmer) this comes in handy when you want to plug the AVRISP header into a breadboard.



If you're using a 28-DIP ATmega328P, this pinout diagram may help. This should work for an ATmega8, ATmega48, ATmega88, ATmega168, and other 28-pin ATmega AVR microcontrollers (check the datasheet).


This diagram shows AVRISP pinout diagram for programming ATtiny2313, ATtiny2313A, ATtiny4313 AVR microcontrollers.



An easier way to program your ATtiny2313 (or ATtiny4313) is to use one of my eeZee Big Tiny target boards on Tindie. Program with FTDI and 6-pin AVRISP headers. Includes 16MHz crystal onboard. Hust hook it up and program

Here's a pinout diagram for an 8-DIP ATtiny11, ATtiny12, ATtiny13, ATtiny25, ATtiny45, ATtiny85, and other 8-pin Atmel ATtiny AVR microcontrollers (check the datasheet).


An easier way to program your ATtiny13 is to use one of my eeZee Tiny prototyping boards, available on Tindie. The 6-pin AVRISP header is provided, just hook it up and program.

eeZee Tiny makes it easy to prototype and program your ATtiny


Sources:
http://redmine.ruinwesen.com/projects/golem-public/wiki/JTAG_ICE_MKII_pinouts
http://www.atmel.com/dyn/resources/prod_documents/doc2562.pdf

Friday, January 20, 2012

Encoder Board Evolution

The old encoder board I fabbed for Data Bus has failed. Rather than repairing several lifted traces on the old one, I felt that a more reliable approach was to order a professionally fabbed board via OSH Park.

I took the opportunity to redesign using SMT components so I could shrink the board.

Old board above, new SMT board below
The old design was based on an LM393 dual comparator IC configured as a schmitt trigger. So is the new board, but instead of a single IC, it was easier to route traces using individual, Texas Instruments TL331, SOT-23 comparators. All the passives are 0603 size and the LEDs are 1206 size.

I'm still working on my technique for hand soldering SMT. Here are some things that seem to work so far:
  • Push components out of their tape using the point of a small nail
  • Tin the pads then suck off the solder with solder braid
  • Use a flux pen on all the pads
  • Use a really small tip and a decent iron
  • Use 0.015" solder; I use Radio Shack silver bearing solder
  • Use non-magnetic pliers/tweezers to pick and place parts
  • Use the nail tip to gently nudge them around on the board
  • Hold the parts down with the head of the nail while you solder
  • Tack down one side of the component, add solder if needed
  • Then add solder to the opposite side while holding it
Components tend to get pulled vertical by solder surface tension if you have too much solder on the pads so that's why it seems to work better to remove some solder and to hold the component down with a nail.

It's pretty darned tedious. I ended up reflowing the SOT-23 comparators using my reflow skillet. As I have two encoder boards to populate, I will try reflowing all the parts on one of them and see if that is any easier.

Hopefully the new board will hold up better to the rigors of testing and competition than the home fabricated board. Plus, I'll have spare boards in case something goes awry.

Friday, January 13, 2012

Geek Destinations: JB Saunders


I had some time off during winter and I had a free day all to myself so I headed up to Boulder to meet a friend and visit JB Saunders. This place should be on every geek's bucket list. Holy cow...

Saturday, January 7, 2012

AVC 2012: On The Waiting List

Crap! I'm on the "backorder list" for the 2012 Sparkfun AVC!

That means several people have to officially drop out or I won't get to compete at all this year! I didn't see the announcement until a day after and apparently, by that time, all 50 slots had already been filled. I am in the top five on the waiting list, though, so there is still a glimmer of hope.

I don't know if I will get to compete but what is certain is that Data Bus development will continue and you'll read about it here.

Equally certain is that I will be hoping and praying that at least 5 other contestants fail miserably and give up... (is that wrong of me?)

Friday, January 6, 2012

LPCXpresso Surgery

I have an LPCXpresso now. The board breaks out a 120MHz LPC1769 to DIP form. Attached to the board is an LPC-Link, a JTAG debugger. To use both boards conveniently, they need to be separated. One of my readers, Nemo, suggests an Xacto hobby saw and mitre box to split the boards apart. He achieved very nice, precision cuts this way.


My approach for cutting apart the LPCXpresso and LPC-Link involved use of a plastic cutter and utility knife shown above.
  • Use solder braid to remove the solder from the solder jumpers between both board halves.
  • Then score a line with plastic cutter on both sides using straight edge and (gently) vise. 
  • Score until you can't easily go deeper. 
  • Continue scoring with the narrower utility knife to score a bit deeper
  • Snap the board in half by hand without much effort. 
  • Sand both edges.
Now mount male header pins on one side, female header socket on the other, et voila. Plus, no cables to deal with.