[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Re: Problem reading from port (ADC)

From: Volkmar Dierkes
Subject: [avr-gcc-list] Re: Problem reading from port (ADC)
Date: Sun, 28 Aug 2005 11:57:47 +0200
User-agent: 40tude_Dialog/ Hamster/


On Sun, 28 Aug 2005 16:47:48 +0930, Matthew Smith wrote:

> I'm sure that I've missed something really stupid.

it seems to me ;-)

>       //Wait for INT to show up...
>       while (PORTC & _INT) { asm volatile("nop"); }

You have to use PINC to read from the port.

>       //Start the read process
>       PORTC&=~_CS;    // Set /CS low
>       PORTC&=~_RD;    // Set /RD low
>       v=PORTA;        // Read value from PORTA

You have to use PINA to read from port A.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]