element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs DAC8775 Quad-Channel DAC EVM - unlicensed roadtest part -1: Raw SPI
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 11 Jul 2018 9:11 PM Date Created
  • Views 739 views
  • Likes 9 likes
  • Comments 9 comments
  • RoadTest
  • ti_rt
Related
Recommended

DAC8775 Quad-Channel DAC EVM - unlicensed roadtest part -1: Raw SPI

Jan Cumps
Jan Cumps
11 Jul 2018

A year ago, the DAC8775 was the subject of the Quad-Channel, Analog Output Module RoadTest.

My element14 friend DAB was not impressed by the EVM and its software. I asked if he wanted to trade the board for another evaluation module, and he did. After some hick-ups with post services, the evaluation kit for the DAC is finally in my hands.

image

My review will be different than the official reviews, because I don't have the device to connect the EVM to USB. I will use SPI to talk to the device instead of the kit's GUI.

Maybe this will help future designers to control the device. There are very few code examples available.

 

The setup below didn't work for me, most likely because I failed to set up the correct SPI mode (clock polarity and phase) on the Bus Pirate .

I'm doing everything over again in a new blog where I use a Hercules microcontroller. I know the SPI module better on that family.

spoiler alert: that was successful.

 

 

Test Setup

 

I'm using a Bus Pirate to generate the SPI traffic. My logic analyser is a Papilio Pro FPGA dev board.

As you can see, everything is bodged together somewhat. But as a lab setup it will do.

 

image

The Bus Pirate's 4 SPI pins are connected to the SPI lines of the EVM.

The AUX pin drives the ^RESET.

The analog VPU input reads the ^ALARM signal.

 

You'll see the Bus Pirate's SPI commands later. But let's review the reset and alarm functions.

The reset signal is connected to AUX.

On the pirate, you can reset the DAC by pulling the reset low for a moment.

Here's the command:

image

To check the status of the alarm pin, execute this:

image

 

First SPI Communication

 

The Bus Pirate needs to be set up correctly for the DAC.

The speed isn't important because the DAC accepts from slow to very fast. I've selected a speed that's easy to capture on the logic analyser.

 

image

 

First I do a soft reset of the DAC.

The register is 0x01, and the 16 bit data command for a reset is 0x0001

image

image

Then I do a read of register 0x02. Why register 2? Just random. I want to check if I can send a command and get data back.

To read a register, you have to set the first bit of the address to 1.

0x02 = 0000 0010 => 1000 0010 = 0x82.

So to read the register 2, I have to send address 0x82, and then 16 bits of random data. The next 24 SPI clock pulses will return the address again, and the value of the register 0x02:

image

The second train of 3 * 8 bits is to generate the clock pulses that allow the DAC to reply.

I could also have used the command [r:3]. That also generates 24 clocks and returns the data on MISO to the console.

The [ ] pairs generate the chip select signals. According to the spec, the CS has to bump between the command and read. That's why the data is split in two blocks ([0x82 0x00 0x00] [0x00 0x00 0x00]).

 

Here's the traffic on the logic analyser:

image

 

Here's the same example, but I use the Bus Pirate's Read command to generate the 24 read pulses. The advantage is that you actually see the returned data on the console:

image

 

I know it's all still a bit fuzzy, but I learn as I go. In perspective of the difficulties I had to go through to get this far, the blog looks structured image.

  • Sign in to reply

Top Comments

  • jw0752
    jw0752 over 4 years ago in reply to DAB +4
    Hi DAB, Of course you are correct. I will amend, "What is less useful for one man's purposes is another man's treasure." John
  • genebren
    genebren over 4 years ago +3
    Great unlicensed roadtest review. I really enjoy how you dig into things and try interesting approaches and tools to get your data. Good luck as you move forward on this review. Gene
  • DAB
    DAB over 4 years ago in reply to jw0752 +3
    Hi John, It is not so much that I found it to be trash as something less useful for my purposes. Jan has an excellent project for the board so it made good sense to trade it to him. DAB
  • Jan Cumps
    Jan Cumps over 4 years ago in reply to Jan Cumps

    Working PoC with Hercules microcontroller: DAC8775 Quad-Channel DAC EVM - unlicensed roadtest part 1: Raw SPI

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 4 years ago in reply to Jan Cumps

    I got it working. Time to start analysing the performance ...

    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 4 years ago in reply to Jan Cumps

    That's better image

     

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 4 years ago in reply to Jan Cumps

    Attempt 2, with a Hercules microcontroller

     

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 4 years ago

    It's not easy ... There's two way communication between my controller and the DAC, but no meaningful conversation.

     

    I first tried to set all registers as I think they should be set, but can't get the DAC to output a voltage or current.

    Then I tried the debug sequence. The DAC has a toggle bit. You set a user bit in one register. That toggles another user bit in another register. You can read that back.

    That doesn't work with my current setup.

     

    image

     

    I'll try a new setup, using a microcontroller that I know well instead of the Bus Pirate as SPI master.

    I'll have to write a small SPI firmware program but that should be doable. Hang on ...

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube