Go Down

Topic: DIY Arduino problem (Read 1 time) previous topic - next topic

Vincent19

Hey I just constructed a circuit where I solder a 28 pins socket and one 16MHz crystal for the circuit. I put a pull up resistor at the pin 1 too. Weird things happen is that my program sometimes work sometimes not working. Sometimes it loop for once .. Any problem ? Is it because I did not insert 2 cap at the crystal side ?

Thank you :)

CrossRoads

That would be a good suspect.
You should also have the Vcc pin connected to the AVcc pin, and a 0.1uF (100nF) on both of those pins going to ground.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Vincent19


Vincent19

I did connected the Vcc to AVcc..Just that I do not put a 100nF cap in between the Vcc and GND ><

CrossRoads

The 100nF caps help provide power stability.

The 22pF caps allow the crystal to function.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Vincent19

What will happen if I did not put the 100nF cap and 22pF cap ?

Thank you

eried

Bit more noise. For a real example: http://content.screencast.com/users/erwinried/folders/Jing/media/32aee3d7-e4c4-43ff-9615-4cc574a24999/2012-07-07_1524.png compare blue with red, first I didn't want to add a cap to the power, microprocessor rebooted itself randombly sometimes.

The regulator was to remove the spikes :D
My website: http://ried.cl

Vincent19

Ok, I face that problem too..Hahaha..reboot sometimes. Then what is the importance of the 22pF cap ?

eried


Ok, I face that problem too..Hahaha..reboot sometimes. Then what is the importance of the 22pF cap ?


The same, it is one of the properties of a cap, but for the oscilator. In my tests, not that important compared to the cap in the power.
My website: http://ried.cl

Vincent19

So, the minimum circuit for an arduino based development board is a 16MHz crystal and the 100nF cap for power supply and pull up resistor for RESET pin ?

eried


So, the minimum circuit for an arduino based development board is a 16MHz crystal and the 100nF cap for power supply and pull up resistor for RESET pin ?


No, you can use the internal oscilator (there is a fuse). And the reset is not required. The minimum is just the cap for the supply
My website: http://ried.cl

Vincent19

The minimum is just the cap for power supply ? Then how can I use the internal oscillator ? What setting should I change ?

eried

As I said it is a fuse, but you have to google for instructions how to set it, what value to use, etc I don't remember those.
My website: http://ried.cl

Vincent19



So, the minimum circuit for an arduino based development board is a 16MHz crystal and the 100nF cap for power supply and pull up resistor for RESET pin ?


No, you can use the internal oscilator (there is a fuse). And the reset is not required. The minimum is just the cap for the supply
[/quoteWhy the reset is not required ? Thought it needs to be pulled high for normal operation ?]

anv


The minimum is just the cap for power supply ? Then how can I use the internal oscillator ? What setting should I change ?


For avoiding the crystal, you should program the atmega as 8Mhz internal oscilator. Select arduino pro mino 8Mhz in arduino IDE as target board in order to obtain the right times.

Go Up