Output Configurations example. ATXMega256A3BU

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

Greetings,

Im currently learning all features of ATXMega256A3BU.
It has 3 different Output Configurations.

1. Totem Pole
2. Wired-AND
3. Wired-OR

Is there any specific example or aplication which able to distinguish between those 3 configurations ?

Thanks in advance.

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

What information do you want that is not in the AU family datasheet under "13.3 I/O Pin Use and Configuration"?
http://www.atmel.com/Images/Atme...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch, many of us are used to seeing just one configuration option on the tiny/mega AVRs, so the purpose of these other modes isn't very clear. I'm sure the Wired-OR and Wired-And configurations are useful in certain circumstances, but off-hand, I don't know what situations would require their use.

I think that's what anta.senaputra is getting at. When would it be more beneficial (or required) to use Wired-Or or Wired-And rather than the basic totem-pole configuration?

The datasheet says *how* to use the other configurations, but not why.

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

When you connect the output from more than one device together on a bus you can not use push-pull (totem pole) mode, whenever one device have a output level different from another it will be a short cut.

One solution to this is to only let the devices drive the bus in one direction, for example low, when you set the output to 0 and just release the bus (without driving it high) when you set the output to 1. If this is going to work you need a pullup (resistor) that pulls the bus high when all devices have released it.

With this configuration you see that the bus will be low when any device pulls it low and only be high if all devices have released the bus. This is logical AND.

With ordinary (non Xmega) AVR's you can accomplish this by alternating between low output and input. This isn't needed on Xmega since you can configure an output in wired AND mode.

Or the other way around, only let the devices drive the bus high and release it to a low state with a pull down resistor.

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

I2C is the classic example, where every chip attached can drive the lines low, but not high. A pull up on the line brings the line high when no chips are driving it low. In this manner, multiple chips can communicate without any possibility of shorting each other out.

Jeff Nichols

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

Totem is basically the "normal" mode where the output is driven high or low. Wired-AND is basically open collector, where you normally have an external pull-up resistor and the pin can sink current to pull the line low. That's how shared lines on a bus like I2C are normally set up.

Wired-OR seems to be like Wired-AND except that it pulls the line high, so presumably you need an external pull-down resistor.

Totem mode can have pull-up or pull-down resistors. Bus-keeper mode kinda has both, set up so that if the pin is driven high or low externally it stays that way when no longer driven (e.g. because the driving device is turned off).

Wired-AND is very useful for interfacing with buses or devices running at different supply voltages. The output configuration affects peripherals using the pins as well, so for example the USART on a 3.6V XMEGA can talk to a 2.5V receiver by having the TX pulled up to 2.5V externally and the pin set to Wired-AND mode. The RX pin will accept 2.5V as a logic high, and could be set to Totem mode with pull-down to avoid spurious noise.

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

Quote:

theusch, many of us are used to seeing just one configuration option on the tiny/mega AVRs, so the purpose of these other modes isn't very clear.

I don't disagree. It still seemed to me that OP never read/studied the family datasheet description. I read over it quickly, and while one might certainly have follow-on questions it appears decent.

Where you apply them? Certainly that depends on your app and needs. "Buskeeper" gives a hint in its name.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

To be fair, the datasheet could be clearer. The language used somehow manages to make what are actually fairly simple ideas seem complex.

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

Quote:

The language used somehow manages to make what are actually fairly simple ideas seem complex.

Not being a sparkie (EE) I had to grasp the Xmega terms as well.

How do they describe in the Xmega family datasheet the equivalent of an AVR8 output pin? "Totem pole". What the heck is that? The first Google hit on "totem pole output" is the Wikipedia page on push-pull, where it says under Totem Pole

Quote:
Totem-pole push–pull output stages

Two matched transistors of the same polarity can be arranged to supply opposite halves of each cycle ...


Without deciphering the sample schematics, that tells me what is up.

Similar with "wired-and output"--first Google hit is the Wikepedia article on "Wired logic connections".

My point is that the "homework" can easily be done. I went to the trouble to link to the family datasheet in case OP is unaware of it.

And after doing the above exercises, I went back to the family datasheet and re-read the descriptions. They don't sound so bad to me.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Call me old fashioned but I prefer datasheets that give a simple, one sentence plain English explanation of things instead of expecting you to look on Wikipedia.

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

Quote:

I went back to the family datasheet and re-read the descriptions. They don't sound so bad to me.

Quote:

Call me old fashioned but I prefer datasheets that give a simple, one sentence plain English explanation of things instead of expecting you to look on Wikipedia.

Quote:
13.3.4 Wired-AND
In the wired-AND configuration, the pin will be driven low when the corresponding bits in the OUT and DIR registers are written to zero. When the OUT register is set to one, the pin is released allowing the pin to be pulled high with the internal or an external pull-resistor.

Darn--two sentences.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Interestingly the first sentence seems to be incorrect. My colleague was using Wired-AND mode with the USART TX pin and found that it didn't work unless the DIR register bit was 1.

Anyway, we were talking about the totem configuration. Try to keep up.

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

Quote:

Interestingly the first sentence seems to be incorrect.

LOL--I saw that too. Other that that, tho, it is a pretty plain explanation.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Quote:

Anyway, we were talking about the totem configuration. Try to keep up.


Sheesh--now I'm off to review that one...First sentence?

Quote:
13.3.1 Totem-pole
In the totem-pole (push-pull) configuration, the pin is driven low or high according to the corresponding bit setting in the OUT register.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.