Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Cristi_Neagu on April 03, 2010, 05:33:29 AM

Title: Axon digital outputs
Post by: Cristi_Neagu on April 03, 2010, 05:33:29 AM
Hello.

I can't find any info on how the Axon outputs data via the I/O pins. Is it open collector? If a pin is puled high, does that mean that you will get +5V on that pin? Or if it's pulled low, is it connected to ground or is it floating?
Basically, i want to know if i need pull-ups or pull-downs on the outputs from the Axon.

Thanks.
Title: Re: Axon digital outputs
Post by: Ro-Bot-X on April 03, 2010, 05:54:22 AM
All AVR microcontrollers behave the same. The I/O pins can be set to Output or Input, or they can be set for additional functions sometimes.
When set as Output, the pins can be set High, that means they will output a +5 voltage, or they can be set Low, that means they will output a 0 voltage (always measure voltage compared to ground). If you use external pull up resistors (or pull down), if the pins are set as output, you will have a current going through the resistor, that is waste of power. As an Output, the pin will source power (or sink to ground) to the ouside connected circuit.
When set as Input, the pin may be floating between High and Low if the pin is unconnected, or if the circuit can't set a steady voltage to be considered either High or Low. This is the case where a Pull-up or Pull-down resistor may be needed to make sure the pin stays in one state until the circuit makes a change. The pins have an internal Pull-up resistor that can be set only if the pin is set as an Input first.
An Output pin can be set to Input (without any pulling resistor) and this will make the pin go to a High Impedance state, making the outside circuit seem like it was disconnected.  

Hope this helps...
Title: Re: Axon digital outputs
Post by: Cristi_Neagu on April 03, 2010, 06:02:25 AM
Yup... sure it helps. Thanks for the reply :)

From what you said, i gather that if i set a pin as Output, i don't need any pull-ups or pull-downs. Is that correct?
Also, if i set the pins as Input, the type of polarization that i use depends entirely on what i connect to the Axon.

I understand now. Thanks for the reply.
Title: Re: Axon digital outputs
Post by: cyberfish on April 03, 2010, 07:14:26 PM
For most (or all I have used, which is exactly 3 =P) microcontrollers, setting pin to output means enabling internal pull-up.
Title: Re: Axon digital outputs
Post by: Soeren on April 03, 2010, 09:58:31 PM
Hi,

For most (or all I have used, which is exactly 3 =P) microcontrollers, setting pin to output means enabling internal pull-up.
Not if they were made in modern times.
A CMOS output stage is a push-pull stage and any sign of pull up or -down will just be a meaningless load.
Title: Re: Axon digital outputs
Post by: cyberfish on April 03, 2010, 10:01:08 PM
That's interesting.

How do they make it float to function as an input, then?

The last MCU I used (P89V51RD2) used almost the exact same wording "enables internal-pullup" in the datasheet.

EDIT: and it most certainly is CMOS (not prehistoric NMOS 8051).