PIC18F4525 to DAC (PCF8591P) I2CWrite too fast?


Results 1 to 5 of 5

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Do you have any Pull-up resistors on SDA & SCL ~4.7K?

    What are your configuration fuses settings?

    In your code.. what you call 'DACAddressByte' have to be %10010000 instead, and DACControlByte can't be a constant. must be a Byte variable.

    Finnally, it's possible that you have a SCL frequency a bit higher than 100kHZ... but 1MHz it's impossible... unless i really missed something one thing is sure, depending of the signal you measure, if it's noise.. frequency measure could be anything that's for sure.

    Anyways. Your current device support MAX 100KHz. But @20Mhz, I2CWRITE will produce a higher frequency, you need to add the following line to your code
    Code:
    DEFINE I2C_SLOW 1
    Read I2CWRITE section in your manual for more details.
    Last edited by mister_e; - 4th April 2008 at 06:16.
    Steve

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

Similar Threads

  1. I2CRead & I2CWrite not working as expected
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 30
    Last Post: - 27th October 2021, 18:36
  2. PIC 18F4550 and MCP23017
    By DaveC3 in forum Code Examples
    Replies: 12
    Last Post: - 4th December 2010, 14:01
  3. Wanted: Sound chip interfaced with pic
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 8th September 2008, 13:38
  4. My I2CWRITE - timings and tricks
    By FinchPJ in forum Code Examples
    Replies: 5
    Last Post: - 3rd March 2008, 21:40

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