Hi,

I have a problem of the parallel data D<17:0> of AD9957. In the data sheet of AD9957, the data-words applied to Pin D<17:0> are expected to be coded as twos complement (default). For example, if the data is -7, then Pin D<17:0> is 111111111111111001，but when the data is a decimal, such as **-0.5**, then wha's the PIn D<17:0>? I don' know where to put the decimal point. In another words, I don't understand how the AD9957 recognise a decimal.

Regards

The 18 bits of the parallel data port span a decimal range of -131,072 to +131,071. This designation is arbitrary, however, because it assumes a least significant bit (LSB) weight of 1. You could just as easily assign the LSB weight as 2^(-17). Then the decimal range of the data port would span a range of -1 to [1 - 2^(-17)].

That said, an input value of decimal -0.5 is meaningless without specifying the LSB weight (or conversely, the full scale range of in the 18-bit data). For example, if the LSB weight is 1, then -0.5 is not valid input because it is not an integer. Therefore, you would need to round it to the nearest integer (-1 in this case). On the other hand, if the LSB weight is 2^(-17), then a decimal value of -0.5 makes more sense. It is -0.5/(2^(-17)) LSBs or -65,536 bits, which can be readily converted to an 18-bit twos-complement number.