More I2C question with PBP


Closed Thread
Results 1 to 4 of 4
  1. #1
    Qacer's Avatar
    Qacer Guest

    Question More I2C question with PBP

    Hello again kind folks,

    I am using a PIC12F675. My datapin is GP0. The clockpin is GP1. The I2C device that I want to use is characterized as a slave-transceiver. The datasheet states that its "IC address C0: 1100000." Looking through the PBP manual, it says I2CWRITE DataPin,ClockPin,Control, {Address,}, Value, Label.

    I am not quite sure what to put down in the Control option. I do not see any references to the Control option in the datasheet.

    Also, if I want to read data from the I2C device, do I need to set TRISIO and GPIO to inputs before invoking the I2CREAD routine?

    Another thing, the I2C datasheet does not state any pause between writing, so am I right to assume that I can just send multiple bytes in one I2CWRITE statement?

    Thanks again!

  2. #2
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by Qacer
    I am using a PIC12F675. My datapin is GP0. The clockpin is GP1. The I2C device that I want to use is characterized as a slave-transceiver. The datasheet states that its "IC address C0: 1100000." Looking through the PBP manual, it says I2CWRITE DataPin,ClockPin,Control, {Address,}, Value, Label.

    I am not quite sure what to put down in the Control option. I do not see any references to the Control option in the datasheet.
    Use the adress of the slave-device as control.

    Quote Originally Posted by Qacer
    Also, if I want to read data from the I2C device, do I need to set TRISIO and GPIO to inputs before invoking the I2CREAD routine?
    No.

    Quote Originally Posted by Qacer
    Another thing, the I2C datasheet does not state any pause between writing, so am I right to assume that I can just send multiple bytes in one I2CWRITE statement?
    Yes. It depends on your slave-device what does happen....
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  3. #3
    Join Date
    Jan 2005
    Location
    France
    Posts
    97


    Did you find this post helpful? Yes | No

    Thumbs up I2C ans PBP

    I had quite the same question
    I got nice answer from Super Melanie
    see
    http://www.picbasic.co.uk/forum/show...referrerid=745
    good luck
    francois

  4. #4
    Qacer's Avatar
    Qacer Guest


    Did you find this post helpful? Yes | No

    Talking

    Thanks, all! :-)

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 23:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 20:33
  4. i2c PBP questions
    By TimV in forum General
    Replies: 14
    Last Post: - 5th February 2007, 18:58
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 14:55

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