Hi,
Just started to read this document. Now I'm on page 27 and confused:
The select function inBit is called 8 times. Will it really read 8 bits or only 4? I think the transitions to Quiet also return to main, don't they?
Thomas
Programming XC on XMOS devices, page 27
-
- Experienced Member
- Posts: 94
- Joined: Tue Apr 27, 2010 10:55 pm
-
- XCore Addict
- Posts: 165
- Joined: Wed Feb 10, 2010 2:32 pm
Well spotted!skoe wrote:Just started to read this document. Now I'm on page 27 and confused:
The select function inBit is called 8 times. Will it really read 8 bits or only 4? I think the transitions to Quiet also return to main, don't they?
Yes your understanding of how XC works is correct, and the example is wrong. To get receive 8 bits you need to detect 16 transitions, so the loop at the bottom should be for 16 iterations.
I'll submit a bug on the document. Thanks again.