Update to example blog post on theembeddedkitchen #9

Closed
jedahan opened this Issue Jul 22, 2015 · 1 comment

Projects

None yet

2 participants

@jedahan
jedahan commented Jul 22, 2015

I was bit confused with this example in the article:

Example

So, to sample first 8 bits of R31 into the register file, we can use the following PRU assembly code:

MOV R10.b0, R31.b0
MOV R10.b1, R31.b0
MOV R10.b2, R31.b0
MOV R10.b3, R31.b0
MOV R11.b0, R31.b0

Observe:

End Example

I had to read the explanation after, that you were showing not an example of how to sample 8 bits of R31, but rather an example of making 5 samples, of 8 bits of R31.

A suggestion that would have made it easier for me (and maybe others) to follow:

Suggested update

So, to sample the first 8 bits of R31 into a register, we can use the following PRU assembly code:

MOV R10.b0, R31.b0

To take 5 samples of the first 8 bits of R31 into registers, we can use the following PRU assembly code:

MOV R10.b0, R31.b0
MOV R10.b1, R31.b0
MOV R10.b2, R31.b0
MOV R10.b3, R31.b0
MOV R11.b0, R31.b0

Observe:

End suggested update

@abhishek-kakkar
Owner

Thanks for the suggestion. I've incorporated it in my blog post, referencing this issue.

Closes #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment