Hi hmani,
Thank you very much for the help.
Upon the data sheet, Rev. B, here are the setup during the power up initialization:
1. check IRQ1 line (status1/ mask1), wait until it is low, then read STATUS1 register. If bit 15 is set, write 0x00008000 to STATUS register, after the write, I read back this register to make sure this bit is '0'
2. Write to STATUS1 with value 0x3FFFFFFF, I just want to clear all the flags. (Any issue on doing this way???)
3. Write 0x0040 to Gain register
I verified that the data is correct
4. Write 0xBD to LCYCMODE register,
I verified that the data is correct
5. Write 0x0708 to LINECYC register
I verified that the data is correct
6. Write 0xFFFE to ZXTOUT register
I verified that the data is correct
7. Write 0x4000 to COMPMODE register, I don't use CFx, input is 60Hz
I verified that the data is correct
8. Upon the data sheet, to enable memory protection by writing 0xAD to 0xE7FE, writing 0x80 to 0xE7E3
9. Write 0x0001 to RUN register
I didn't change any other registers.
With above settings, at the condition that there was no input voltage, no load applied, ZXTOx bits were never been set to '1'.
Then I did some experiments. I found it is related to starting DSP and the value wrote to ZXTOUT register.
1. If I didn't do step 9, DSP is in idle state, then ZXTOx will be set, if I wrote '1' to the corresponding bits of STATUS1 to clear the bits, then read back STATUS register, those bits will be set again very soon.
2. If I wrote a small value to ZXTOUT register, such as 0x00FF, instead of 0xFFFE, MUST write the value to ZXTOUT register AFTER enable DSP RUN bit, then these ZXTOIVx bits will be set.
I am not sure if I miss any steps here.
thank you so much for the help.
Karen