CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

18f4520 SPI AD7376
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 20161

View user's profile Send private message

PostPosted: Tue Apr 02, 2013 12:22 am     Reply with quote

In my code the value I'm sending is 'val' the counter in the outer loop. 0-127, hence sawtooth output.
Now, do you really expect to send bytes continuously without any pause at all and be able to make a meaningful measurement on the output?. The Vw settling time is 4uSec, so a minimum of this is needed.

Best Wishes
ouch_



Joined: 27 Mar 2013
Posts: 12

View user's profile Send private message

PostPosted: Tue Apr 02, 2013 8:10 am     Reply with quote

Ttelmah wrote:

Now, do you really expect to send bytes continuously without any pause at all and be able to make a meaningful measurement on the output?. The Vw settling time is 4uSec, so a minimum of this is needed.


no no! was only a test, and it worked, do not know why.
ouch_



Joined: 27 Mar 2013
Posts: 12

View user's profile Send private message

PostPosted: Tue Apr 02, 2013 10:36 pm     Reply with quote

looking at the scope, the SDO pin (compared with SDI) of ad7376, the word is shifted 1bit to the right



I believe that this value, wrong, is the used.
the LSB (or MSB) follow the last (or first) bit state,
and because of shifted loses the LSB, remains fixed.
I think that's the problem
Ttelmah



Joined: 11 Mar 2010
Posts: 20161

View user's profile Send private message

PostPosted: Tue Apr 02, 2013 11:39 pm     Reply with quote

Which is why I suggested using 7bit.

Best Wishes
ouch_



Joined: 27 Mar 2013
Posts: 12

View user's profile Send private message

PostPosted: Wed Apr 03, 2013 4:57 pm     Reply with quote

Ttelmah wrote:
Which is why I suggested using 7bit.

Best Wishes


hello Ttelmah, thanks!

you're right! with 7 bits, in mode3 seems alright.



all values works ok if i remove delay time after CS up,
with delay, same problem.

best regards!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group