xCORE-200 io pins tri-state
Posted: 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:
MODE/LRSEL pin:
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
Z: setc port CTRL_DRIVE_PULL_DOWN
out port, 0xffff
or
setc port CTRL_DRIVE_PULL_UP
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.
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:
MODE/LRSEL pin:
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
Z: setc port CTRL_DRIVE_PULL_DOWN
out port, 0xffff
or
setc port CTRL_DRIVE_PULL_UP
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.