• 0
TCTeis

ChipKit uc32 and Analog Shield

Question

Posted (edited)

Hello, 

i am having trouble using the chipkit uc32 together with the analog shield here https://store.digilentinc.com/analog-shield-high-performance-add-on-board-for-the-arduino-uno-retired/

When i connect the Shield to my Arduino UNO one samples needs about 10 microseconds witch should be right. 
Instead if i connect it to the chipKit uc32 it takes about a 150 microseconds. 

I guess the SPI communication is not working properly  but i dont know why. 

Since i dont know wether the board is the retired version or the newest i thought it might not work if its the old one. 

Did anybody else have a similar problem or is there a way to find out wether my uc32 is the old or new revision. 

Thx in advance


Edit: 
I solved the problem. 
Instead of using the Arduino IDE i switched to MPIDE. Now it works with a sample rate of 1sample / 25 microseconds. 
There might be a problem with the Additional Board Manager URL for the Arduino IDE. I might take a look at it if i have the time.


 

Edited by TCTeis
Solved

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @TCTeis,

Glad to hear that mpide has solved the issue. For your arduino ide are you using the chipkit core or the digilent core?

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi @vule,

It took me a long while to find the error since everything compiles properly and the output voltage worked correctly, but I did find an error in the analog read function where the conversion of the data out of Two's complement into unipolar data was not working correctly. I have attached the analogShield.cpp that I used in my project (with the various debugging print statements commented out).

Thanks,
JColvin

analogShield.cpp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now