Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6810773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:14:46+00:00 2026-05-26T20:14:46+00:00

I want to use I2C C library for ‘byte paradigm’ I2C express device. This

  • 0

I want to use I2C C library for ‘byte paradigm’ I2C express device. This was sample API present in byte paradigm website.

//
// Executing I2C write transfer    
//
pDataWr[0] = 0x12;
pDataWr[1] = 0x34;
printf("\nWriting 0x%02X to address 0x%02x...\n", pDataWr[1], pDataWr[0]);
i2c_CmdBufAppend(2, 0x50, 1, 2, (char *)pDataWr, true, true); // Cmd = 2       : I2C write
                                                             // Address = 0x50
                                                             // AddrType = 1  : 7-bit address
                                                             // Length = 2    : 2 byte payload
                                                             // pDataWr       : buffer with 2 bytes payload (0x1234)
                                                             // STA = true    : generate start
                                                             // STO = true    : generate stop

i2c_RunMaster();
i2c_CmdBufDeleteAll();

What does this mean? What and Where its writing? How it differs from the API given below?

//
// Executing dummy write to set EEPROM address
//
printf("\nExecuting dummy write to set EEPROM address...\n");
pDataWr[0] = 0x12;
i2c_CmdBufAppend(2, 0x50, 1, 1, (char *)pDataWr, true, true); // Cmd = 2       : I2C write
                                                             // Address = 0x50
                                                             // AddrType = 1  : 7-bit address
                                                             // Length = 1    : 1 byte payload
                                                             // pDataWr       : buffer with 1 byte payload (0x12)
                                                             // STA = true    : generate start
                                                             // STO = true    : generate stop
i2c_RunMaster();
i2c_CmdBufDeleteAll();

I have gone through the byte paradigm library documentation, but information is very limited there. Kindly help, thanks in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:14:47+00:00Added an answer on May 26, 2026 at 8:14 pm

    A quick google search for I2C specification resulted in this:
    http://i2c2p.twibright.com/spec/i2c.pdf

    It’s been a long time since I’ve played with i2c devices (I had to write my own driver for a specialized chip-set).

    The chip that is executing the code is the I2C master.

    i2c_CmdBufAppend(2, 0x50, 1, 2, (char *)pDataWr, true, true); // Cmd = 2       : I2C write
                                                             // Address = 0x50
                                                             // AddrType = 1  : 7-bit address
                                                             // Length = 2    : 2 byte payload
                                                             // pDataWr       : buffer with 2 bytes payload (0x1234)
                                                             // STA = true    : generate start
                                                             // STO = true    : generate stop
    

    I don’t know anything about the library you are using but the comments fully explain that you are addressing the device at address 0x50 (using 7 bit addressing) and are writing 2 bytes of data, and also generating a Start and Stop condition.

    You need to refer to the I2C specification and EEPROM that you are interacting with.

    It’s really not difficult once you understand the specification. Which by the way has full of examples of reading / writing data to I2C devices.

    Some devices are set up that you have to write a special value to them (such as a register or command value) and then read back data. This is setup by transmitting a write command and then a read command without a STOP between commands.

    The device you are interacting with should have the details on special commands and such.
    The library I2C library WON’T have these details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want use some data from a website with web service. i have a
i want to use title on text. is this possible to make title on
I have class in server side and I want use method of this class
i want use XmlSampleGenerator API in my project. i don't know how to add
I want use A-Z buttons on a html page like shown below (only sample
I'm want use $ macro in groovy GString. When i'm wrote this code ['cdata','tdata'].each
I want use php simple xml parse some tree like this. how to plus
I want use groovy findAll with my param to filtering closure filterClosure = {
I have a transaction log file in CSV format that I want use to
Below is my stored procedure. I want use stored procedure select all row of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.