This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

implementing HDQ potocol with msp430-f2012 and BQ2060A

Other Parts Discussed in Thread: BQ2060A, MSP430F2012

currently i'm trying to implement the HDQ potocol with msp430-f2012 and trying to communicate with BQ2060A chip using the example program in 

http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa196

my objective of the program is to read the register value from the BQ2060A. but now my program is sending the address through HDQ but it's not reading the register value form the BQ2060A.

when i executed the program :-

 

unsigned int HDQRead(unsigned char Addr)

{

  TACTL = TASSEL_2 + MC_2;                      // SMCLK, continuous mode

  P1DIR |= 0x02;                                // P1.1 as in output

  HDQBreak();

  HDQBasicWrite(Addr);

  P1DIR &= ~0x02;                               // P1.1 as in input

  BitCnt = 8;                                   // 8 bits to transfer

  ISRMode = imRead;                             // Set ISR mode

  TACCTL0 = CM_2 + CCIS_0 + SCCI + CAP + CCIE;  // Capt. falling edge of P1.1

  TACCR1 = TAR + tTO;                           // Time-Out

  TACCTL1 = CCIE;                               // Enable Time-Out

  LPM0;                                         // Wait for ISR completion

 

  TACTL = 0;                                    // Stop Timer_A     (after this goes to TIMERA1_VECTOR)

 

  if (BitCnt)                                   // All bits received?

    return 0xffff;                              // Error condition (Time-Out)  (after TIMERA1_VECTOR comes to this line)

  else

    return Xfer;                                // OK

}

and returns the 0xFFFF

i shall be much thankful if any one could help me to solve this problem.

  • Hi Vigneswaran,

    Had you already solved the problem mentioned in your this post? 

    In case of the fact that you had already solved these reading issues on the registers of the BQ2060A itself by means of using the HDQ protocol and MSP430F2012 and you still have the realeted source codes, header files, etc. with you, could you please share them with the community?

    Thanks in advance for your very valuable feedback,

    Kind Regards,

    R.K. Arikan

  • .. problem's already been solved.. Kind Regards.. R.K.Arikan..

**Attention** This is a public forum