Chargement…
Chargement…
The module programs the AD9832 DDS using the provided SPI master.
It initializes the device, writes a 32-bit frequency word in 8-bit chunks, and then alternates between the two frequency registers.
Behavior
i_reset_n='0', the power-up sequence places the AD9832 in reset, clears the four frequency-register bytes, and then releases reset.i_spi_top='1' latches i_data_to_send while the controller is idle.FREQ0 and FREQ1 registers.io_ss_n(0), io_sclk, and o_mosi connect to the AD9832 FSYNC, SCLK, and SDATA pins, respectively.g_CLK_FREQ_MHZintegerDefault :40Description :Nominal i_clk frequency in MHz, retained in the supplied solution interfaceg_DIVintegerDefault :1Description :Divider parameter retained in the supplied solution interface| Port | Direction | Width | Description |
|---|---|---|---|
i_clk | Input | 1 bit | Controller system clock |
i_reset_n | Input | 1 bit | Active-low reset |
i_spi_top | Input | 1 bit | Pulse requesting programming of a new frequency word |
i_data_to_send | Input | 32 bits | AD9832 frequency word split across the four bytes of the selected register |
io_ss_n | Input/Output | 1 bit | Serial select connected to AD9832 FSYNC |
io_sclk | Input/Output | 1 bit | Serial clock connected to AD9832 SCLK |
o_mosi | Output | 1 bit | Serial data connected to AD9832 SDATA |
Refer to the official AD9832 documentation for command encoding, the four frequency-byte addresses, and the reset sequence.