Sorry, I am using a PIC24FJ128GA110 but have also tried with a PIC24FJ256GB106 .
I am using the internal oscillator (I don't believe that makes any difference)
There is nothing relative in the errata.
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Mon Apr 06, 2009 12:23 pm
What is your compiler version number?
geokonst
Joined: 04 Apr 2009 Posts: 27
Posted: Mon Apr 06, 2009 12:29 pm
it's 4.084
Guest
Posted: Mon Apr 06, 2009 3:20 pm
I'm somewhat new to SPI but don't think your writing to the accelerometer correctly. In all the code I have seen and the code I use for my accelerometer I never do just an spi read because I never remember it working correctly. But if you have time try the code below
Also how do you know your output is working? Have you checked with a logic analyzer? Can you use rs232 and a debug window to view the value stored in dataout?
Thanks
geokonst
Joined: 04 Apr 2009 Posts: 27
Posted: Tue Apr 07, 2009 2:04 am
Actually I am using a 4 channel oscilloscope and RS232.
The only difference I see in your code is that you are sending 00 instead of FF with spi_read. I don't believe it will make any difference but I will try it anyway.
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
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