Yahoo Groups archive

AVR-Chat

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

Thread

Where to buy IC socket for Mega 8?

Where to buy IC socket for Mega 8?

2003-12-29 by c45a6

Hello!

Does anyone have a source for buying IC sockets for the Atmel Mega 8 
(DIP package)?  I can't seem to find them in the Digikey catalogue, 
but I know they must be abundant.

Thanks!
- Bret

Re: Where to buy IC socket for Mega 8?

2003-12-29 by c45a6

Awesome.  Thanks a ton!
- Bret

--- In AVR-Chat@yahoogroups.com, Larry & Danetta <ldburnett89@e...> 
wrote:
> At 11:05 AM 12/29/2003, you wrote:
> 
> >Hello!
> >
> >Does anyone have a source for buying IC sockets for the Atmel Mega 
8
> >(DIP package)?  I can't seem to find them in the Digikey catalogue,
> >but I know they must be abundant.
> >
> >Thanks!
> >- Bret
> >
> >
> 
> Bret,
> 
> You can get them from Futurlec, http://www.futur
lec.com/SockIC.shtml 
, for 
Show quoted textHide quoted text
> $0.12 each.
> 
> Larry

M128 ADC problem

2003-12-30 by David VanHorn

I'm having a problem getting an ADC reading, in a transient case.
I'm probably missing something obvious.. :-P


The processor has recently come out of reset, so I'm trying to assume nothing.
Ints are disabled, this is a test that I have to make before the main system comes up and the normal ADC routines would work, which are interrupt driven and free running.

The only discrepancy I see with the data sheet is that they call out the register as ADCSRA, but the M128def.inc file I have has no such callout, they used ADCSR.

I want to read a voltage on channel 2, with the internal 2.5V reference.

I set bit 2 of port F as input, by:

	lds	TEMP,DDRF	;There are other pins set that I don't want to bother
	andi	TEMP,0xFB	;Set bit 2 (ADC channel 2) to input
	sts	DDRF,TEMP 	;

Then I wait for any pending conversion to complete:

Volt_First:
	sbic	ADCSR,ADSC	;Loop here till ADSC is zero
	rjmp	Volt_First	;This makes sure any pending conversion finishes.


Then I set up to read channel 2

Volt_Test_Setup:
	ldi	TEMP,0xE2	;11XXXXXX Internal 2.5V Vref
				;XX1XXXXX Left adjust result into ADCH
	out	ADMUX,TEMP	;XXX00010 Select battery input channel

	ldi	TEMP,0x83	;1XXXXXXX Enable ADC
				;X0XXXXXX Don't Start Conversion yet
				;XX0XXXXX Don't freerun
				;XXX0XXXX Interrupt flag (not needed)
				;XXXX0XXX Int disabled
	out	ADCSR,TEMP	;XXXXX111 125 kHz clock from 16 MHz Xtal

	ldi	TEMP,0xFF	;
VT_Delay:
	dec	TEMP		;Delay,  before starting.
	brne	VT_Delay	;15uS.

	sbi	ADCSR,ADSC	;Start the ADC


So now, I wait till this conversion completes, discard it, and run another.


Volt_First_Wait:
	sbic	ADCSR,ADSC	;Atmel says to toss the first conversion result.
	rjmp	Volt_First_Wait	;So just wait till it's done.

Volt_Test_Again:
	sbi	ADCSR,ADSC	;ReStart the ADC

Volt_Wait:
	sbic	ADCSR,ADSC	;Loop here till ADSC is zero
	rjmp	Volt_Wait	;

	IN	TEMP,ADCH	;GET 8 BIT RESULT

I always get to this point, indicating that I am indeed talking to the ADC, since the conversion complete bit does clear.
At this point, I only ever get 0x00 in ACCUM.
If I compare to anything >0, then I just loop here forever.

Start_Volt_Test:
	cpi	TEMP,162	;Battery should be greater than 6.0V
	brcs	Volt_Test_Again	;If not, just wait till that happens.

RE: [AVR-Chat] Where to buy IC socket for Mega 8?

2003-12-30 by Brian Fairchild

What not just use 2 x 14pin dip sockets end-to-end?
Brian
Show quoted textHide quoted text
-----Original Message-----
From: c45a6 [mailto:clone45@hotmail.com]
Sent: 29 December 2003 19:06
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Where to buy IC socket for Mega 8?


Hello!

Does anyone have a source for buying IC sockets for the Atmel Mega 8
(DIP package)? I can't seem to find them in the Digikey catalogue,
but I know they must be abundant.

Thanks!
- Bret



To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com





Yahoo! Groups Links

Re: [AVR-Chat] M128 ADC problem

2003-12-30 by John Samperi

At 12:29 AM 30/12/03 -0500, you wrote:
>
>	IN	TEMP,ADCH	;GET 8 BIT RESULT
>
>I always get to this point, indicating that I am indeed talking to 
>the ADC, since the conversion complete bit does clear.
>At this point, I only ever get 0x00 in ACCUM.

David, ADCH only has the top 2 bits IIRC (bit 8 &9),
so reading a value which is less than 256 would give you
00 as above in ADCH. I think I read ADCL and ADCH
and rotate the value left twice to get an 8 bit value in one
of the applications with the 8535.

Regards

John Samperi

******************************************************
                        Ampertronics Pty. Ltd.
  11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
         Tel. (02) 9674-6495       Fax (02) 9674-8745
               Email: samperi@ampertronics.com.au
                 Website  http://ampertronics.com.au
* Electronic Design   * Technical Services   * Contract Assembly
******************************************************

RE: [AVR-Chat] Where to buy IC socket for Mega 8?

2003-12-30 by John Samperi

At 08:42 AM 30/12/03 -0000, you wrote:
>     What  not just use 2 x 14pin dip sockets end-to-end?   Brian      

I use 2xSIP socket strips, but if you can get the sockets it's a bit easier.

Regards

John Samperi

******************************************************
                        Ampertronics Pty. Ltd.
  11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
         Tel. (02) 9674-6495       Fax (02) 9674-8745
               Email: samperi@ampertronics.com.au
                 Website  http://ampertronics.com.au
* Electronic Design   * Technical Services   * Contract Assembly
******************************************************

Re: [AVR-Chat] M128 ADC problem

2003-12-30 by David VanHorn

At 08:44 PM 12/30/2003 +1100, John Samperi wrote:

>At 12:29 AM 30/12/03 -0500, you wrote:
>>
>>       IN      TEMP,ADCH       ;GET 8 BIT RESULT
>>
>>I always get to this point, indicating that I am indeed talking to 
>>the ADC, since the conversion complete bit does clear.
>>At this point, I only ever get 0x00 in ACCUM.
>
>David, ADCH only has the top 2 bits IIRC (bit 8 &9),
>so reading a value which is less than 256 would give you
>00 as above in ADCH. I think I read ADCL and ADCH
>and rotate the value left twice to get an 8 bit value in one
>of the applications with the 8535.

I'm setting for left-justified, so the result should be 8 bit, and all in ADCH.

RE: [AVR-Chat] M128 ADC problem

2003-12-30 by Larry Barello

I don't see anything wrong with the code, but the documentation is off.

Just a couple notes: you can enable, set the clock and start the first
conversion in one write.  There is no need to delay 15us, etc.  Just let er
rip and discard the first conversion  - unless that delay you have is to
allow the Aref cap to charge...  In any case the first, dummy conversion is
something like 24 cycles long and at 2mhz clock (your doco says 125khz, but
your code selects 2mhz) that should be sufficient.

As to the problem?  Well, is ADCH declared correctly in the header?  I use
the left adjusted, high speed clock ADC on an mega16 and it works like a
champ.  Since you said the normal ADC routines work, I am assuming the Aref
pin is good and not tied to +5v or something like that.

RE: [AVR-Chat] M128 ADC problem

2003-12-30 by David VanHorn

At 08:46 AM 12/30/2003 -0800, Larry Barello wrote:

>I don't see anything wrong with the code, but the documentation is off.
>
>Just a couple notes: you can enable, set the clock and start the first
>conversion in one write.  There is no need to delay 15us, etc. 

Yeah, that was just "bulletproofing".

> Just let er
>rip and discard the first conversion  - unless that delay you have is to
>allow the Aref cap to charge... 

No, I saw a note about not enabling until one ADC clock after the ref/mux switch.
A foof-loop is about twice that.

> In any case the first, dummy conversion is
>something like 24 cycles long and at 2mhz clock (your doco says 125khz, but
>your code selects 2mhz) that should be sufficient.

AH! You got me :)  Three bits does not equal 3. :-P 
87!

>As to the problem?  Well, is ADCH declared correctly in the header?  I use
>the left adjusted, high speed clock ADC on an mega16 and it works like a
>champ.  Since you said the normal ADC routines work, I am assuming the Aref
>pin is good and not tied to +5v or something like that.

It was simpler than that, the voltage that I was trying to measure wasn't turned on yet... 0V.. @#%@^

Re: [AVR-Chat] M128 ADC problem

2003-12-30 by John Samperi

At 10:02 AM 30/12/03 -0500, you wrote:
>>and rotate the value left twice to get an 8 bit value in one
>>of the applications with the 8535.

Of course that would be rotate right in the northern hemisphere :-)

>I'm setting for left-justified, so the result should be 8 bit, and all in
ADCH.
>
Nifty feature. It was not present in the 8535, so I learned something new!

Regards

John Samperi

******************************************************
                        Ampertronics Pty. Ltd.
  11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
         Tel. (02) 9674-6495       Fax (02) 9674-8745
               Email: samperi@ampertronics.com.au
                 Website  http://ampertronics.com.au
* Electronic Design   * Technical Services   * Contract Assembly
******************************************************

Re: Where to buy IC socket for Mega 8?

2003-12-31 by Greg Koss

Digi-Key has some as PN ED3128-ND.  These are tin for $1.13 each.  
Better hurry, they only have 6,000 left.


--- In AVR-Chat@yahoogroups.com, "Brian Fairchild" <b.fairchild@d...> 
wrote:
> What not just use 2 x 14pin dip sockets end-to-end?
>  
> Brian
> 
> -----Original Message-----
> From: c45a6 [mailto:clone45@h...] 
> Sent: 29 December 2003 19:06
> To: AVR-Chat@yahoogroups.com
> Subject: [AVR-Chat] Where to buy IC socket for Mega 8?
> 
> 
> 
> Hello!
> 
> Does anyone have a source for buying IC sockets for the Atmel Mega 
8 
> (DIP package)?  I can't seem to find them in the Digikey catalogue, 
> but I know they must be abundant.
> 
> Thanks!
> - Bret
> 
> 
> 
> To unsubscribe from this group, send an email to:
> AVR-Chat-unsubscribe@yahoogroups.com
> 
> 
> 
> 
> 
> Yahoo! Groups Sponsor	
> 
> ADVERTISEMENT
>  
> 
<http://rd.yahoo.com/SIG=12cgdpn9r/M=266841.4316200.5507732.1261774/D=
eg
> 
roupweb/S=1706554205:HM/EXP=1072811143/A=1911858/R=0/*http://www.lifes
ca
> peinc.com/picasa/landing.php?capid=222&caId=1987> click here	
>  
> <http://us.adserver.yahoo.com/l?
M=266841.4316200.5507732.1261774/D=egrou
Show quoted textHide quoted text
> pmail/S=:HM/A=1911858/rand=424617461> 	
> 
> 
>   _____  
> 
> Yahoo! Groups Links
> 
> 
> *	To visit your group on the web, go to:
> http://groups.yahoo.com/group/AVR-Chat/
>   
> 
> *	To unsubscribe from this group, send an email to:
> AVR-Chat-unsubscribe@yahoogroups.com
> <mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
>   
> 
> *	Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .

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.