Tiny 2313 using PORT A instead of clock

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using an ATTiny2313, and I want to use pins 5 and 14 (XTAL1 and XTAL2) as IO pins. My code does this:

DDRA = 0x7;
while(1)
{
  PORTA = 0x00;
}
but I'm still getting 0.22V DC on both XTAL pins (what you usually see if you have a crystal).  The fuse bits are set to internal osc 4MHz.  Am I missing something?
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

0.22V is fine, if you set those pins high do you have about 5?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

turns out it is working correctly with those settings, I think I hadn't re-flashed. Thanks!