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

DAC Programming PIC
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 26, 2016 6:54 pm     Reply with quote

Just to close out this thread, I tested a 16F1708 (same family as 16F1709)
with compiler vs. 5.060 and it worked fine. Here is the test program:
Code:

#include <16F1708.h>
#fuses INTRC_IO, NOWDT
#use delay(clock=4M)

//==================================
void main(void)
{
int8 value;

setup_dac(DAC_VSS_VDD | DAC_OUTPUT2);  // Output on Pin A2

value = 0;

while(TRUE)
  {
   dac_write(value);
   value++;
   delay_us(10);
  }
}


Here is a scope photo. It shows a full-scale ramp. It's working.

cavoti



Joined: 29 Jul 2016
Posts: 11

View user's profile Send private message

PostPosted: Sun Aug 28, 2016 11:11 pm     Reply with quote

Thank You very much, I will try your code and if it doesnt work, the problem must be my circuit around the PIC Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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