Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

Problems whilst using MPLAB's MCC to configure and use I2C and ADC

$
0
0
I am trying to communicate to BQ24259 through I2C using PIC16LF1554. The 7th register of the device has a bit which can be used to turn off the battery. I used Mplab's MCC to configure the I2C settings. Using the example code in header files i wrote a similar function.

here is the relevant snippet of the code

Code (Text):
  1. #define RETRY_MAX       100
  2.     #define ON              0x4B   //register 7 toggle 5th bit to turn ON/OFF
  3.     #define OFF             0x6B
  4.     I2C_MESSAGE_STATUS status;...
Problems whilst using MPLAB's MCC to configure and use I2C and ADC

Viewing all articles
Browse latest Browse all 4923

Trending Articles