roger Posted August 7, 2017 Share Posted August 7, 2017 Hi - I'm using a uC32 board with an analogShield. Whenever I enable the analogShield (include <analogShield.h>) digitalWrite to pins 8-13 becomes inoperative. Any suggestions? thanks - Roger Link to comment Share on other sites More sharing options...
jpeyron Posted August 7, 2017 Share Posted August 7, 2017 Hi @roger, Looking at the schematics I do not see anything that would stop the use of these pins from working. I have attached pictures of my setup as well as my logic analyzer using an Analog Discovery 2 with waveforms software showing the digital write works for pin 8. i also verified 9-13 as well. I am using the arduino IDE version 1.8.1 with the digilent core version 1.0.2. Please attach a picture of your setup as well as your code with what IDE and versions. cheers, Jon uC32_digital_write_analog_shield.txt analog_shield.zip Link to comment Share on other sites More sharing options...
roger Posted August 8, 2017 Author Share Posted August 8, 2017 It is super weird for sure. I will post my files - but - I did find a workaround. It turns out that I can use pins 0-10, but, 11, 12, 1nd 13 are not operative. Arduino IDE 1.6.13, uC32 with analogShield. When I comment out the analogShiled include line, it works, when this line is there, then pins 11, 12, 13 don't toggle. Thanks so much! I'll paste the super bare-bones code below: #include <Messenger.h> #include <analogShield.h> //Include to use analog shield. #include <SPI.h> //required for ChipKIT but does not affect Arduino Messenger message = Messenger(); int myPIN = 3; // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin PIN as an output. pinMode(myPIN, OUTPUT); Serial.begin(115200); } // the loop function runs over and over again forever void loop() { pinMode(myPIN, OUTPUT); digitalWrite(myPIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(250); // wait for a second digitalWrite(myPIN, LOW); // turn the LED off by making the voltage LOW delay(250); // wait for a second } Link to comment Share on other sites More sharing options...
jpeyron Posted August 8, 2017 Share Posted August 8, 2017 Hi @roger, Glad you were able to use other digital pins. I did more research and my pin 11-13 was not toggling the same as pins 8-10. I looked into the analog shield library and it uses the spi.h library. The SPI.h library uses SPI2. SPI2 on the uC32 is 11(SDO2), 12(SDI2) and 13(SCK2) as shown on the reference manual here. Unfortunately, you would not be able to use pin 11-13. If you would have needed those specific pins you would need to alter the analog shield library to use the DSPI.h library( info here) where you can choose which pins you will use. cheers, Jon Link to comment Share on other sites More sharing options...
roger Posted March 17, 2018 Author Share Posted March 17, 2018 Hi @jpeyron - is there any chance that one could get Eagle or other CAD files on the Analogshield? I'm a chemistry professor and it would be super nice to have a robust anlaog IO option for uC32 / Uno etc. Let me know! Thanks so much for your help - Roger Link to comment Share on other sites More sharing options...
JColvin Posted March 19, 2018 Share Posted March 19, 2018 Hi @roger, What sort of CAD files were you wanting for the Analog Shield; I presume a mechanical 3D CAD model? Currently we do not have any Eagle files or CAD models available for the Analog Shield, but I can ask and see if a 3D CAD model could made if you would like. Thanks, JColvin Link to comment Share on other sites More sharing options...
roger Posted March 27, 2018 Author Share Posted March 27, 2018 Thanks Colvin, I was looking for something with which I could copy the design to make more Analog Shields - if you can't, then I understand! Thanks, Roger Link to comment Share on other sites More sharing options...
jpeyron Posted March 28, 2018 Share Posted March 28, 2018 Hi @roger, The designs are not publicly shared. You can email support.digilent@ni.com to discuss other options. thank you, Jon Link to comment Share on other sites More sharing options...
Question
roger
Hi - I'm using a uC32 board with an analogShield. Whenever I enable the analogShield (include <analogShield.h>) digitalWrite to pins 8-13 becomes inoperative.
Any suggestions?
thanks -
Roger
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.