atmega168 won't work outside of arduino

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
joeelp
 
Posts: 17
Joined: Mon Mar 30, 2009 6:37 am

atmega168 won't work outside of arduino

Post by joeelp »

*NOTE* I made this harder on myself, the computer I'm using didn't have photoshop on it, and when editing the pic down in mspaint I accidentally flipped it. I know everything looks like I wired it up on the wrong side, but its reversed. Look at the row numbers on the breadboard and you'll see.

I'm trying to move on to making my own circuits outside of the arduino, and as a result I've purchased a few 168s. I use the usbtinyISP to bootload them by attaching it to the arduino (duemilanove), then I add my code and run it, and it works fine. However, when I try to build a circuit on a breadboard, I can't get the chip to do anything.


I've attached a picture of the breadboard.
pin 1 is attached to 5v high through a 10k resistor.
pin 7 is attached to Vcc (I've tried 5v and 9v, both stable)
8 is ground
i've tried 9 and 10 connected by a 16 mhz crystal and without the crystal, no luck.
pin 14 (and a few others) should turn on the attached led, but they don't.
pin 20 is attached to Vcc/pin 7
pin 22 is attached to ground/pin8

thats it. the only thing that happens is sometimes the lower end (pin 14-15 end) gets hot. Please, tell me what I'm doing wrong here.

Thanks for your help, in advance.
23.JPG
23.JPG (194.76 KiB) Viewed 2081 times
Attachments
24.JPG
24.JPG (112.37 KiB) Viewed 2083 times
Last edited by joeelp on Fri Apr 17, 2009 6:11 pm, edited 1 time in total.

User avatar
vbu
 
Posts: 18
Joined: Tue Dec 23, 2008 9:02 am

Re: atmega168 won't work outside of arduino

Post by vbu »

You should never connect more than 5V directly to the chip! The arduino/boarduino etc. allow 9V because they have voltage regulators (together with capacitors and resistors) dropping the 9V to 5V.

Looking at your wiring, you've got the crystal on the wrong side of the chip. Plus, posts on the arduino forum recommend placing 22pF capacitors going to ground on each leg of the crystal.

Have a look at this site http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard.

User avatar
joeelp
 
Posts: 17
Joined: Mon Mar 30, 2009 6:37 am

Re: atmega168 won't work outside of arduino

Post by joeelp »

I know, I just tried repeatedly to get it to work at 5v, i thought I'd try SOMETHING else. I've done this circuit twice, once on a protoboard. And I know it looks backwards, I was in a hurry to post and somehow accidentally reversed the pic. Look at the numbers on the breadboard rows, they're also reversed.


thanks!

User avatar
vbu
 
Posts: 18
Joined: Tue Dec 23, 2008 9:02 am

Re: atmega168 won't work outside of arduino

Post by vbu »

Can you post a corrected photo then ? It makes it really hard to help with everything flipped like that!

Did you have a look at that website I linked to ?

--Edit --

OK I downloaded the photo and flipped it myself and the crystal looks ok. Have you tried adding the capacitors to the crystal ? And what does the 2nd photo show ? That wire isn't connected to anything

Ver

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”