![Diamond Systems Poseidon Скачать руководство пользователя страница 89](http://html1.mh-extra.com/html/diamond-systems/poseidon/poseidon_user-manual_2494418089.webp)
Example:
Output code = 1776
LSB = 1776 AND 255 = 240 (F0 Hex)
MSB = int(1776 / 256) = int(6.9375) = 6
(In other words, 1776 = 6*256 + 240)
Add the Channel Number to the MSB
The channel number is 0-3 and must be inserted in bits 7-6 of the D/A MSB byte, written to Base+5.
Example:
MSB = MSB + Channel * 64
Set D/A Simultaneous Update Bit
To update the DAC, set DASIM bit to 0. This performs an update of the current channel and all previously latched
channels, causing a simultaneous update. If no other channels were previously latched, this only updates the current
channel. To latch the channel set DASIM bit to 1.
Update example:
MSB = MSB & 0xDF
Latch example:
MSB = MSB + 32
Write the LSB and MSB to the Board
The LSB is written to Base+4 and the MSB/channel no. is written to Base+5. If you are using enhanced features be
sure to enable enhanced features before writing to the registers.
Monitor the DACBUSY Status Bit
DACBUSY = 1 for 10
µ
S while the data in registers Base+4 and Base+5 are serially shifted into the D/A chip. After
DACBUSY returns to 0 you can write to register Base+4 and Base+5. Registers Base+4 and Base+5 should NOT
be written to while DACBUSY = 1. When updating multiple channels for simultaneous update repeat steps 1 to 6,
as shown in the following example.
Example:
1. Compute D/A code.
Using the bipolar mode formula, we compute D/A code = 3V / 5V * 2048 + 2048 = 3276.8.
Round this up to 3277. (Binary value = 1100 1100 1101)
2. Compute LSB and MSB.
LSB = 3277 & 255 = 205 (Binary value = 1100 1101)
Diamond Systems Corporation
Poseidon User Manual
Page 89