i2c with a dac


Closed Thread
Results 1 to 12 of 12

Thread: i2c with a dac

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Bongo,

    great start on this forum!

    here is your welcome gift
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #3
    scholar's Avatar
    scholar Guest


    Did you find this post helpful? Yes | No

    Default

    @ device hs_osc
    define osc 4

    Ctrl con %10010000

    CPIN var portb.1
    DPIN var portb.0

    trisa=0
    porta=255
    pause 1000
    porta=0
    pause 1000' Pause 50ms for MC23016 to start-up



    main:
    i2cwrite DPIN, CPIN, Ctrl,%00000000,%10000000,%00000000 '512*Vref/1024
    pause 2000
    i2cwrite DPIN, CPIN, Ctrl,%00000000,%00000000,%00000000
    pause 2000
    goto main





    with this code i able to generate analog voltage at the output. But funny thing is i only able to generate the first value (512*Vref/1024) but no respond after 2s. It suppose to change to 0V after 2s.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. Another I2C Slave Routine Problem
    By DanPBP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 05:50
  4. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 13:55

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