On program change ...
Posted: Mon Jul 29, 2019 2:38 pm
Hi, sorry if this has been covered already - I was just wondering if someone could please confirm some test results for me and/or explain some observations:
On program change, it appears that the following happens:
- DACs store the last written value somewhere and are then held at 0.0
- All general purpose registers, ACC and PACC are cleared to 0.0
- All delay memory is cleared to 0.0
- After about 18ms (roughly 580 samples with a 32768Hz xtal), the new program is started
- One sample later, the DACs start outputting the last written value - even if it was from the previous progam or just during the first program iteration.
Firstly: Is the ~18ms delay a function of the sample rate? Or is this dictated by other factors, like EEPROM access? If the delay is related to the sample rate, what is the actual value? For a given sample rate, is it possible to predict what the delay is going to be?
Secondly: It seems like no matter what happens in the first iteration of the program, any writes to DACL and DACR, even though they definitely 'stick' are replaced with 0.0. Is this deliberate, normal and correct? Is it perhaps something to do with the RUN flag for the skp operation?
From my testing, the second sample is definitely getting out, it's just the first one that seems to disappear.
Any info would be greatly appreciated. Thanks!
On program change, it appears that the following happens:
- DACs store the last written value somewhere and are then held at 0.0
- All general purpose registers, ACC and PACC are cleared to 0.0
- All delay memory is cleared to 0.0
- After about 18ms (roughly 580 samples with a 32768Hz xtal), the new program is started
- One sample later, the DACs start outputting the last written value - even if it was from the previous progam or just during the first program iteration.
Firstly: Is the ~18ms delay a function of the sample rate? Or is this dictated by other factors, like EEPROM access? If the delay is related to the sample rate, what is the actual value? For a given sample rate, is it possible to predict what the delay is going to be?
Secondly: It seems like no matter what happens in the first iteration of the program, any writes to DACL and DACR, even though they definitely 'stick' are replaced with 0.0. Is this deliberate, normal and correct? Is it perhaps something to do with the RUN flag for the skp operation?
From my testing, the second sample is definitely getting out, it's just the first one that seems to disappear.
Any info would be greatly appreciated. Thanks!