SPI comms Question

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
outlawstc
Posts: 32
Joined: Tue Oct 15, 2013 6:14 pm
Has thanked: 12 times
Been thanked: 9 times
Contact:

SPI comms Question

Post by outlawstc »

I am trying to program a atmega328p to control a AD9850 DDS chip...
Matrix program does not have the settings to choose LSB first or MSB first for transmission.. how do i go about setting this register.. Ive tried to set it with a implement C code macro with no luck... any suggestions..
"If your having code problems I feel bad for you son... I got 99 problems but a glitch ain't one"

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: SPI comms Question

Post by kersing »

Modify 'Flowcode 6/CAL/AVR/AVR_CAL_SPI.c'. This will probably break other components so you want to make the code conditional with #ifdef #endif construct and define a constant to enable your code. (Define the constant and look at the generated C code to see the exact name flowcode uses)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Post Reply