User Tools

Site Tools

Translations of this page:

local time: :: ()

heure officielle (en France) : ::(TZ:)

Heure UTC client: :: Offset client: s - delai: ms - - timeZone: Heure UTC: ::

Sidebar

  • NCO
  • Correlators
  • Digital noises :
    • phase noise
    • jitter
    • time stabitlity
  • Time to Digital Converters
  • Synchronous Detection
  • ADC/DAC choice for Time and Frequency
  • Measures of Sphi(f) & sigma_y(tau)
  • Timing in networks
  • Servo controls (fiber links, …)
  • Experimentations for fréquency generation
    • cold atoms
    • spectral hole burning
    • ions
  • « Officials » datations
  • Counters, with or without dead time.
  • Softwares
  • Drivers
  • IP cores (FPGA)
  • Chipscope
en:programs_to_communicate_with_the_dds

This is an old revision of the document!


Interface with TI microcontroller: the MSP430

Sample program in C written in the microcontroller MSP430F169

This microcontroller has 2 SPI ports.

SPI mode: Single-bit serial 2-wire Mode (default mode)

initialization and loading of CSR and CFTW0 records:

CSR_ADDRESS int = 0x00; AD9959 CSR adresss Byte
CSR_NUM_BYTE int = 0x01; CSR number of byte register
long CSR0 = 0x10; AD9959's channel 0 MSB first default SPI
   
FTW_ADDRESS int = 0x04; AD9959 FTW adresss Byte
FTW_NUM_BYTE int = 0x04; FTW number of byte register
long FTW0 = 0x28F5C28F; frequency in hex cares x2 ^ 32 / fclock
   

in the hand:

P4OUT = 0x40; AD9959 master reset MSP430 validation bit
P4OUT = 0x00; AD9959 master set of validation bit MSP430

write_serial_port (CSR_ADDRESS, CSR0, CSR_NUM_BYTE);
P5OUT = 0x40; I / O update DDS bit validation MSP430
P5OUT = 0x00; I / O update DDS bit validation MSP430

write_serial_port (FTW_ADDRESS, FTW0, FTW_NUM_BYTE);
P5OUT = 0x40; I / O update DDS bit validation MSP430
P5OUT = 0x00; I / O update DDS bit validation MSP430

Comments on the program

To initialize the DDS applying this procedure: RESET-DATA_SEND_to_BUFFER-IO_UPDATE.

RESET DDS (pin 3), load the data from each register via the SPI port write_serial_port … then carried out an I / O UPDATE pin 46 of the DDS for validation and data transfer. This program end loads the channel 0 with a frequency of 80MHz and an amplitude default FULL DAC.

I / O_UPDATE is synchronous to the SYNC_CLK (Pin 54) = Master clock / 4. See Figure 40 of the DDS datasheet.

Below under the boot program of the ports of the microcontroller and the SPI for the MSP430F169 TI provided numerous examples of base codes to configure the SPI modes, I2C and use the Flash memory: slac015p.zip

en/programs_to_communicate_with_the_dds.1457941665.txt.gz · Last modified: 2016/03/14 08:47 by fwiotte