Port Precedence

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Port Precedence

Post by kster59 »

In portXS1.pdf it says:

If a port is enabled then it will overrule any ports with higher widths that it
shares its pins with.

So on an XS1-L1:
If I do:

in port MYPORT8 = XS1_PORT_8A; //X0D2 -> X0D9
out port MYPORT16 = XS1_PORT_16A; // X0D2 -> X0D9 + X0D14->X0D21

char Value8;
short Value16;

MYPORT8 <: Value8; //reads all 8 bits, suppose = 0x0000
MYPORT16 :> 0xFFFF; //outputs xx FF, where xx is tristated
MYPORT8 <: Value8; //Value8 still 0x0000

Am I correct to assume the pins 0-7 of MYPORT16 are completely ignored as stated above? So if I measure the value of MYPORT16[0] it will always be high imp?


Post Reply