Ну в исходники, то я сразу залез. Но много непонятного.
Просто из чтения даташита на ДДС.
Если установить бит автоматической очистки фазового акумулятора, то при перезаписи FTW0 автоматически должна поменяться частота генерации.
Итак. Программируем ДДС с компа(через родной софт) 1Мгц( 0x00AAAAAB),при частоте клока 48Мгц и коэф. х8 и влюченным VCO и Auto Clear Phase Accum.
отключаем плату DDS от LPT порта. Ставим ставим джампер на ресет(в землю) и переводим плату на ручное программирование(собственно мы отключаем буферные регистры(они дополнительно распаяны для программирования через ЛПТ)).
и шлем на SPI
0x04 // т.е. адресс FTW
и затем еще 32бита
0x01555555 т.е. частота 2МГц
затем дергаем I/O Update( он же FUD ) к единице на 20мкс и опускаем в 0
по даташиту Должна начаться генерация на новой частоте(2Мгц), но этого не происходит, частота как стояла на 1Мгц так и стоит...
куда копать уже не знаю.
Вот кусок даташита.
Пример программирования на генерацию
Цитата
SINGLE-TONE MODE
In this example, the part is programmed to output a 122 MHz
single-tone carrier, the device is clocked with a 20 MHz crystal
oscillator, and the clock multiplier is used to push the internal
system clock up to 400 MHz. Phase offsets are then added to
the carrier.
The programming steps include the following:
1. Write to Control Register 1 instructing the part to autoclear
the phase accumulator whenever the phase offset word
changes and issues an I/O update. Set Bit 13 in the CFR1
register. The address for CFR1 is 0; therefore, an instruction
byte of 0x00 is sent and 0x00 00 00 20 for data. Note that
users must write to all four bytes of the register.
2. Write to Control Register 2 setting the clock multiplier value
to 20, and the VCO range bit to its upper value. In CFR2,
Bit 7 to Bit 3 control the multiply value. To get a multiplied
value of 20 from 5 bits, the binary value is 10100. As
previously mentioned, also send Bit 2 to put the VCO into its
upper range (to get 400 MHz). Therefore, the instruction byte
is 0x01 and 0x00 00 A4 for data.
3. Calculate the tuning word to generate a 122 MHz output
from a 400 MSPS clock, load it into FTW0, and latch the
data written to the I/O buffers into their respective registers.
The frequency tuning word equation becomes (122 MHz/
400 MHz) × 232
, which yields 0x4E 14 7A E1. Send the
Instruction Byte 0x04 and four data bytes of 0x4E 14 7A E1.
Issue an I/O update, which transfers the data into the part.
Whenever a phase change is desired, calculate and write the
phase offset word to the part and issue an I/O update. For
example, if the first value is 45°, the phase offset word is
(45/360) × 214
, or in decimal, 2048. Therefore, write an
instruction byte of 0x05 and Data Byte 0x0800. When an
I/O update is issued, the phase accumulator clears, which
starts it from a known phase of 0°. It again accumulates at a
122 MHz rate, except now phase shifting each and every
sample by 45°.