Offline
Newbie
Karma: 0
Posts: 16
|
 |
« on: December 09, 2012, 07:01:51 am » |
Is a quartz crystal required for the Atmel Atmega328 for it to work when its not in the arduino?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #1 on: December 09, 2012, 07:18:56 am » |
If it was programmed & running as a standard Arduino board, yes. 16 MHz crystal, 22pf caps, 100nF caps, 10K pullup resistor, can be purchased quite inexpensively from www.dipmicro.com and www.taydaelectronics.com.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #2 on: December 09, 2012, 07:26:51 am » |
im not doing an arduino breadboard im doing a project that doesn't want to work all the pins are soldered to the right places(using headers of course) but when i give power to the atmel atmega 328 nothing happens just a blank LCD. Do i still need all the component's you listed for it to work or just the crystal?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #3 on: December 09, 2012, 07:43:20 am » |
Some will claim it will work fine with less than what I listed - I have Never had a board not reliaby work when it had that minimal set of parts installed. My Arduino project designs start from this, and I add more parts as needed.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #4 on: December 09, 2012, 07:48:15 am » |
Is a quartz crystal required for the Atmel Atmega328 for it to work when its not in the arduino? No.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #5 on: December 09, 2012, 07:49:08 am » |
Do i still need all the component's you listed for it to work or just the crystal? The minimum part to get a mcu to work is the mcu itself.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #6 on: December 09, 2012, 08:02:15 am » |
dhenry, Can you explain the process for Arduino99 for re-burning the fuses for '328 operation without an external crystal once the uC has been removed from the Arduino board? I know many do it with avrdude commands, I've not had luck with that myself.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 37
Posts: 974
Get Bitlash: http://bitlash.net
|
 |
« Reply #7 on: December 09, 2012, 08:03:00 am » |
While it is true that a crystal is not required, the '328p must be correctly configured using what is known as the 'fuse bits' to operate without a crystal. When you do that, there are several choices for which internal oscillator speed to use. All of this has to line up with the build settings or you get clocks running at the wrong rate, if they run at all. None of it is setup for what you want to do "out of the box" on a raw '328p, sorry to say.
If you put a '328p that is fuse-configured to expect a crystal oscillator into a breadboard that doesn't have one, it won't work because it isn't getting the clock it expects. This is one possible explanation for your system appearing dead.
It would be helpful to know where you got the '328, whether it has a bootloader on it and what the fuse settings are. Do you have an Arduino board or an AVR programmer to set fuses with?
Also, have you checked the voltages at the +VCC and GND pins on the '328p with a voltmeter (or even an LED) to make sure they're about right?
Finally, it makes sense to put at least a 10uF electrolytic decoupling capacitor on the power input to the arduino. It may run without it, but will die at the first glitch, leaving you wondering what happened. Bad practice.
-br
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #8 on: December 09, 2012, 08:11:13 am » |
just a blank LCD. There could be many other reasons why that's the case. The simplest test to see if your mcu is working (or if you can burn a piece of code into the mcu) is to flip pins.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #9 on: December 09, 2012, 08:18:31 am » |
While it is true that a crystal is not required, the '328p must be correctly configured using what is known as the 'fuse bits' to operate without a crystal. When you do that, there are several choices for which internal oscillator speed to use. All of this has to line up with the build settings or you get clocks running at the wrong rate, if they run at all. None of it is setup for what you want to do "out of the box" on a raw '328p, sorry to say.
If you put a '328p that is fuse-configured to expect a crystal oscillator into a breadboard that doesn't have one, it won't work because it isn't getting the clock it expects. This is one possible explanation for your system appearing dead.
It would be helpful to know where you got the '328, whether it has a bootloader on it and what the fuse settings are. Do you have an Arduino board or an AVR programmer to set fuses with?
Also, have you checked the voltages at the +VCC and GND pins on the '328p with a voltmeter (or even an LED) to make sure they're about right?
Finally, it makes sense to put at least a 10uF electrolytic decoupling capacitor on the power input to the arduino. It may run without it, but will die at the first glitch, leaving you wondering what happened. Bad practice.
-br
Its from the arduino uno it does have bootloader burned onto it
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 37
Posts: 974
Get Bitlash: http://bitlash.net
|
 |
« Reply #10 on: December 09, 2012, 08:22:20 am » |
If it's from a commercial Arduino, it's fused to expect a crystal. You'll need a crystal and two decoupling caps to get it running as fused, or you could re-fuse it to run without.
Cheers,
-br
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #11 on: December 09, 2012, 08:48:31 am » |
So, back to reply #3 then.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #12 on: December 09, 2012, 01:34:52 pm » |
I have acquired and installed a quartz crystal and now the lcd screen flashes violently how do i fix this?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #13 on: December 09, 2012, 04:33:02 pm » |
Violently? That's a new one on me. Does anything else work normally? Like a message sent to the serial monitor?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #14 on: December 16, 2012, 01:31:24 pm » |
Never mind It was the battery it was flat lol
|
|
|
|
|
Logged
|
|
|
|
|
|