max517 don't work


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    72

    Default max517 don't work

    i have a dac max517 in my application which won't run :

    Code:
    schematic:
    
                |--V--|
    v-meter ----|     |---- Vdd (Ref0)     
    gnd     ----|     |---- Vdd
    scl     ----|     |---- gnd (AD0)
    sda     ----|     |---- gnd (AD1)
                |-----| 
    
    code:
    
    slad con %01011000 ' slave address 00
    comb con %00000000 ' command byte
    
    volt var byte ' output voltage
    
    init : clear
    
    high sda
    high scl
    
    volt = 255
    
    SHIFTOUT sda, scl, 5, [slad, %0\1, comb,  %0\1, volt,  %0\1]
    as result : the v-meter output stays ever 0V. can't see what i make wrong. thanks for any help

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    try I2CWRITE instead.. it's still an I2C device
    Code:
    SDA            var PORTB.0 
    SCL            var PORTB.1
    
    Loop           var Byte
    
    DACAddressByte CON %01011000 ' DAC Address byte
    DACCommandByte con 0         ' DAC command byte
    
    start: 
        '
        '     this loop will generate simple ramp-up and down
        '     on the DAC output
        ' 
        For Loop = 0 To 255
            i2cwrite sda,scl,DACAddressByte,DACCommandByte,[Loop]
            pause 10       
            Next
    
    
    
        For Loop = 255 To 0 Step -1
            i2cwrite sda,scl,DACAddressByte,DACCommandByte,[Loop]
            pause 10       
            Next
    
        GoTo start
    Last edited by mister_e; - 24th September 2005 at 01:09.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jan 2005
    Posts
    72


    Did you find this post helpful? Yes | No

    Default thanks a lot

    so it works fine, i just include some pull-ups

    was me really a help, thanks again

Similar Threads

  1. PortA Doesn't Work
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 11
    Last Post: - 8th September 2015, 18:41
  2. pls help me verify my code not work, why???
    By chai98a in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th January 2010, 09:19
  3. How to set ICD-2 clone to work with PBP?
    By G-R-C in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th October 2006, 02:50
  4. with 40 MHZ osc serin2 not work
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th August 2006, 22:56
  5. Pin RA4 doesn't work
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 15th July 2004, 12:03

Members who have read this thread : 1

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