Buffer Chips for Startkit GPIO

New to XMOS and XCore? Get started here.
Post Reply
hessa59
Active Member
Posts: 37
Joined: Sat Mar 18, 2017 7:19 pm

Buffer Chips for Startkit GPIO

Post by hessa59 »

I am developing an educational project based on the Startkit processor and am unsure of the exact electrical specification of the Startkit processor I/O pins.

I would like to buffer the input and output with chips that have selectable 5 or 3.3 volt input/ output levels.

Is it possible to use regular TTL/CMOS chips? Will the same chips work on the -200 series?

Any help would be greatly appreciated.


Hagrid
Active Member
Posts: 44
Joined: Mon Jul 29, 2013 4:33 am

Post by Hagrid »

As I think you may have already found out, the pins are 3.3V and are at least 4mA - depending on which pin, it may be higher.

From a buffering perspective, I tend to aim to limit the load on the host processor as much as possible.

For buffering output pins, there are two points to consider. First is buffered output voltage and the second is output current.

The problem is generally simpler if you don't have to lift the output voltage, but I can certainly see where you could want a 5V output in an educational environment.

For 3.3V output, you can use a straight forward buffer chip. For 5V output, you need to look at a voltage translator/shifter chip. But more on this below...

Dealing with input pins is a bit easier as you only have a voltage shift to consider.

However, I use a series resistor with the pin to ensure that any current to/from the pin is kept under the rated max output pin in the case that the pin is accidentally put into an output mode - something that can perhaps happen more easily on the XMOS chips than with other microcontrollers. The worse-case scenario is a 5V supply on being placed on a pin that is output (ground) state. You will need a minimum of 1250 ohms to ensure maxing 4mA into the pin. Maybe hedge a bit and use 1.5kOhm. You can use a higher resistor with some potential impact on switching times due to input and parasitic capacitances. This will depend also on how fast you want to switch the pin.

A simple method of dealing with a potentially unknown input voltage is to install a zener across the processor pin to ground. Zener is located between ground and the input pin/series resistor node.

You can of course use a buffer/level translator for input protection as well. Some buffer chips may operate at 3.3V while providing 5V tolerant inputs which would avoid the need for a 5V rail and may be a little cheaper than a full blown level translator.

The above discussion does involve sacrificing the pins native ability to change direction at will.

There is another circuit that can do level translation while preserving the bidirectional nature - the mosfet level translator. This does carry other compromises in that the circuit uses pullup resistors on both the low and the high voltage side so the ability to drive output high to a few mA is lost. For example, you wouldn't be able to drive a LED from a logic high output to 5V, but you could drive the LED to ground from a 5V supply (and appropriate series resistor). In addition, you don't use the same input series resistor mentioned. The circuit is commonly seen on I2C bus designs for level translation. See http://www.nxp.com/documents/applicatio ... N10441.pdf

The reliance on higher value pullup resistors also will limit very high speed switching performance in the same (or worse) way as the input series resistor mentioned previously.

Products such as https://www.sparkfun.com/products/12009 use this method.

There isn't (to my knowledge) a method to just take the existing flexibility of the XCORE pin and translate it to 5V with more current without some compromise.
Post Reply