Thread: Access register with I2C on bq27421 battery gauge

  1. #1
    Registered User
    Join Date
    Feb 2019
    Posts
    97

    Access register with I2C on bq27421 battery gauge

    Hi everyone,

    I am not sure if this is the right place to ask..
    I write a library in order to communicate with the bq27421 battery gauge.

    I am able to read some registers (the registers of this IC are 2-bytes) at the moment but there is a group of registers that I cannot access.. This group of registers is under the Control 0x00 and 0x01 register (see page 16 section 4.1) and the datasheet sais that:

    "Issuing a Control() command requires a subsequent 2-byte subcommand. These additional bytes specifythe particular control function desired"

    I cannot understand how to access the registers of table 4.2.
    I am using the I2C driver provided by the Nordic and it works fine.

    Any advice?

  2. #2
    Registered User Sir Galahad's Avatar
    Join Date
    Nov 2016
    Location
    The Round Table
    Posts
    277
    Post the code you're having trouble with. And maybe try this forum as well.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 07-25-2015, 01:11 AM
  2. Device Register Access
    By jacob12 in forum C Programming
    Replies: 35
    Last Post: 10-14-2008, 10:51 AM
  3. How does a battery die
    By BobMcGee123 in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 11-30-2007, 08:55 PM
  4. moving byte pointed to by contents of a register into another register. dos debug.
    By Brian in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 04-18-2003, 05:48 PM
  5. Do i need a new battery ?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 04-06-2002, 04:20 AM

Tags for this Thread