AnsweredAssumed Answered

AD9914 not writing SPI to registers / AD9914 questions for a newbie

Question asked by Hobbes on Jul 7, 2015
Latest reply on Jul 10, 2015 by sitti

Hi, so i'm fairly new to using this board and the beaglebone black that i'm using to program it over SPI, however I believe what i'm doing is correct so far and am looking for where i've gone wrong. At the moment i'm feeding the board a 32 MHz signal to CLK IN and reading out a 2 MHz signal from the SYNCCLK, which confuses me as I thought the division was by 4 not 16, so there's a first question. The state of the pins are as follows:


MPI00: tied to ground

MPI01: connected to beaglebone's SPIO_SCLK

MPI02: connected to beaglebone's SPIO_D1

SYNC_IO_BUF / IOUPDATE_BUF / RESET_BUF all connected to GPIO pin's 12,14, and 16 on the beaglebone

Function pins IOCFG0-3 tied to state 1000

EXTPDCTL_BUF and OSK_BUF tied to ground

PS0 - PS2 tied to ground (profile zero selected)


P203 P204 and P205 all disabled

providing 3.3v and 1.8v to P300


So with that, here's my python code, at the moment my goal is merely to write to the board data that will

1: enable profile mode

2: set the FTW on channel 0 (to 8MHz if I remember correctly)


import Adafruit_BBIO.GPIO as GPIO

from Adafruit_BBIO.SPI import SPI

import time


spi = SPI(0,0)

spi.lsbfirst = False

spi.mode = 1

spi.msh = 1000000




#sets up reset and ioupdate pins, setting them to low

GPIO.setup("P8_12", GPIO.OUT) #reset pin, yellow

GPIO.setup("P8_14", GPIO.OUT) #IOupdate pin, green

GPIO.setup("P8_16", GPIO.OUT) #SyncIO pin, white


GPIO.output("P8_12", GPIO.LOW)

GPIO.output("P8_14", GPIO.LOW)

GPIO.output("P8_16", GPIO.LOW)


#sends IOupdate pulse

def sendIOupdate():

        GPIO.output("P8_14", GPIO.HIGH)


        GPIO.output("P8_14", GPIO.LOW)


#sends reset pulse

def sendReset():

        GPIO.output("P8_12", GPIO.HIGH)


        GPIO.output("P8_12", GPIO.LOW)


#sends syncIO pulse

def sendSyncIO():

        GPIO.output("P8_16", GPIO.HIGH)


        GPIO.output("P8_16", GPIO.LOW)




#Establishes profile mode:




#Sets profile 0's FTW





Running this script of course yields nothing out of the DAC output which is my current issue. I've also altered to data written to disable the SYNC_CLK (writing 0x01,0x00,0x00,0x00,0x00 and sending an IOupdate) which I assumed would disable the sync clock output of 2MHz that I was seeing, however it continued. Leading me to believe I am unable to write data to the board at all. The issue could be with my use of Adafruit's SPI library but I'm unsure. Any and all help is welcome!


Additionally here are some oscilloscope outputs:

1: The SPIO_SCLK and SPIO_D1 outputs from the beaglebone (first call of writebytes) I accidentally left the probe attenuation at 1x here ignore the low voltage values


2: Same thing, but for the second call of writebytes


As this data looks correct as far as I can tell i'm assuming i'm using SPI at least somewhat properly.

There are IOupdates being called as well but the red pitaya im using as an oscilloscope only has two inputs.