[Icc-avr] ATmega8 hardware problem (John Baraclough)
Robert Rademacher
robertrade at yahoo.com
Sun Aug 17 16:16:57 PDT 2008
Hi,
"I'm using an ATmega8 in a small application with a 10-way DIP switch.
Six of the switches are on PortC and the internal pull-ups are fine on
this port. However, the remaining four switches are on Port D and I have
a problem with getting the internal pull-ups to work on bits 5, 6 7 & 1.
The data sheet implies that the pull-ups are present on these pins but I
don't seem to be able to switch them on."
PORTC = 0x7F;
DDRC = 0x00;
PORTD = 0xE1;
DDRD = 0x00;
may work with your 10 pos DIP switch.
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080817/1aea10d6/attachment.html
More information about the Icc-avr
mailing list