[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] atmega32 problems

From: Erik Christiansen
Subject: Re: [avr-gcc-list] atmega32 problems
Date: Mon, 25 Aug 2003 16:28:24 +1000
User-agent: Mutt/1.3.28i

On Sun, Aug 24, 2003 at 09:58:20PM -0700, Jamie Morken wrote:
> Thanks, I just tried that and I get the same strange outputs. ie. 1.2volts
> instead of 5 volts on some of the pins.  These pins are not hooked up to
> anything except my volt-meter so perhaps they need to have a load on them?

Just going from first principles, 'cos I haven't got to avr hardware
yet, but possibilities which come to mind are:

   o  They're still inputs, and floating. Your direction change didn't
      take. Is there any difference if you assert reset, forcing

   o  Pin changing state rapidly. PWM -> 1.2v
      Unlikely, given your code sample. Do you have a oscilloscope, logic
      analyser, or logic probe?

   o  A weird effect due to the restriction listed on p48 of the
      ATmega32 datasheet: "When switching between tri-state ({DDxn,
      PORTxn} = 0b00) and output high ({DDxn, PORTxn} = 0b11), an
      intermediate state with either pull-up enabled ({DDxn, PORTxn} =
      0b01) or output low ({DDxn, PORTxn} = 0b10) must occur."

      The requirement is further described on p49, but at no point do
      the consequences become clear (to me, anyway).

      Going from reset (high Z port) to output high is a 00 to 11
      transition in their table, i.e. a declared no-no.

So, before throwing out the chip, you could try the avr I/O two-step.
You never know your luck ...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]