[En-Nut-Discussion] Ethernut 1.3g, configuring inputs
Stefan Hax
stefan at escherlogic.com
Tue Nov 18 05:10:39 CET 2008
check that the USART is not active. Stefan.
macsmaker at aol.com wrote:
> 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
>
>
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
More information about the En-Nut-Discussion
mailing list