Pages: [1] 2   Go Down
Author Topic: 1 chip Arduino  (Read 2329 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello there!
Some days ago I got an Arduino Duemilanove.. You know you can't just have only one after some hours of tinkering with it! ;D

So.. I bought some ATMEGA168 to play with (not as Arduinos, but..). Can these little guys be "Arduinos" but WITHOUT any external component? Something like http://www.geocities.jp/arduino_diecimila/obaka/project-2/index_en.html, maybe?

I'm not asking for complete projects, tutorials etc, but for information like if I'll need a custom bootloader etc smiley-wink

It would be perfect, as I build everything on breadboards! Short lifes, but that's the game smiley-grin
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 112
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You pretty much can, yes, if you use the internal oscillator.  Otherwise at the very least you need a crystal or resonator.  You can check out this topic for how to run from the internal oscillator.  However, there are some advantages to using a more complete unit, such as onboard programming header & reset button, onboard voltage regulation, onboard reset switch, all of which are optional but make things much easier, and you can get them in various combinations on breadboard-friendly units.

There's another person on this forum working on breadboard compatible arduino form factor: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1239733868

As well as a couple of commercially produced options:
http://www.ladyada.net/make/boarduino/
http://www.moderndevice.com/RBBB_revB.shtml

I'm partial to the RBBB myself, since it's a bit narrower than the Boarduino and you can cut off the power section to make it shorter (I use a regulated supply for breadboarding anyway, so it's not really necessary).

Note that some of the smaller units don't have USB onboard, so you need something like this as well: http://www.sparkfun.com/commerce/product_info.php?products_id=9115

A separate USB-Serial adapter is also useful if you want to build custom boards down the road and don't want to have to incorporate a USB converter onto each one.

As to the bootloader, you only need to mess with that if you depart drastically from the standard Arduino design (using a different AVR, different clock speed, IE).  Otherwise, you can just pick up a pre-bootloaded 328 or 168 from any Arduino-friendly store and put it straight to use.
« Last Edit: July 25, 2009, 08:20:07 pm by ajb » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To be compatible with the Arduino IDE system the standalone 168 chip needs just a few external components. A pull up resistor for the reset pin and either a 16mhz resonator or a 16mhz crystal and two caps. It's also good to have a couple of .1mfd bypass caps for the +5vdc voltage pins.


Lefty
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies guys!

I don't really care if I blow them up, I'm just testing (& learning). All those "extra" components may be good for the Arduino, but all I see is a board-component-hell! smiley-sad I'm learning though smiley-razz

I also don't care for the power, I can feed the AVR 5volts directly from the USB. If that doesn't work, I can use the regulator on my old *stamp board smiley-wink

As for the USB to Serial, I have this one available, I think it works, doesn't it? http://www.m3-online.com/catalog/images/usb-to-serial-1.jpg

I can't go for "shopping" because it's a long trip from my home and I can't buy from abroad because I don't have a CC/DC yet. So that's why I'm trying to build it with what I have available :-[

EDIT: Tomorrow I think will be the big day (its 4:30 in the morning here).. smiley-razz I'll try to flash this bootloader "ATmegaBOOT_168_pro_8MHz.hex"!
« Last Edit: July 25, 2009, 08:32:10 pm by giannoug » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
As for the USB to Serial, I have this one available, I think it works, doesn't it?

No, not directly. That converts USB serial to RS-232 serial voltages which are usually around +12 to -12 vdc or so. To use this converter with a AVR chip you would need like a MAX232 chip that converts RS-232 voltages to +5vdc and ground voltages that the AVR needs, that is called TTL voltages.

Lefty
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm.. I had zero luck with the parallel programmer. I programmed a ATMEGA168 only once, then it wouldn't respond.

This morning I modified my Duemilanove in order to make it a programmer. I succesfully flashed the ATMEGA168, works like a charm on the board! I have another problem now..

When I move the chip on a breadboard it won't work.. I power it correctly, I think.. I'm I missing something? :-[

P.S.: I tried with the Arduino bootloader and the Blink sketch and a blink.c program I compiled and flashed my self. No luck at all smiley-sad
« Last Edit: July 27, 2009, 09:12:47 am by giannoug » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
When I move the chip on a breadboard it won't work.. I power it correctly, I think.. I'm I missing something?

A drawing of how you wired your breadboard processor would be helpful. Are you using a 16mhz resonator or crystal?

Lefty

Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I don't have a crystal available.
Here's a picture. Thanks for the help smiley


EDIT: Forgot to tell that I'm using 5v from an old Basic Stamp board and not 3v like the picture! I also tried to power the AVR with my Arduino board but it does the same, nothing (in case it was a powering problem).
« Last Edit: July 27, 2009, 09:51:12 am by giannoug » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 145
Arduino stones
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need a crystal/resonator on pins 9 and 10, a pullup on pin 1, a current-limiting resistor on your led, and 5V on avcc (pin 20).
« Last Edit: July 27, 2009, 11:23:55 am by whosawhatsis » Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do I need a crystal? Doesn't it use the internal?

A pullup on pin 1? Haven't tried that yet..

My problem is that the AVR doesn't work on the breadboard, so I don't think the resistor on the LED will fix it :-/

Already tried +5 on AVCC.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 145
Arduino stones
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The crystal sets the clock frequency. It's possible to use it without one, but not with the same bootloader and fuse settings that will work on the duemilanove board.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My problem is that the AVR doesn't work on the breadboard, so I don't think the resistor on the LED will fix it

He was listing ALL the problems with your layout. IF you were to get the layout working but not install a current limiting resistor for the LED you would burnout that output pin.

 If you wish to be able to remove a programmed chip from your Arduino board and run it on your breadboard then it needs the same set-up it's programmed to run at, which means an external 16mhz resonator or crystal. You also do need a pull up resistor for the reset pin and you should add some decoupling capacitors to the +5vdc inputs on the chip.

Lefty
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried burning an 8mhz bootloader, it worked on the board (with crazy timings, as it should be) but not on the breadboard :-[

My current problem is that the AVR (with and without the Arduino bootloader) doesn't work. I'll try adding a pullup on Pin 1 and see if that makes any difference!

Thank you everybody smiley
« Last Edit: July 27, 2009, 12:34:32 pm by giannoug » Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 85
(╯°□°)╯︵ ┻━┻
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I uploaded a C program without delays (no need for crystal/resonator). Works
fine on the Arduino board but, again, not on the breaboard.
I've clicked every result on Google for "avr tutorial" but everyone talk about code and not the hardware smiley-sad

Can someone point me to the right direction? What pins need power and what ground? smiley-sad
Sorry if I'm getting boring :'(


Oh well, I wired my Arduino's crystal and it worked smiley-razz
« Last Edit: July 27, 2009, 07:29:42 pm by giannoug » Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.mikrocontroller.net/articles/AVR
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Pages: [1] 2   Go Up
Jump to: