Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] Arrays and pointers in GCC

2009-01-15 by David VanHorn

On Thu, Jan 15, 2009 at 9:55 AM, Bill Knight <BillK@rosw.com> wrote:
> All
>   I posted the following message three days ago and have not seen it
> appear in the group.  Did it make it or did I just miss the posting?

It made it..  Thanks for the hints.. I'm moving along, I have the ADC
now firing by timer0 overflow, and storing the data into an array,
using unsigned chars wherever possible, etc.

Amusing:  The T0 overflow ISR, which should be two instructions,
compiles to this:
// Timer 0 overflow ISR
ISR(TIMER0_OVF_vect)
{
     498:	1f 92       	push	r1
     49a:	0f 92       	push	r0
     49c:	0f b6       	in	r0, 0x3f	; 63
     49e:	0f 92       	push	r0
     4a0:	11 24       	eor	r1, r1
	ADCSRA |= (1<<ADSC);					// Start the next ADC conversion
     4a2:	36 9a       	sbi	0x06, 6	; 6
     4a4:	0f 90       	pop	r0
     4a6:	0f be       	out	0x3f, r0	; 63
     4a8:	0f 90       	pop	r0
     4aa:	1f 90       	pop	r1
     4ac:	18 95       	reti

Attachments

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.