rusty@gracecomposites Posted September 4, 2017 Share Posted September 4, 2017 I am working on an application to replace an air signal tank level controller. I am experienced with basic Arduino programing. I have installed the Digilent Core for Arduino and have looked at the DPG1 Demo program. I am having trouble getting it converted to run on Arduino. Does anyone have an example program to read the pressure using Arduino IDE? Link to comment Share on other sites More sharing options...
jpeyron Posted September 5, 2017 Share Posted September 5, 2017 Hi @rusty@gracecomposites, The DPG1 library that is on PmodDPG1 resource page here compiles in the Arduino IDE. I put the library here : C:\Program Files (x86)\Arduino\libraries. I have attached a screen shot. If this does not fix the issue please attach a screen shot of the errors you are getting and where you have put the library. cheers, Jon Link to comment Share on other sites More sharing options...
rusty@gracecomposites Posted September 7, 2017 Author Share Posted September 7, 2017 Still having problems. which digilent board to use when, Pen number on the uno to conect to the DPG1? Link to comment Share on other sites More sharing options...
jpeyron Posted September 7, 2017 Share Posted September 7, 2017 Hi @rusty@gracecomposites, If you are using the Arduino uno it has a difficult time using the DSPI library so I reworked the library to work with SPI.h. I have attached the altered library along with a picture of my setup. You should follow the connections table here for the uno with Digital pin 12 - miso, 13 sck and 10 ss. I installed the library here C:\Program Files (x86)\Arduino\libraries. If you are using the ChipKit UNO32 go ahead and use the initial library that you downloaded from the PmodDPG1 resource page and connect Pin 10 (SS), Pin 12 (miso), Pin 13 (SCK) exactly like the aruino uno in this case. Add the library in the same place C:\Program Files (x86)\Arduino\libraries. I have verified both boards using the PmodDPG1. Make sure you are selecting the correct board and com port when you go to upload the sketch. I have attached a screen shot of where to do this. cheers, Jon DPG1.zip DPG11_setup_arduino_uno.zip Link to comment Share on other sites More sharing options...
rusty@gracecomposites Posted September 8, 2017 Author Share Posted September 8, 2017 i am still having trouble with this. I downloaded your new DPG1.ZIP and installed it in the libraries folder. Then opened the example with arduino IDE. I did notice your IDE version is 1.8.1 and mine is 1.6.8 could this be a problem. The program compiles but when i try to download it still gives the error "unable to sign on, this does not look like a bootloader" Is "chipKIT UNO32 the best board to use. I do have an Arduino Mega, would that be a better board to use? Link to comment Share on other sites More sharing options...
jpeyron Posted September 8, 2017 Share Posted September 8, 2017 Hi @rusty@gracecomposites, I do not believe the version of the Arduino IDE is the issue here. The error "unable to signon, this does not look like a bootloader" suggests that the bootloader isn't present on the ChipKit UNO32. This can happen if you've ever programmed the ChipKIt UNO32 with MPLABX or directly uploaded a different .hex file or something similar. To use the ChipKit UNO32 you would need to reload the bootloader back onto the board with MPLABX and a programmer such as the chipKIT PGM or a PICkit 3. There's a nice tutorial on how to do that here with the bootloader file that you would need on the right hand side of the ChipKit UNO32 Resource page. You can also use the Arduino Mega with the altered library I attached above. You should look at the Arduino spi library page here for the correct pins to wire to. Also you will need to change the pin 10 to pin 53 in the begin function in the DPG1.cpp file. Let us know if you have any more questions. cheers, Jon Link to comment Share on other sites More sharing options...
jpeyron Posted September 8, 2017 Share Posted September 8, 2017 Hi @rusty@gracecomposites, Please be aware that the I/O pins operate at 5v which is outside of the logic level spec. So this may be be a no go for the Adruino Mega unless you have a voltage level shifter. Something like our Pmod LVLSHFT here. cheers, Jon Link to comment Share on other sites More sharing options...
skiesatnite Posted February 28, 2018 Share Posted February 28, 2018 I want to connect Pmod DPG1 with the arduino mega 2560. I used the demo code in DPG1 library, but I keep getting zero reading of "Raw Data" on the serial monitor. I have tried pin connections ; miso = 50, sck = 52 , cs = 53. Where did it go wrong? Link to comment Share on other sites More sharing options...
jpeyron Posted February 28, 2018 Share Posted February 28, 2018 Hi @skiesatnite, Can you please attach a picture of you setup? thank you, Jon Link to comment Share on other sites More sharing options...
skiesatnite Posted March 1, 2018 Share Posted March 1, 2018 Finally, I managed to solve the issue by switching the pin connections and uploading new code. I switched the miso = icps1 and sck = icps3 while maintaining the pin connection cs = 53 on the arduino mega 2560 I noticed that I need to connect the NC = ground (I don't know this need to be done before.), then the serial monitor started to display data from Pmod DPG1. I found the new code here. The code on the link is used on arduino uno. I only switched the pin cs = 53. I'm sorry I couldn't attach the picture of my setup as it looks pretty messy. Thank you PMOD_DPG1_TEST.ino Link to comment Share on other sites More sharing options...
jpeyron Posted March 1, 2018 Share Posted March 1, 2018 Hi @skiesatnite, Glad to hear you were able to get the Pmod DPG1 working on the meg 2560. Thank you for sharing what you did to get the Pmod DPG1 up and working! cheers, Jon Link to comment Share on other sites More sharing options...
Question
rusty@gracecomposites
I am working on an application to replace an air signal tank level controller.
I am experienced with basic Arduino programing.
I have installed the Digilent Core for Arduino and have looked at the DPG1 Demo program.
I am having trouble getting it converted to run on Arduino.
Does anyone have an example program to read the pressure using Arduino IDE?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.