Jump to content
  • 0

Uno32 w/ pmod shield and pmodDA4


djcheezy

Question

Hey guys,

I'm currently trying to spec a project using the Uno32 with the pmod shield.  The pmod I would like to use is the DA4 digital to analog converter.

I've noticed that in Diligent's reference section there is an example code section for the pmodDA1 which gives a zip file including examples, a library, and a library manual for using the DA1.  However such resources don't exist for the DA4.  Does anyone know if that library be necessary for using the pmodDA4, or where I can find some examples of using it?  I'm not new to microcontrollers, but I am new to pmod...

Any help would be appreciated!

Thanks!

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Hi djcheezy,

We don't have any "official code" that I am aware of for the PmodDA4, but I have created some MPIDE code that does a short demonstration for the PmodDA4 that you can find here

I also made an instructable that explains a little more detail about how to use it here, although there is currently not a library available for the PmodDA4.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

Hi djcheezy,

From my understanding, a library for the PmodDA4 will be released at some point in the future along with libraries for other Pmods that do not currently have their own. I'll be updating the that Digilent is working on with the new libraries as they come out here on their respective pages.

As for the compatibility issues, I don't think there will necessarily be any. I do know that the Pmod Shield was originally based off of the chipKIT MX3 layout, so it's not very intuitive to use and from my experience is kinda frustrating, but it certainly is possible to use. I'm a fan of direct connections so I personally don't use the Pmod Shield very frequently myself, but again, that's just my personal opinion.

Let me know if you have any more questions.

Thanks,
JColvin

Link to comment
Share on other sites

Hi JColvin,

What I'm worried about is using SPI to communicate with the Pmods.  I need 18 analog output signals, so I was planning on using 3 PmodDA4s with the Pmod Shield on the Uno32.  This shield appeared to work well because I also need 19 digital I/O.  The linked post casts doubt on how well using multiple Pmods with SPI will work.

http://chipkit.net/forum/viewtopic.php?f=16&t=1529

I found your previous post setting up the Pmod Shield, which I found very informative: https://forum.digilentinc.com/topic/81-getting-the-pmod-shield-to-work-correctly/#comment-197

Do you believe that I'll be able to use SPI or DSPI to communicate to all three PmodDA4s?

Thanks for all your help,

djcheezy

Link to comment
Share on other sites

Hi djcheezy,

Yes you should be able to use the SPI or DSPI with all three of the Pmods. Since you are using a lot of digital pins, I would recommend "daisy-chaining" the MOSI, MISO, and SCLK lines together and then have three separate chip select lines, one for each PmodDA4, that you would then appropriately choose in software to get the correct output enabled. This would save you an additional 6 pins than if you had everything connected separately.

You can check out this photo here to see what I mean by pin connections I was describing here.

What I'm curious about though now is how you plan on running your analog outputs. Will only one output be turned on at a time, or will multiple outputs be enabled at the same time? If you have multiple outputs enabled at the same time (and they happen to be at different voltages) you'll need to quickly cycle through your outputs on a particular PmodDA4 since the ADI chip on the Pmod does not let you pick and choose multiple outputs to be enabled; it only lets you turn on just 1 of them or all of them simultaneously with the same output values.

Let me know if you have any more questions.

Thanks,
JColvin

Link to comment
Share on other sites

JColvin,

I had planned on using multiple outputs at differing voltages simultaneously.  I was unaware of this limitation on the ADI chip.  I guess I should have read the datasheet better :blink:

I don't think that this should pose to much of a problem however.  I can just run the clock faster, and maybe stick a cap on the outputs to keep the voltage up.

Is there any way you can post a picture of the bottom of the Pmod shield?  I can find a photo online, and I'm curious as to what the bottom of it looks like.

You've been an awesome help, I'll definitely look into the daisy-chaining your block diagram explains it pretty well.

Thanks so much,

djcheezy

Link to comment
Share on other sites

That's alright, I was also bummed when I found out about the limitation myself. There are other DAC Pmods that would allow you to do such a thing (like the PmodDA2), but they don't have nearly as many outputs as the PmodDA4 (2 instead of 8).

You can find all of Digilent's photos by going to digilentinc.com/photos. You can then type "Pmod Shield" and you'll see the image you want :)

Let me know if you have any more questions.

Thanks,
JColvin

Link to comment
Share on other sites

JColvin,

Thanks for all your help!  I think that I'm going to go with the uC32, as you no longer make or have stock of the Uno32.

If I have any questions down the road, I'll ask them on the forum.

Thanks!!

djcheezy

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...