Programming XC on XMOS devices, page 27

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
User avatar
skoe
Experienced Member
Posts: 94
Joined: Tue Apr 27, 2010 10:55 pm
Contact:

Programming XC on XMOS devices, page 27

Post by skoe »

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


User avatar
Woody
XCore Addict
Posts: 165
Joined: Wed Feb 10, 2010 2:32 pm

Post by Woody »

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?
Well spotted!
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.
Post Reply