Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Programming Fuses in WinAVR

Help with ADC conversions on a ATMEGA8.

2004-06-06 by Alexandre Guimaraes

Hi,

    I am getting crazy with a board that I made with a ATMEGA8 and a AD595
thermocouple interface. I get one good reading and a whole bunch of crazy
( usually 0 ) readings from the AD converter !!! Follows a list of things
that I tried to solve the problem and none of them makes any difference. The
program is a one liner with just the printf of the readings and a delay...

- Tried different types of AD routines using codevision codewizard:

    - tried simple, no interrupts.
    - tried interrupts.
    - Interrupts with noise canceller ( sleep mode )
    - direct inline code for getting the readings.
    - Changed the sampling frequency to all options.
    - added huge delays everywhere.

- Changed the reference from internal to AVCC.
- Changed the power supply to a good old 7805.

    The darn thing is so constant the it seems like a software error
somewhere but that does not make sense either because I am using the
codevision codewizard code to read the ADC.

    Please... Please... Does anyone have any more ideas ?

    I also tried to put some huge 4700 mF capacitor and a bunch of ceramic
ones just to make sure there is no huge noise on the supply lines.

    The output from the AD595 is ok, measured with a fluke multimeter...
With a scope it is ok also...

Best regards,
Alexandre Guimaraes

Re: [AVR-Chat] Help with ADC conversions on a ATMEGA8.

2004-06-07 by mpdickens

> The output from the AD595 is ok, measured with a
> fluke multimeter... With a scope it is ok also...

What type/size capacitor do you have on the power pin
of the ad595? It needs to be 10uF or better and not
tantalum based. Same goes for the avr uC.]


Regards

Marvin Dickens

=====
Registered Linux User No. 80253
If you use linux, get counted at: 
http://www.linuxcounter.org


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

Re: [AVR-Chat] Help with ADC conversions on a ATMEGA8.

2004-06-07 by Alexandre Guimaraes

Hi,

> What type/size capacitor do you have on the power pin
> of the ad595? It needs to be 10uF or better and not
> tantalum based. Same goes for the avr uC.]

    47uF aluminun and 100nF ceramic SMD mounted right on the power pins on
both chips. I also tried to put a huge 4700 uF on the CPU to see if that was
the problem. It made no difference at all.

Best regards,
Alexandre Guimaraes

Re: Help with ADC conversions on a ATMEGA8.

2004-06-08 by kanjjde

> > What type/size capacitor do you have on the power pin
> > of the ad595? It needs to be 10uF or better and not
> > tantalum based. Same goes for the avr uC.]

>47uF aluminun and 100nF ceramic SMD mounted right on the
>power pins on both chips. I also tried to put a huge
>4700 uF on the CPU to see if that was the problem.
>It made no difference at all.

Be careful about the "Bigger is better!" theory of capacitors. Keep 
in mind that electrolytic capacitors are coiled aluminum foil and 
have inductance. Remove all electrolytic capacitors from the 5V side 
of your regulator. Use 1 tantalum cap of 2.2uF to 10uF on the output 
of your regulator and one .1uF ceramic cap across the power pins of 
each IC. Check schematics in any electronic magazine or take apart 
any 8 bit computer and see what the industry standard is. Throwing 
10uF caps randomly into a circuit is the electronic equivalent of 
bloodletting and will cause more harm than good.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.