Jump to content
  • 0

PmodDPG1 with Arduino


rusty@gracecomposites

Question

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

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

PmodDPG1_arduino_2.jpg

PmodDPG1_arduino.jpg

Link to comment
Share on other sites

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

DPG1_board_selection.jpg

Link to comment
Share on other sites

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...