Yahoo Groups archive

AVR-Chat

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

Thread

Re: [AVR-Chat] 8515 source in Australia (or NZ)

Re: [AVR-Chat] 8515 source in Australia (or NZ)

2005-06-16 by John Samperi

At 11:07 PM 16/06/2005, you wrote:
>Can you order from Digi-Key in the US?  ATMEGA8515-16AC is US $5.16 up to
>24, and $3.24 for 25 or more.  But I suppose the shipping costs could kill
>you.

I registered on Digikey's website yesterday. I send them an email
enquiring about shipping costs to OZ and see what happens.

I just ordered some chips from Future CA and got a shock to get
a US$107.90 delivery charge. I only paid US$30.00 last time in
August and US$60.00 from Arrow in the states. I send them a little
complain note but I will just have to wear it. X;{

There must be cheaper ways of getting the stuff here, not necessarily
3 days delivery but a week or 2 would be OK.

@Russell

Insight and Memec are the same company (Now belonging to Avnet).
I bought chips from them in March from the Sydney's office.
They don't keep the 8515 in stock so there will be a MOQ and
lots of waiting.
Also they bumped up their prices by more than 50% since March.
I bought M8 for $2.42 in tube qty now they want $3.80.

May try partners IC. I got a call from them a few days ago.



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://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

Re: [AVR-Chat] 8515 source in Australia (or NZ)

2005-06-17 by Jeffrey Engel

John,

Mouser claims to have the mega8515's in stock and
shipping to OZ seems much more reasonable than the
others you've quoted.

$4.17 @ 25
$12.00 International mail (< 4lbs)
$36.00 FedEx INternational Priority (< 4 lbs)

8515 listing:
http://www.mouser.com/?Ne=500&handler=data.listcategory&Ntt=*8515*&terms=8515&crc=true&N=570&Ns=SField

shipping:
http://www.mouser.com/index.cfm?handler=estship&sl=0

Good Luck!

Jeff Engel
Arlington, TX
--- John Samperi <samperi@ampertronics.com.au> wrote:

> At 11:07 PM 16/06/2005, you wrote:
> >Can you order from Digi-Key in the US? 
> ATMEGA8515-16AC is US $5.16 up to
> >24, and $3.24 for 25 or more.  But I suppose the
> shipping costs could kill
> >you.
> 
> I registered on Digikey's website yesterday. I send
> them an email
> enquiring about shipping costs to OZ and see what
> happens.
> 
> I just ordered some chips from Future CA and got a
> shock to get
> a US$107.90 delivery charge. I only paid US$30.00
> last time in
> August and US$60.00 from Arrow in the states. I send
> them a little
> complain note but I will just have to wear it. X;{
> 
> There must be cheaper ways of getting the stuff
> here, not necessarily
> 3 days delivery but a week or 2 would be OK.
> 
> @Russell
> 
> Insight and Memec are the same company (Now
> belonging to Avnet).
> I bought chips from them in March from the Sydney's
> office.
> They don't keep the 8515 in stock so there will be a
> MOQ and
> lots of waiting.
> Also they bumped up their prices by more than 50%
> since March.
> I bought M8 for $2.42 in tube qty now they want
> $3.80.
> 
> May try partners IC. I got a call from them a few
> days ago.
> 
> 
> 
> 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://www.ampertronics.com.au
> * Electronic Design   * Custom Products   * Contract
> Assembly
>
******************************************************


Happiness is - positive intake manifold pressure.


		
__________________________________ 
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html

Re: [AVR-Chat] 8515 source in Australia (or NZ)

2005-06-17 by John Samperi

At 10:15 AM 17/06/2005, you wrote:
>Mouser claims to have the mega8515's in stock and
>shipping to OZ seems much more reasonable than the
>others you've quoted.

Thanks Jeffrey. One more possible supplier. The $12.00
shipping cost is very attractive as I don't mind the
2-3 weeks lead time. But even the UPS charge is pretty
good.

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://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

Re: [AVR-Chat] 8515 source in Australia (or NZ)

2005-06-17 by Peter Gargano

John Samperi wrote:
> Thanks Jeffrey. One more possible supplier. The $12.00
> shipping cost is very attractive as I don't mind the
> 2-3 weeks lead time. But even the UPS charge is pretty
> good.

Be wary of using UPS if that's an option they offer. Upon arrival UPS 
may ring you up and say the duty is zero, the GST minimal, but there's 
also a $52 customs clearance charge.

Use USPS (US Postal Service airmail) rather than UPS.

I've not had one pleasant dealing with UPS - ever!

Peter
















.

Sleep and timer T0

2005-06-17 by Dave VanHorn

I must be missing something..

I have timer T0 running as a PWM generator with the AS0 bit in ASSR 
set, and external 32kHz crystal.
Now I want to put the system to sleep, and have T0 wake me up once a 
second for time keeping.
The problem is that once I go to sleep, the T0 int only happens ONCE!
It gets better though.. If I hang a breakpoint in the T0 ISR, and F10 
through it, I get through the loop just fine, and I keep getting to 
the T0 int. It's only when I let the code run without F10ing it, that 
it fails to hit the T0OV isr.

Without the sleep, the T0 int fires once a second, and everything 
acts like it should.

As I read the data sheet, T0 is supposed to be enabled to the 
external crystal in ESB mode, so what's not right here?



At this point, I've decided to go to sleep:
So, I configure T0 for normal operation instead of PWM

	;Set timer 0 for once a second wakeups

	ldi		TEMP,128	;
	OUT		TCNT0,TEMP	;LOAD THE COUNT UP COUNTER

	ldi		TEMP,$06	;
	out		TCCR0,TEMP	;

I wait to make sure everything "took"

T0_Sleep_Update:

	in	TEMP,ASSR		;0000XXXX	Reserved
	andi	TEMP,$07		;XXXXX111	T0 async mode enable
					;00000---	Busy flags, 1 if register updating
	brne	T0_Sleep_Update	;

I clear off the T0 int flags:

	in	TEMP,TIFR		;
	andi	TEMP,$03		;Mask out non T0 bits
	out	TIFR,TEMP		;Turn off flags by writing 1's to them

I turn off the T2 overflow int that was doing my timekeeping while awake.
I turn on the T0 overflow int.

	in	TEMP,TIMSK	;
	andi	TEMP,$BF	;10111111 T2 overflow off
	ori	TEMP,$01	;00000001 T0 overflow on
	out	TIMSK,TEMP	;

I set the sleep mode

Snooz_Loop:

	;Set up the sleep mode
	in		TEMP,MCUCR			;
	ori		TEMP,$3C			; Extended Standby mode
	out		MCUCR,TEMP			;

Then I sleep:
	sleep						;

	in		TEMP,MCUCR			;
	andi		TEMP,$DF			; disable sleep
	out		MCUCR,TEMP			;


	;Wake up here on pressed button ints, or T0 overflow

	I do some checks here after I wake up and the T0 ISR exits,

	breq	Snooz_Loop			;If nothing going on, resume sleeping

If I was to get that far, then i would restore everything on the way 
back to normal operation.

Re: [AVR-Chat] 8515 source in Australia (or NZ)

2005-06-17 by Astria Nur Irfansyah

I just arrived in Australia and i will be living here for quite a
while. Mm... is it really that hard to get an AVR here? Coz usually in
indonesia we can buy them online very easily from
http://www.digi-ware.com (indonesian store). It's very cheap, the
prices are in Indonesian Rupiah. I compared to Dontronics, and i think
dontronics is 3 times more expensive. I'm not sure how much would it
cost for delivery from indonesia, but for local delivery it would cost
less than 2 dollars. And the payment is usually by bank transfer (BCA
Bank)

Just FYI, an ATmega8515 costs Rp55000 which is 7.4 AUD (1 AUD = Rp7400)

I live in sydney now, can anyone tell me where to buy some electronic
components such as cheap capacitors, multimeters, soldering wire, etc?
Are there any electronic components shop around kensington? thankyou

-irfan-
Show quoted textHide quoted text
On 6/17/05, Peter Gargano <peter@techedge.com.au> wrote:
> John Samperi wrote:
> > Thanks Jeffrey. One more possible supplier. The $12.00
> > shipping cost is very attractive as I don't mind the
> > 2-3 weeks lead time. But even the UPS charge is pretty
> > good.
> 
> Be wary of using UPS if that's an option they offer. Upon arrival UPS
> may ring you up and say the duty is zero, the GST minimal, but there's
> also a $52 customs clearance charge.
> 
> Use USPS (US Postal Service airmail) rather than UPS.
> 
> I've not had one pleasant dealing with UPS - ever!
> 
> Peter
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> .
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
>

Re: [AVR-Chat] 8515 source in Australia (or NZ)

2005-06-17 by John Samperi

At 04:53 PM 17/06/2005, you wrote:
>I just arrived in Australia and i will be living here for quite a
>while.

WELCOME! =D>


>  Mm... is it really that hard to get an AVR here?

It's not hard, but I am a cheapskate and try to get
them at the best price. Unfortunately when one orders
small qty one doesn't have much of a clout :'(

>indonesia we can buy them online very easily from
>http://www.digi-ware.com (indonesian store). It's very cheap,

Seems to have good prices, a little hard to understand for me
as they don't seem to have an English version of the website.
Can you find out if they ship to Australia and how much for
shipping? Also it would be nice to be able to use a credit card.

>I live in sydney now, can anyone tell me where to buy some electronic
>components such as cheap capacitors, multimeters, soldering wire, etc?
>Are there any electronic components shop around kensington? thankyou

There may be a Dick Smith store near you. The best prices are
from Altronics and Electus if you buy wholesale.

You can buy from their web sites also, or you can drive across the
other side of Sydney to Auburn for Altronics retail/wholesale and
Silverwater for Electus (Jaycar) retail/wholesale.

If you go to York St in the city (behind QVB building ) you will
also find a few stores next to each other.


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://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

Re: [AVR-Chat] Sleep and timer T0

2005-06-17 by Francisco Silva

Hi Dave,

2005/6/17, Dave VanHorn <dvanhorn@dvanhorn.org>:
> 
> I must be missing something..
> 

In assynchronous mode you must wait for the registers update (up to 2
32kHz cycles). I use the following code on a atmega8.

inline static void PowerSave(void)
{
    MCUCR = (1 << SE)				// enable sleep mode
	|(0 << SM2) | (1 << SM1) | (1 << SM0);	// selects power save mode
    asm("sleep");
    MCUCR = 0;
}


#define WaitT2Upd() {while (ASSR & ((1 << TCR2UB) | (1 << OCR2UB) | (1
<< TCN2UB)));}

static u16 tcnt2_shadow;
// I maintain a shadow because its expensive to read TCNT2 in async mode

.... loop ....
	WaitT2Upd();
	PowerSave();
	// setup next wake as soon as possible
	tcnt2_shadow += 8 * 256;
	OCR2 = tcnt2_shadow;
.... loop ....


-- 
Francisco

Re: [AVR-Chat] 8515 source in Australia (or NZ)

2005-06-17 by Zack Widup

On Fri, 17 Jun 2005, John Samperi wrote:

> 
> >I live in sydney now, can anyone tell me where to buy some electronic
> >components such as cheap capacitors, multimeters, soldering wire, etc?
> >Are there any electronic components shop around kensington? thankyou
> 
> There may be a Dick Smith store near you. The best prices are
> from Altronics and Electus if you buy wholesale.
> 

Speaking of Dick Smith Electronics, does he still have any stores in the 
USA?  I think they were called American Electronics years ago.  I got his 
catalogs in the mail back then but it's been some time since I've seen 
one of them.

Zack

Re: [AVR-Chat] Sleep and timer T0

2005-06-17 by Dave VanHorn

>
>In assynchronous mode you must wait for the registers update (up to 2
>32kHz cycles). I use the following code on a atmega8.

I thought the read of the ASSR register was supposed to return me 
ones in the low three bits, if those updates were not yet complete.
It said that I could write all three at once, but then I had to loop 
waiting for the three bits in the ASSR to zero, before proceeding.
It does int ONCE though, so obviously something's hosed.

Re: [AVR-Chat] Sleep and timer T0

2005-06-17 by Francisco Silva

The main point is that you MUST wait at least one timer clock cycle
before *re-entering* sleep mode. The easyest way to do this is
changing some register and waiting on ASSR.

2005/6/17, Dave VanHorn <dvanhorn@dvanhorn.org>:
> 
> >
> >In assynchronous mode you must wait for the registers update (up to 2
> >32kHz cycles). I use the following code on a atmega8.
> 
> I thought the read of the ASSR register was supposed to return me
> ones in the low three bits, if those updates were not yet complete.
> It said that I could write all three at once, but then I had to loop
> waiting for the three bits in the ASSR to zero, before proceeding.
> It does int ONCE though, so obviously something's hosed.
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 


-- 
Francisco

Re: [AVR-Chat] Sleep and timer T0

2005-06-17 by Dave VanHorn

AHH!!
A careful third look at the data sheet turns up this nugget:

If Timer/Counter0 is used to wake the device up from Power-save or Extended
Standby mode, precautions must be taken if the user wants to re-enter 
one of these
modes:

(and I do)

The interrupt logic needs one TOSC1 cycle to be reset. If the time between
wake-up and re-entering sleep mode is less than one TOSC1 cycle, the 
interrupt will
not occur, and the device will fail to wake up.

(That's what's happening to me!)

If the user is in doubt whether the time before re-entering 
Power-save or Extended Standby mode is sufficient, the
following algorithm can be used to ensure that one TOSC1 cycle has elapsed:
1. Write a value to TCCR0, TCNT0, or OCR0.
2. Wait until the corresponding Update Busy flag in ASSR returns to zero.
3. Enter Power-save or Extended Standby mode.

So, the sleeping loop looks like this now, and it works! :)

  (code above here shuts down the T2 int, and enables the T0 int, as 
well as converting T0 from a PWM timer to a regular timer)


Snooz_Loop:

	;Set up the sleep mode
	in	TEMP,MCUCR			;
	ori	TEMP,$3C			;00111100
						;0XXXXXXX External SRAM enable
						;X0XXXXXX Wait state select bit
						;XX1XXXXX Sleep enable
						;XXX1XXXX SM1
						;XXXX1XXX SM0
						;XXXXX1XX SM2 Extended Standby mode
						;XXXXXX0X Int vector select
						;XXXXXXX0 Int vector change enable
	out	MCUCR,TEMP			;

	sleep					;
	
	out	OCR0,TEMP			;I don't care what gets written, but I need the write to
						;pace my re-entry to sleep. I write this as early as possible
						;so as to minimize wasted time waiting for the update to take.

	in	TEMP,MCUCR			;
	andi	TEMP,$DF			;11011111
						;0XXXXXXX External SRAM enable
						;X0XXXXXX Wait state select bit
						;XX0XXXXX Sleep enable
						;XXX1XXXX SM1
						;XXXX1XXX SM0
						;XXXXX1XX SM2 Extended Standby mode
						;XXXXXX0X Int vector select
						;XXXXXXX0 Int vector change enable
	out	MCUCR,TEMP			;	

	;Wake up here on pressed button ints, or T0 overflow

	;Test for pressed buttons
	clr	TEMP2			;
	sbic	PIND,3			;
	ldi	TEMP2,0x08		;Sets a 1 in this position if the button is NOT pressed

	in	TEMP,PINE		;					BBBBXXXX
	andi	TEMP,0xF0		;Mask out buttons			11110000 (If no buttons pushed)
	or	TEMP,TEMP2		;Add in the lone stranger			00001000
	ori	TEMP,0x07		;Fill in zeroes				11111111
	inc	TEMP			;					00000000
	and	TEMP,TEMP		;Check for zero
	brne	Wake_Up		;If no buttons, resume sleeping

T0_Snooz_Update:
	in	TEMP,ASSR		;0000XXXX	Reserved
	andi	TEMP,$07		;XXXXX111	T0 async mode enable
					;00000---	Busy flags, 1 if register updating
	brne	T0_Snooz_Update	;
	rjmp	Snooz_Loop		;
	
Wake_Up:

	(down here, we re-activate the T2 int, and put T0 back to being a PWM timer)

Re: [AVR-Chat] Sleep and timer T0

2005-06-17 by Jim Wagner

Where do you tell it to sleep again? Has it really finished
everything needed for the next int before being put to
sleep?

Jim

On Fri, 17 Jun 2005 01:46:23 -0500
 Dave VanHorn <dvanhorn@dvanhorn.org> wrote:
> 
> I must be missing something..
> 
> I have timer T0 running as a PWM generator with the AS0
> bit in ASSR 
> set, and external 32kHz crystal.
> Now I want to put the system to sleep, and have T0 wake
> me up once a 
> second for time keeping.
> The problem is that once I go to sleep, the T0 int only
> happens ONCE!
> It gets better though.. If I hang a breakpoint in the T0
> ISR, and F10 
> through it, I get through the loop just fine, and I keep
> getting to 
> the T0 int. It's only when I let the code run without
> F10ing it, that 
> it fails to hit the T0OV isr.
> 
> Without the sleep, the T0 int fires once a second, and
> everything 
> acts like it should.
> 
> As I read the data sheet, T0 is supposed to be enabled to
> the 
> external crystal in ESB mode, so what's not right here?
> 
> 
> 
> At this point, I've decided to go to sleep:
> So, I configure T0 for normal operation instead of PWM
> 
>       ;Set timer 0 for once a
> second wakeups
> 
>      
> ldi     
>      
> TEMP,128      ;
>      
> OUT     
>      
> TCNT0,TEMP      ;LOAD THE COUNT
> UP COUNTER
> 
>      
> ldi     
>      
> TEMP,$06      ;
>      
> out     
>      
> TCCR0,TEMP      ;
> 
> I wait to make sure everything "took"
> 
> T0_Sleep_Update:
> 
>      
> in     
> TEMP,ASSR     
>      
> ;0000XXXX      Reserved
>      
> andi     
> TEMP,$07     
>      
> ;XXXXX111      T0 async mode
> enable
>      
>      
>      
>      
>      
> ;00000---      Busy flags, 1 if
> register updating
>      
> brne     
> T0_Sleep_Update      ;
> 
> I clear off the T0 int flags:
> 
>      
> in     
> TEMP,TIFR     
>       ;
>      
> andi     
> TEMP,$03     
>       ;Mask out non T0 bits
>      
> out     
> TIFR,TEMP     
>       ;Turn off flags by writing
> 1's to them
> 
> I turn off the T2 overflow int that was doing my
> timekeeping while awake.
> I turn on the T0 overflow int.
> 
>      
> in     
> TEMP,TIMSK      ;
>      
> andi     
> TEMP,$BF      ;10111111 T2
> overflow off
>      
> ori     
> TEMP,$01      ;00000001 T0
> overflow on
>      
> out     
> TIMSK,TEMP      ;
> 
> I set the sleep mode
> 
> Snooz_Loop:
> 
>       ;Set up the sleep mode
>      
> in     
>      
> TEMP,MCUCR     
>      
>       ;
>      
> ori     
>      
> TEMP,$3C     
>      
>       ; Extended Standby mode
>      
> out     
>      
> MCUCR,TEMP     
>      
>       ;
> 
> Then I sleep:
>      
> sleep     
>      
>      
>      
>      
>       ;
> 
>      
> in     
>      
> TEMP,MCUCR     
>      
>       ;
>      
> andi     
>      
> TEMP,$DF     
>      
>       ; disable sleep
>      
> out     
>      
> MCUCR,TEMP     
>      
>       ;
> 
> 
>       ;Wake up here on pressed
> button ints, or T0 overflow
> 
>       I do some checks here
> after I wake up and the T0 ISR exits,
> 
>      
> breq     
> Snooz_Loop     
>      
>       ;If nothing going on,
> resume sleeping
> 
> If I was to get that far, then i would restore everything
> on the way 
> back to normal operation.
> 
> 
> 
>       
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 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 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms
> of Service.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: [AVR-Chat] Sleep and timer T0

2005-06-17 by Dave VanHorn

At 10:33 AM 6/17/2005, Jim Wagner wrote:
>Where do you tell it to sleep again? Has it really finished 
>everything needed for the next int before being put to
>sleep?

We got it.
I missed the part where it says that you have to wait before going 
back to sleep.
See previous message.
The trick is to write to any one of the registers, and then wait for 
the update flag to clear, before going back to sleep.

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.