Hi, I am designing a control system based on DAC8728EVM and TMS320C28346.
They are interfaced through the XINTF, and the address is mapped in ZONE7.
As far as I know, XA line is only used to decide the function of DAC8728 (/LDAC, Address LATCH, etc..) and the real address of DAC8728 is written on XD line.
So, the code I wrote is as below.
// Step 1 : Access DAC-0 register
// XA3~XA0 should be 0 0 0 0 to latch XD4~XD0 into A4~A0
// XD4~XD0 should be 0 1 0 0 0 to access DAC-0 register
*((unsigned int*)0x00200000) = 0x0008;
// Step 2 : write data into DAC-0 register
// XA3~XA0 should be 0 1 0 1 to write XD15~XD0 into D15~D0
// XD15~XD0 should be the value to convert (set ffff here)
*((unsigend int*)0x00200005) = 0xffff;
// Step 3 : DAC converting
// XA3~XA0 should be 1 1 0 0 to trigger /LDAC
// XD15~XD0 can have any value
*((unsigend int*)0x00200007) = 0x0000;
The first question is if the logic above is correct or not.. I’m still not so sure.
And the problem is that XA signal is not correctly latched in step 1. Using oscilloscope, I found out that /WE signal of TMS320C28346 goes zero twice while it executes one sentence. (See the picture below)
XA signals last high for all period(one sentence), but XD signals fall down before the /WE secondly goes zero. (i.e Data in XD didn’t maintain their values)
So, I can only access ‘Configuration Register’(A4:A0 = 00000) at the end of step 1.
How can I sove this problem? Is there any way to make XD signal last high or to make /WE signal pulse only one time in the period?
please answer the following problems
1. Is the logic that I use in code is correct?
2. Is there any way to make XD signal last high? (is there any way to make XD signal maintain their values?)
3. Is there any way to make /WE signal pulse only one time in the period?