Making an 8bit port to be 8 1bit ports?

Technical questions regarding the XTC tools and programming with XMOS.
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Making an 8bit port to be 8 1bit ports?

Post by narutoxela »

Is there a way to turn lets say an 8bit port in to 8 1bit ports? Maybe using some software on the xmos chip?...


yzoer
XCore Addict
Posts: 133
Joined: Tue Dec 15, 2009 10:23 pm

Post by yzoer »

You can always break it up into multiple 1-bit ports (using software, basically AND- and OR bits) as long as the direction is the same. For multi-directional I/O you're relegated to using 1-bit ports.

-Yvo
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

Take a look at sc_advanced_port_usage on Github for an example of zipping and unzipping individual bitstreams onto a 4 bit port:

https://github.com/xcore/sc_advanced_port_usage

Some documentation is available:

https://github.com/xcore/sc_advanced_po ... /index.pdf
narutoxela
Active Member
Posts: 46
Joined: Wed Apr 20, 2011 9:30 pm

Post by narutoxela »

Thanks for the info guys, I will take a look in to it :P