xCORE-200 io pins tri-state

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
Experienced Member
Posts: 77
Joined: Fri Dec 06, 2013 7:05 pm

xCORE-200 io pins tri-state

Postby pasau » Sat Nov 23, 2019 11:32 pm

hello dear forum,

i just want to quickly confirm what i read in the documentation, can't be too cautious.
i am using a chip (wm8741 DAC) that uses tri-state logic on input pins for configuration. For example:
0 = hardware control mode
1 = 3-wire serial control mode
Z = 2-wire serial control mode

The datasheet of xCORE-200 chips mentions open collector outputs where 'L' if '0' and 'Z' if '1'. The xs2 architecture isa document mentions both cases, e.g. this along with 'Z' if '0' and 'H' if '1'. Of course i just need one of those modes to get 'Z'.
And also the pins have weak PD that can be disabled, and should be if i need floating or regular output. this has nothing to do with the pull-up/down drive mode of the port configuration.

So therefore, the required configurations would be like:
0: setc port, CTRL_DRIVE_DRIVE
out port, 0x0000
1: setc port, CTRL_DRIVE_DRIVE
out port, 0xffff

out port, 0xffff
out port, 0x0000

I want to confirm that i can do this directly with the xmos pins for my case, without the need of an additional tri-state buffer, and that my summary of relevant info is accurate.
User avatar
XCore Legend
Posts: 1880
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Sat Nov 23, 2019 11:56 pm

Hi. Please review the comments from Dave Lacey (XMOS) here:


Appears you can configure the GPIO as open drain as you have stated and Dave is showing XC examples of this implementation.

However, best to at least test or leave room for a single gate open-drain buffer in series so that the PCB layout is not wasted if the direct XMOS pin to DAC does not function correctly.

That is, allow for a 0402 or similar 0 ohm to bypass the open drain buffer so that you can stuff either / or to 100% guarantee the design will work. You could even leave room for a 0402 pull-up on the output of the OD buffer (just in case) and not stuff in the live product.

For example TI has the single gate buffer for $0.03 USD in 1k qty (direct from TI store):

Experienced Member
Posts: 77
Joined: Fri Dec 06, 2013 7:05 pm

Postby pasau » Sun Nov 24, 2019 12:43 am

thanks, everything seems to tell me it will work out, but i will do as you suggest just in case.

Who is online

Users browsing this forum: No registered users and 4 guests