Hi,
The circuit looks like memory mapped. In that case
Lets assume that /CS line is low when A15-A2 = 10000000000000.
As per the page 8 of the ad667.pdf document for right justified 8 bit interface
X01 loads loads 8 LSBs and X10 loads 4 MSBs where X=15-A2 and 0/1=A1&A0
So the adress of LSB is 0x8001 and MSB is 0x8002
and as per Fig7 in page 7, D11,D10,D9, D8 should be presented in lower nibble.
Finally as do not know much of Assembly, I will write the code in C language. You can convert it to assembly. I can explain you assembly logic too.
Code:
#define DAC_LSB (unsigned char xdata *)0x8001
#define DAC_MSB (unsigned char xdata *)0x8002
void update_DAC(unsigned short value12bits)
{
*(DAC_LSB) = (unsigned char) value12bits;
*(DAC_MSB) = (unsigned char) (value12bits >> 8);
}
The equialant in Assembly could be
1) Load ACC with 8 LSB bits
1) Load DPTR with 0x8001
2) use MOVX to update LSB
3) Load ACC with 4 msb bits
4) Load DPTR with 0x8002
5) use MOVX tu update MSB
You have to use MOVX because it is mapped to external memory. If I find some info I will post the ASM code.
Cheers
idlebrain