[En-Nut-Discussion] Ethernut 1.3g, configuring inputs
macsmaker at aol.com
macsmaker at aol.com
Tue Nov 18 04:09:26 CET 2008
I'm having problems configuring certain ports to use as inputs. Here's my initialization code:
??? cbi(PORTE, 0); /* turn the pullups */
??? cbi(PORTE, 1); /* off */
??? cbi(PORTE, 2); /* turn the lEDs */
??? cbi(PORTE, 3); /* on */
??? cbi(DDRE, 0); /* OptoEnc A input */
??? cbi(DDRE, 1); /* OptoEnc B input */
??? sbi(DDRE, 2); /* Port E, bit 2 drives the amplifier up */
??? sbi(DDRE, 3); /* Port E, bit 3 drives the amplifier down */
I know my hardware that drives PINE bits 0 and 1 are working. However, when I measure the input on the ethernut board (using a DVM or a scope), it always reads high (around 5 volts). Seems to me I have not disabled the pullups. I've tried reordering my code.
Does this make sense? If I either directly ground or drive with VCC, the inputs work. When I drive with my hardware, the don't work. Like I said, using a scope or DVM, I can see my hardware changing the port inputs.
Thanks,
Pete Allison
More information about the En-Nut-Discussion
mailing list