|
|
View previous topic :: View next topic |
Author |
Message |
danielz85
Joined: 22 Sep 2012 Posts: 37
|
how to use DAC on dsPIC33FJ06GS202 |
Posted: Sun Jan 13, 2013 5:34 am |
|
|
Hi,
I need to generate a good signal which is composed of several specific frequencies. After a lot of time and hard work with PIC16F, I've decided that I can't evade upgrading to a dsPIC (with a DAC):
Here's the one I consider buying
http://ww1.microchip.com/downloads/en/DeviceDoc/70318F.pdf
since it complies with my minimal requirements.
I've never worked with dsPICs before, so here are my questions:
1. I've looked at the header of the DSPIC33FJ06GS202 (came with the compiler) but there's no sign there regarding any DAC, while in the datasheet it states clearly that it has one, and is configured via CMREF register, to which there's no sign in the header either.
2. I've read in the datasheet that it needs a 10MHz oscillator which it can increase to 40MIPS (using PLL). There are so many oscillators out there, what are the rules of thumb in choosing one?
Thanks a lot,
Daniel |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Sun Jan 13, 2013 9:24 am |
|
|
The DAC, is 'generic' on this family.
Look in the manual, at 'dac_write'.
Chips that have multiple DAC channels, support 'setup_dac', and then have entries in the header to select the channel to be used. This chip doesn't offer this. There should though be entries for setup_dac to select between AVdd/2, the internal reference, and the external refernce. These are missing.
Moan to CCS. Problem is that most of the other members in this family, don't have the DAC output (the 101,102, 402, and 404 don't), and CCS has left the lines out of the setup.
If you don't have time to wait, try copying in the constants from one of the larger family members that has them (802 for example). They may well work (the device database, knows the chip has a DAC).
Best Wishes |
|
|
danielz85
Joined: 22 Sep 2012 Posts: 37
|
|
Posted: Sun Jan 13, 2013 1:41 pm |
|
|
thanks Ttelmah |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|