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.

MSP430F2252: PMP8740 - Embedded Software.

Part Number: MSP430F2252
Other Parts Discussed in Thread: PMP8740

Dear Roberto,

         Good Morning. How are you? Questions regarding PMP8740 - Battery Charger(34V, 60A) --> Software Code related.

Q1) Regarding Minimum Current Trickle Parameter - Settable range 2 to 20. state status_charger - from 5 to 6.

When I set Minimum Current Trickle to minimum 2 --> counter from 0 to 10 reach in 100 ms. After check Voltage Output <10 or not? If yes, Current PWM out

as per counter_status = 10 --> TACCR1 = 15467 --> ON Time More. If not, counter_status from 10 to 300(counter_max) reach in 2900ms, means DC/DC regulating the programmed current, correct?

When I set Minimum Current Trickle to Maximum 20 --> counter from 0 to 100 reach in 1000 ms. After check Voltage Output<10 or not? If not then Current PWM out

as per couter_status = 100 --> TACCR1 = 10667 --> ON Time Less. If not, counter_status from 100 to 300(counter_max) reach in 2000ms, means DC/DC regulating the programmed current, correct?

Actually what is use of Minimum Current Trickle Parameter(from state 5 to 6)? Please explain if you remember this loop? If not, tell me use of Min. current trickle in general battery charger..

Q2) Regarding pushbuttons logic - Can you explain following pushbuttons code logic? 

i = key_state ^ SWITCH_PIN; // key changed?

i = i & BIT_MASK; // throw away other bits
key_state = key_state & BIT_MASK; // throw away other bits

ct0 = ~( ct0 & i ); // reset or count ct0
ct0 = ct0 & BIT_MASK; // throw away other bits
ct1 = ct0 ^ (ct1 & i); // reset or count ct1
ct1 = ct1 & BIT_MASK; // throw away other bits
i &= ct0 & ct1; // count until roll over ?
key_state ^= i; // then toggle debounced state
key_press |= key_state & i; // 1->0: key press detect

if( (key_state != BIT_MASK) && !(rpt_active)) // check repeat function
{
rpt_state = ~key_state; // save key status
rpt_state = rpt_state & BIT_MASK; // throw away other bits
rpt = REPEAT_START; // start delay
rpt_active = 1;
}

if(rpt_active) rpt--;

if( (rpt == 0) && rpt_active)
{
key_rpt = rpt_state & (~key_state); // check if the key is still pressed
key_rpt = key_rpt & BIT_MASK; // throw away other bits
rpt_active = 0; // reset flag
}

 Q3) Regarding CAN comummunication - in Micro-controller not inbuilt CAN therefore use UART & convert to CAN (using external hardware - CAN IC).

In software code use this UART protocol for testing purpose, not standard CAN protocol, am I correct?

can I use CAN J1939 Protocol insert this protocol? or different timing for CAN protocol...Please help.

Thanks & Regards,

Vijay Shinde  

 

  • Dear Vijay,
    I am fine, thanks. I hope you are doing well too.
    Regarding the question # 1:
    The minimum trickle charging current is a parameter. That means, the converter should read the output current, that charges a battery.
    As the charging current has reached this trickle charging (minimum) value, then it is possible to adjust Vout to the trickle charging voltage or keep it constant, according to battery chemistry. This charging profile is not implemented in the charger, but only the input of currents and voltage levels (including trickle charging levels). The charging profile is typically developed by the end customer, therefore he owns the IP.
    Question #2:
    This is complicated to explain, but this section has been taken from a similar design, published on TI.com website, see software under:
    www.ti.com/.../getliterature.tsp
    Question #3:
    You are right: the microcontroller doesn't have standard CAN protocol, so I used UART protocol and implemented a custom one + employing an external hardware CAN IC. You can modify it and use any kind of software/hardware CAN protocol, as you wish.
    Best regards,
    Roberto
  • Dear Roberto,

    Thanks for information. Please send me if any logic found regarding Battery Charging Profile used in Battery Charger (Li-ion Load).

    I will ask you if any questions. Thanks.

    Thanks & Regards,

    Vijay Shinde.

  • Dear Vijay,

    There are several sources explaining how to charge a Li-Ion battery.

    Typically this is done with a constant voltage, current limited power supply (like the one I developed), which terminate the charging process as soon as the measured current falls below a certain threshold (usually 10% from charging current). Please have a look to the tutorial:

    training.ti.com/introduction-battery-management-part-3-li-ion-battery-charging charging tutorial&tisearch=Search-EN-Everything

    Best regards,

    Roberto Scibilia

**Attention** This is a public forum