[En-Nut-Discussion] PORT E (Ethernut 1.3)
Pete Allison
macsmaker at aol.com
Tue Sep 8 17:59:08 CEST 2009
I use the following:
sbi(PORTE,X)/cbi(PORTE,X) where X is the bit number, to set and clear the
signal.
Example:
sbi(PORTE,6);
I use this technique for all I/Os I'm controlling, specifically in PORTS B &
D.
I've tried to set the appropriate DDRE bits to make 2,3,4,6 and 7 outputs,
leaving 0,1, and 5 alone.
I can toggle 4, 6 and 7 without problems. I cannot toggle 2 and 3 the same
way.
I'll check my setup code again.
Thanks, Pete Allison (Rogers Telecom Products)
-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Harald Kipp
Sent: Tuesday, September 08, 2009 10:51 AM
To: Ethernut User Chat (English)
Cc: WROG1304 at aol.com
Subject: Re: [En-Nut-Discussion] PORT E (Ethernut 1.3)
Pete Allison wrote:
> If I have 2,3,4,6 and 7, that is sufficient. Is there any special setup I
> have to do for 2,3, or 4?
PE2, PE3 and PE4 are directly connected to the expansion port.
Hardware: Do to mechanical stress, the vias may be broken. Try to
measure the result directly at the CPU pins.
Software: You enabled any special peripheral on these pins? You used the
right I/O call with the right bit/mask?
sbi(PORTE, PE4),
but outr(inr(PORTE), _BV(PE4));
Try something simple like
http://www.ethernut.de/nutwiki/Blinking_LED
first.
Harald
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
More information about the En-Nut-Discussion
mailing list