- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
09-10-2017 10:01 PM
After I followed the user guide's steps, I can't find any example code for how to programming.
I want to use this board as a I2C master, but the I2C pins on board are only for slave mode, how to define another pins as I2C master? Is there any example code for how to use I2C master mode?
I will use this board's I2C connect to an IC, and send data to IC's register.
Thank for your patience.
Solved! Go to Solution.
09-11-2017 12:53 AM
i2c slave could only work as slave, if you need i2c master, you need the SMBUS peripheral. you could see the SMBUS (I2C) master example in the Simplicity Studio folder.
09-11-2017 01:25 AM
I will only connect the development board to Semtech GN2106. It's laser driver IC, and this IC only have I2C port, so I don't think SMBus will work, I need to know how to define another pins on the development board as I2C master, will this method working?
09-11-2017 02:48 AM
You could see below sentence in the datasheet and reference manual for the SMBus peripheral in EFM8LB1 part
The SMBus is compliant with the System Management Bus Specification,
version 1.1, and compatible with the I2C serial bus.
09-11-2017 08:29 PM
I have learned that SMBus max frequency is 100KHz, but my IC need 400KHz I2C, and I saw reference manual for the SMBus peripheral in EFM8LB1 part, it tells me that its SMBus's frequency can be 400 KHz, is that true?
Now, I am trying to follow the steps from here: http://community.silabs.com/t5/8-bit-MCU/I2C-library-for-EFM8/td-p/186660 . I follow the steps posted by jaycarlson .
At last step, I can't find2c_0.h and i2c_0.c file in inc and src folders.Is there any possible error I can check? Is this walkthrough help me to build an example for my device?
Thank for your patience.
09-14-2017 02:58 AM
I think you are overthinking some of this. The silicon supports I2C and SMBus and 400kHz clocking, you just need to configure everything correctly for your application. I suspect that your slave peripheral will also run much slower than 400kHz, that's just its maximum clock rate. The PCB should not restrict you in your decision of who is master and who is slave, all you need are the two bus connections and proper pull up resistors.