Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

What is the most simply schematic?

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR
View previous topic :: View next topic  
Author Message
Ivo

Bascom Member



Joined: 29 Nov 2007
Posts: 68
Location: Belgium

belgium.gif
PostPosted: Sun Feb 07, 2010 11:09 pm    Post subject: What is the most simply schematic? Reply with quote

Hello all,

I want to start with a test to use a ATMega48. I have connect pin 7 with +5v and pin 8 to gnd. There is a capacitor of 100n between those pins. There is a led and a 1k resistor on pin 14 (PB0). And there is a xtal of 12MHz between pins 9 and 10 (xtal1 and xtal2).

Now the controller seems to do nothing. I can not measure any clocksignal, so i thing this is the reason. (pins 9 and 10 are "low")

Any suggestions for me to get this controller working?

Thanks!

Ivo
Back to top
View user's profile
mattcro

Bascom Member



Joined: 03 Oct 2007
Posts: 324
Location: Scotland

uk.gif
PostPosted: Tue Feb 09, 2010 1:16 pm    Post subject: Reply with quote

You need to connect a capacitor from XTAL1 to ground and one from XTAL2 to ground. These are typically 20pF. See the crystal oscillator sections in the datasheet.

You must also program the AVR's fuses to set the correct clock/oscillator mode. You should select "Low Power Crystal Oscillator 8-16MHz" or similar in your programming software.

_________________
If all else fails, read the manual. Even better: read the manual before something fails. If you can't find it in the manual, search the forum.
BascomAVR 2.0.8.2
Back to top
View user's profile
Ivo

Bascom Member



Joined: 29 Nov 2007
Posts: 68
Location: Belgium

belgium.gif
PostPosted: Tue Feb 09, 2010 5:52 pm    Post subject: Reply with quote

Thanks mattcro!

In the mean time, i have connect the chrystal like you said, with two capacitors of 22pF, but still not a single signal on xtal1 or xtal2. I have also connect Pin1 (/reset) over a 10K resistor to 5V and over a 100nF capacitor to 0V.
Now i'm trying to set the fusebits with Bascom, but never done this before, i always gets the message "READLB entry not found" Is it possible to set this fuse bits without clocksignal?

Best regards,

Ivo
Back to top
View user's profile
mattcro

Bascom Member



Joined: 03 Oct 2007
Posts: 324
Location: Scotland

uk.gif
PostPosted: Tue Feb 09, 2010 9:50 pm    Post subject: Reply with quote

The AVR chips are supplied with the oscillator set to internal R/C mode (typically 1MHz). This means you always have a clock to get started with. You can then program the fuses to set the oscillator mode to external crystal if you need.

Note that the crystal oscillator if disabled if the chip is set to use internal R/C osc, so the XTAL pins won't do anything.

The procedure for programming the fuses and memory of the AVR depends on your exact programmer type and software. I don't use Bascom to do the chip programming so can't help much with that...

Try removing the 100nF capacitor on the reset pin - this may be causing problems with the programming. Also try reducing the programming speed if you have it set fairly high.

_________________
If all else fails, read the manual. Even better: read the manual before something fails. If you can't find it in the manual, search the forum.
BascomAVR 2.0.8.2
Back to top
View user's profile
Ivo

Bascom Member



Joined: 29 Nov 2007
Posts: 68
Location: Belgium

belgium.gif
PostPosted: Tue Feb 09, 2010 11:24 pm    Post subject: Reply with quote

Thanks mattcro!

One of these days i will start all over again. My breadboard is starting to be a mess Embarassed

Thanks for all your advice!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum