[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Best practice for external variable (newbie-ish quest
From: |
Matthew Smith |
Subject: |
Re: [avr-gcc-list] Best practice for external variable (newbie-ish question) |
Date: |
Tue, 22 Nov 2005 07:49:39 +1030 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041206) |
Thanks to all who advised on this topic - it's been a valuable tutorial
for me.
I have the system working - the mysterious and seemingly random oddities
came from the programme freezing in a loop which was supposed to watch
for a signal from the ADC. (Write 100 times: "I will make use of
external interrupts.") After commenting this loop out and putting in
half a dozen calls to my "short delay" (loop of 10 nops), everything
started working just fine.
This:
while (PINC & _INT)
{
asm volatile("nop");
}
...I was polling the interrupt out of the ADC rather than hooking into
my external interrupt pin. Hmm...
Became this:
smalldly(); // Don't rush the ADC ;-)
smalldly(); // Don't rush the ADC ;-)
smalldly(); // Don't rush the ADC ;-)
smalldly(); // Don't rush the ADC ;-)
smalldly(); // Don't rush the ADC ;-)
smalldly(); // Don't rush the ADC ;-)
smalldly(); // Don't rush the ADC ;-)
smalldly(); // Don't rush the ADC ;-)
Unfortunately, the electronics are now outside drying off; I hooked into
the pump, tried to prime it and both the controller and I got wet when
it backfired...
Cheers
M
--
Matthew Smith
South Australia
http://www.kbc.net.au
- [avr-gcc-list] Best practice for external variable (newbie-ish question), Matthew Smith, 2005/11/19
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Russell Shaw, 2005/11/19
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Russell Shaw, 2005/11/19
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Joerg Wunsch, 2005/11/20
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), David Kelly, 2005/11/20
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Matthew Smith, 2005/11/20
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), David Kelly, 2005/11/20
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Matthew Smith, 2005/11/20
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question),
Matthew Smith <=
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Joerg Wunsch, 2005/11/22
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Matthew Smith, 2005/11/22
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Joerg Wunsch, 2005/11/22
- Re: [avr-gcc-list] Best practice for external variable (newbie-ish question), Russell Shaw, 2005/11/20