[Icc-avr] ATmega8 hardware problem (John Baraclough)

Byron Loader byron at inhep.com
Mon Aug 18 00:03:10 PDT 2008


Have you ruled out Alternate Pin Functions on those Pins?

 

 

-----Original Message-----
From: icc-avr-bounces at imagecraft.com [mailto:icc-avr-bounces at imagecraft.com]
On Behalf Of Robert Rademacher
Sent: Monday, August 18, 2008 1:17 AM
To: icc-avr at imagecraft.com
Subject: [Icc-avr] ATmega8 hardware problem (John Baraclough)

 

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/20080818/cd2188f4/attachment.html


More information about the Icc-avr mailing list