I have this project that my boss asked me to do and the first step is to figure out how to set a given I2C register to high or low using the silicon lab library, if anyone knows any good sources for this type of problem please provide them thank you. The pic that I am using is the pic16f1823, I've already looked at the documentation of the pic but into only states how to read and write to an I2c.
1
There are 1 best solutions below
Related Questions in PIC
- Modifying a Microchip COFF file
- PIC LCD Code not running on Proteus 8
- S Curve motion profile (motor speed v/s time)
- PIC18F25K80 and SD card integration
- ADC value in pic 16f1827
- Serial received data not recognised
- Wake-up PIC with USART RX
- C - Hertz to Seconds and how to get the proper time for a delay?
- 16PIC877A Reset with C code
- Writing Scheduler/RTOS in XC8
- Receiving “undefined symbols” error with XC8 concerning plib I2C functions on PIC18
- dsPIC33EV256GM102 GPIO - Mysterious High-Low Pulse
- Any PIC18F microcontroller with both CANTX, CANRX and USB D+/D-
- difference between MLA's USB CDC basic demo and CDC Device serial Emulator
- PIC18F timer for minutes and hours
Related Questions in I2C
- Using camera shutter to trigger MPU6050 on raspberry pi
- Xilinx AXI-IIC Slave Protocol description
- Python bus = smbus.SMBus(1) equivalent in C++?
- Erroneous i2c response from LSM303D to Netduino Plus
- Linux I2C-Dev IOCTL-Call produces wrong message
- Embedded software program block, I2C?
- I2C & SPI driver
- Listening to i2c input changes with python
- Getting the info from MCP23017 with Python
- Python - HowTo unittest i2c device wrapper class
- Linux - Is it necessary to register (instantiate) i2c devices before using them?
- Issue on using both I2C and Serial simultaniously in raspberry pi 2
- what is better using while loop or if statement when checking status codes of atmega 32?
- Register address not sent using I2C in TM4C123GH6PM board
- I2C communication in raspberry pi using python
Related Questions in SILICON
- How to detect Apple Silicon Macs in Cordova App?
- Build static lib for Apple Silicon mac simulator
- Xcode 12 Apple M1 arm64 - Designable error: "wrong architecture"
- BLE 5 peripheral devices are not getting scanned on BLE 5 supported Android phones and iPhones
- i2c on silicon image c8051f32x (using USBXpress)
- Not working java on Mac m2 MacBook Air (any jar sent error)
- mac m1 12.4 with brew arm and x86 versions installed, how do I uninstall the x86 brew
- setting an i2c register to high
- Problem with iOS devices and BLE stack version 02.12
- when I install gitlab-ce through docker on m1 mac mini, it stucks on gitlab::database::migrations
- Apple silicon Macs support issue because of SKOverlay.AppConfiguration
- How to get out of the infinite loop?
- libvirt on Apple Silicon with qemu-system-aarch64
- efm32 - efm32gg380f1024 - rtc features
- Android Studio Bumblebee 2021.1.1 Canary 4 Emulator not working on m1
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I use this as a header file and seems to work well for PIC16F1827 which is basically the same as the 1823. It used the peripheral of the PIC. Just include in in any c file you want to use i2c in. Make sure you #define FOSC in order to calculate the correct baud rate. Also double check the port and tris assignments are correct for your device and make adjustments.
It uses polling instead of an interrupt. Uncomment the interrupt setup code and write an interrupt service routine to catch the interrupts.
Then you can use the higher level functions defined above to control a device, which is described in the datasheet of the slave device.
For example, to read from an eeprom: