Shop OBEX P1 Docs P2 Docs Learn Events
Reading literature about Counters and studying the usage — Parallax Forums

Reading literature about Counters and studying the usage

msiriwardenamsiriwardena Posts: 301
edited 2019-04-13 20:43 in Propeller 1
During my readings I came across this: ctra := constant(%0_11111_000 <<23) 'Logic always

The the counter Modes(CTRMODE Field Values) table list : %11111 - as logic always

ctra := %00100 <<26 --> sets CTRMODE to NCO mode(%00100) ---> this from the Propeller Manual.

What I don't understand lefshift (<<26 and <<23) in both statements.
What the shifting do/achieve

I think I understand ctra := %00100 <<26 - to set the countermode bits 30..26 is that correct?

Thanks

Siri

Comments

  • Correct, which is a little easier to understand then 0x10000000 when trying to set CTRMODE.

    Mike
Sign In or Register to comment.