Page 1 of 1

REG flag in CHO Instructions

Posted: Thu Oct 13, 2022 7:49 pm
by mweavers
Hi Frank,
I'm trying to figure out when the CHO instructions stop using the internal register (REG flag) and revert to using the "live" LFO value. Application note AN-0001 (page 4) shows that once the REG flag is used, several subsequent CHO instructions continue to use the captured LFO value in this register without having to send the REG flag again. At what point do CHO instructions go back to reading directly from the LFO instead of the internal register? Thanks in advance.

Re: REG flag in CHO Instructions

Posted: Fri Oct 14, 2022 8:01 am
by frank
Simple answer, never.

The value in the register will stay there until you do a new REG so if you want a "live" value then just do a REG.

Re: REG flag in CHO Instructions

Posted: Sun Oct 16, 2022 12:56 am
by mweavers
Ah, that clarifies it, thank you. I'm guessing that applies to CHO RDA and CHO SOF, but CHO RDAL simply gives the live value all the time regardless?

Re: REG flag in CHO Instructions

Posted: Sun Oct 16, 2022 9:05 am
by frank
Correct, CHO RDAL just give the current value of the selected LFO so if you read it multiple times in a program you may or may not get the same value. All LFOs are updated once per sample period but at different times for each LFO and their associated SIN and COS registers.