Author Topic: ATmega8 Questions  (Read 1595 times)

0 Members and 1 Guest are viewing this topic.

Offline DudekillerTopic starter

  • Jr. Member
  • **
  • Posts: 33
  • Helpful? 0
ATmega8 Questions
« on: March 22, 2009, 09:40:53 AM »
Hey! I'm getting ready to try out ATmega8 microcontroller, but I have several questions.

1) Do I really need to connect 2 22pf capacitors to AREF and AVCC of the microcontroller? Can't I just connect the 2 capacitors to to the crystal?
2) Do I really need to connect a 1 .1uf capacitor from reset of the ICSP to the reset pin of the microcontroller?
3) I currently have a 4mhz crystal. Can I just use it for this microcontroller? If so, then how can I define it in the C code?
4) Does anyone where I can find AVR C coding advice?

Thank you!

Offline blackheart

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 1
Re: ATmega8 Questions
« Reply #1 on: March 22, 2009, 10:53:56 AM »
I don't know anything related to your first 3 questions, but I thought I would give it a shot with the programming.

You could try burning an arduino bootloader to it. the language is very simple, very clean.





I'm out of ideas!

Offline DudekillerTopic starter

  • Jr. Member
  • **
  • Posts: 33
  • Helpful? 0
Re: ATmega8 Questions
« Reply #2 on: March 22, 2009, 10:56:02 AM »
I did it already. I'm moving on to AVR.

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: ATmega8 Questions
« Reply #3 on: March 23, 2009, 04:20:49 AM »
ok.... Let's answer....

1) It's a 100nF capacitor... It's not necessary, but it helps with noise if you use the Analog to Digital Converter (ADC)
The 22pF capacitors to the crystal are supposed to be necessary.... place them... It's no harm for sure....
2) Same here.... It's not really a necessity, I've never placed a capacitor there. But in noise environments it will help
from unwanted resets...
3) Yes you can.... but it's a waste.... the internal oscillator runs at 8MHz max! When bought the IC from it's mama is set
to 1MHz.... So you gotta change the fuses.... Hope you know how to do this cause I really don't... (my programmer does
the dirty work)
4) Here!!! But, definitely not by me.... I code in Basic, using BASCOM.... Quite a flexible compiler I could say... but if
you know C it's better, so just stay there!

Regards,
Lefteris, GReece
For whom the interrupts toll...

 


data_list