32-bit port shift register Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
User avatar
eez-open
Active Member
Posts: 60
Joined: Mon Oct 23, 2017 1:49 pm
Location: Croatia
Contact:

32-bit port shift register

Post by eez-open »

I'd like to learn more about 32-bit port shift register capability that is mentioned in e.g. XMOS Programming Guide (Chapter 6.11). It is not clear does each port has 32-bit wide/long shift register or that assume that declaring buffered port as 32 wide is applicable only to 32-bit hardware port, and consequently consume 32 pins. I'd like to serialize 16-bit wide data to 1-bit port. Is that possible or not?
Many thanks in advance.


View Solution
User avatar
CousinItt
Respected Member
Posts: 360
Joined: Wed May 31, 2017 6:55 pm

Post by CousinItt »

Hi eez-open,

yes, you can use the shift register for 1-, 4-, 8- or 16-bit ports.

See the xmos documents Introduction to XS1 ports and XS1-Ports-Specification for more info.
User avatar
eez-open
Active Member
Posts: 60
Joined: Mon Oct 23, 2017 1:49 pm
Location: Croatia
Contact:

Post by eez-open »

Great, thanks a lot. So for 32-bit shift register I need to declare :32. Does it mean that I can also declare 16-bit as :16, or shift register is always 32-bit wide (I didn't read a complete article that you suggested yet).
User avatar
CousinItt
Respected Member
Posts: 360
Joined: Wed May 31, 2017 6:55 pm

Post by CousinItt »

I don't think you can have a buffer for a 32-bit port - sorry, maybe I should have made that more clear.

Buffering for 16-bit and 8-bit ports only support 32-bit transfer widths (between the application and the buffered port).

4-bit ports can have 8- or 32-bit transfers widths, and 1-bit ports can have 4-, 8- or 32-bit transfer widths.

This is all covered in sections 3 and 4 of Introduction to XS1 ports. Take a look.
User avatar
eez-open
Active Member
Posts: 60
Joined: Mon Oct 23, 2017 1:49 pm
Location: Croatia
Contact:

Post by eez-open »

Hm, yes I found that. 32-bit is too wide, but it should be possible to do that in two pass with 8-bit. I'd like to load two 8-bit serial-in-parallel-out registers ('595 type) using single 1-bit port for data.
Post Reply