Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with AVR ATmega 16 microcontroller

Status
Not open for further replies.

Integrated

Member level 1
Joined
Jul 10, 2003
Messages
39
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
338
AVR uC hints needed

Hi, I need help with AVR uC(microcontroller).

I am using ATmega16 for my project , but in a very simple circuit for this uC , it doesn't work ,

I power it on , it has a reset circuit(R-C) , it has a crystall , (also i tested R-C oscillator) , and i have written a simple program , complementing one output pin , but nothing happens ,

I don't have any signal on my oscillator pins , no DC nor AC , there is a little .6v on one of the pins , (XTAL1 and 2, I mean),

I appreciate if anyone gives me hints about AVRs to follow and helps me find out what my problem can be.

Thanks in advance,
Regards.
 

AVR uC hints needed

First of all, please don't mark you topic title with urgent!
If it is so urgent, then go and buy help somewhere.
I have removed the urgent text from your title.
Read this:
Especially read the part called "Don't flag your question as “Urgent”, even if it is for you": http://www.catb.org/~esr/faqs/smart-questions.html#urgent



How did you measure the XTAL pins? Did you use an oscilloscope probe in x10 setting?

How are your AVR fuses set?
Do you use ISP programming?

9 out of 10 times it is a wrong oscillator fuse setting. When you have first set the fuse wrong with ISP programming you can't change it back just like that. Then you need to apply a clock signal to XTAL 1.
Try to do a search for this at the forum at www.avrfreaks.com.
There are 100's of newbies asking the same newbie question and usually the answer is the same.
 

Re: AVR uC hints needed

Yes, sure the answer is the fuse. For the first time it is programmed to
work with the internal RC oscillator. That is why you do not see any signal on the XTAL pins.
The best way to start is:
open **broken link removed**
download the evaluation version of the CodeVision C and environment. There you can find everithing for the first program using the Wizard and tools for programming anf fuse setting.

Varuzhan
 

Re: AVR uC hints needed

Hi, this question was about setting ATmega16 fuse bits , and any hint for using this microcontroler.

I tested all the diffrent possible fuse settings , specially,

CKSEL 3..0 = 0001 and SUT1..0 = 10 and CKOPT=1 (unprogrammed)

So that it will work by it's internal RC ocsillator and for slowly rising power.

I tested my programmer , by checking and also unchecking all these bits (also the CKOPT) , and i didn't change the other fuse bits, they are all unchecked (in both tests).

but nothing happens.there is somthing odd here , i read fuse bits and the OSCCAL value is 0xBB. (the programmer sets it itself).is that standard for this register?

I need your help.
Thanks in advance.
 

AVR uC hints needed

If you by any point set the Clock fuse to use external clock, then you can't set it back or program the AVR anymore, unless you connect an external clock (not crystal) to the XTAL1 pin.

You can't ISP program the AVR without a clock source. If you have selected external clock or crystal once, then you need to connect an exteranl clcok source to be able to set the clcok fuse back to internal RC-oscillator.
You can't program, read or reset any fuses without a clock source that works with the current clock source.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top