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.

battery charging status detection with LTC4050 for cc2540.

Other Parts Discussed in Thread: CC2540

hello..everyone

i am new to BLE and cc2540. i am making cc2540 based device.

i want to check battery charging status e.g battery charging ,not charging,battery nearly full ,battery full and battery is defective. with the help of LTC4050.

 CHRG pin from LTC4050 is connected at P2_2 of cc2540 and i use additional P1_5 port for detecting charging status at port P2_2.

i don't know how to make port P1_5 to high impedance in programming. also i want to send charging status detail via BLE.

i found example for battery voltage measuring but i can't found any programming example related charging status detection anywhere. also i have to measure battery voltage while charging.

your quick reply will be highly appreciated. and thank you in advance...

  • Hi Hirenkumar,

    The details on how to configure the GPIOs correctly can be found in the CC253x/4x User Guide (on the product pages). This document will also explain how to use the ADC which you can use to measure the battery voltage.

    For the SW part, I recommend you read through the SW developers guide, and then start working with our example code. The KeyFob SW can be a good start since it already has support for buttons which will be sort of similar to configure the IOs as inputs from the LTC4050.

    Cheers,
    Fredrik
  • hello..
    thanks Fredrik K for your reply
    i read cc253x/4x user guide. it just describe me properties of features e.g ADC,P0INP etc...
    can anyone please reply me how to do this things in programming. like flowchart or steps for this..

    i just want help to select value of ADCCON3

    i use reference voltage is AVDD and voltage to be measured is at AIN7...
    thanks..

  • This is the document you are looking at, right? www.ti.com/.../swru191
    How to set up ADCCON3 is explained in the ADC chapter.

    You can also take a look at the peripheral SW examples found here: www.ti.com/.../swrc257
  • thanks  Fredrik K..

    now i am able set value of ADCCON3 and some related parameter related to ADC.

    but i read www.ti.com/.../swru191  and www.ti.com/.../swrc257 guide. anywhere i can't found more information for setting pin P1_5

    to high impedance even in swru191 guide i found only to set pin to 3-state. i don't know how to do this in programming.

    if any programming example for this .it will be more helpful for me.

    thanks. 

  • If you want to have aP1_5 as an input without pull-up or -down, you must configure it as 3-state. This requires that the signal is always set to a defined voltage level externally.
  • hello ...
    thankx Fredrik K for your reply..
    i want to have P1_5 as an output with 3-state(high,low and high impedance).
    in my device i am using port P1_5 to set P2_2.
    i am using this two pin for battery charging status detection..
    any steps for this will be more helpfull. i can't put schematics publically.if i contact you privately???