Weirdness with 16F1705's eeprom and DAC


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,689


    Did you find this post helpful? Yes | No

    Default Re: Weirdness with 16F1705's eeprom and DAC

    found it

    config use _ZCDDIS_ON


    Code:
    #CONFIG ; 16F1705    __config _CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_ON & _MCLRE_ON & _CP_OFF & _BOREN_ON & _CLKOUTEN_OFF
        __config _CONFIG2, _WRT_OFF & _PPS1WAY_OFF & _ZCDDIS_ON & _PLLEN_OFF & _STVREN_ON & _BORV_LO & _LPBOR_OFF & _LVP_OFF	   
    #ENDCONFIG
    
    
    counts   var byte                    ' Loop counter. 
    
    
    
    
    
    
        DEFINE  OSC 4               ' Adjust to suit design.
        OSCCON  = $68         ' Internal 4MHz osc.
       
        ANSELA = 0
        ANSELC = 0       
         
    
    
    
    
        DAC1CON0 = %10110000        ' Vref from vdd, DAC1out2 (RA2).  DAC1out1 (RA0). 
    
    
       
      
    
    
        
    
    
    
    
    First:  
        for counts= 0 to 250
        DAC1CON1 = counts
        pause 5           
       next
        goto first              
    
    
        end
    Last edited by richard; - 5th August 2020 at 06:09.
    Warning I'm not a teacher

  2. #2
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: Weirdness with 16F1705's eeprom and DAC

    Woohoo! I just confirmed it with my 'scope.

    You are the man Richard. Put a star up against your name mate!

    Thanks again for your help, appreciated.

    Kind regards,
    Bill

Similar Threads

  1. Select Case Weirdness
    By rocket_troy in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th June 2014, 01:33
  2. Ti Dac 7553
    By GeoJoe in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th August 2008, 21:29
  3. Looking for a DAC
    By RussMartin in forum Off Topic
    Replies: 4
    Last Post: - 25th November 2007, 07:21
  4. Using DAC's with pics
    By J_norrie in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th March 2007, 15:00
  5. dac
    By kaisersystems in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 10th June 2005, 21:23

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts