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.