3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How can I disable an avr's special pin functions?

I'm using an ATMega8? I've set all PD to output. The PD4 (XCK/T0) and PD6 (AIN0) can't be controlled and stay high or low.

1 answer
May 10, 2009. 6:26 PMcryptopsii says:
page 64 of the datasheet of the atmega8 talk about "Overriding signal for alternate function for port d" and we see that "ain0" (pd6) and "" (pd4) seem to have an override. the ACSR (Analog Comparator Control and Status Register) on page 194 have a bit, bit#2 called "Analog Comparator Input Capture Enable" try writting a 0 at this spot (or use logic AND 0xFB) just a guess... try the avrfreak forum, www.avrfreaks.net these guy propably know the answer. also, since the port were in an output state, if it was forced to some value, these pin might have died. those questions can be tricky... good luck!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!