CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

how to use DAC on dsPIC33FJ06GS202

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
danielz85



Joined: 22 Sep 2012
Posts: 37

View user's profile Send private message

how to use DAC on dsPIC33FJ06GS202
PostPosted: Sun Jan 13, 2013 5:34 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jan 13, 2013 9:24 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jan 13, 2013 1:41 pm     Reply with quote

thanks Ttelmah
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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