[En-Nut-Discussion] DIO with ethernut 3.0 Rev-D
Chris
dc229 at clweb.ch
Tue Mar 7 19:52:01 CET 2006
Hello Harald,
thanks a lot for your helpful explanation, GPIO-pins are
working fine now.
Up to 48 digital I/Os are mentioned in "Ethernut Comparison Table".
Would you be so kind and shed some light on this topic. In particular
I am interested where the remaining I/Os are located and how they
can be accessed by software.
Thank You and with Best Regards
Chris
At 2006-03-07 13:12, you wrote:
>Hello Chris,
>
>At 08:40 07.03.2006 +0100, you wrote:
>>My goal is, to control individual pins on the expansion port by software.
>
>Most important document is the AT91R40008 datasheet.
>
>Here's how to control Pin 49 (P2):
>
> outr(PIO_PER, _BV(2));
>enables PIO mode.
>
> outr(PIO_OER, _BV(2));
>enables PIO output mode.
>
> outr(PIO_SODR, _BV(2));
>sets output high.
>
> outr(PIO_CODR, _BV(2));
>sets output low.
>
>Please respect the electrical characteristics in the
>datasheets. The CPU is 3.3V and should never be attached
>to 5V logic.
>
>Also check
>http://www.ethernut.de/en/hardware/enut3/ports.html
>for ports that might be used elsewhere.
>
>Harald
More information about the En-Nut-Discussion
mailing list