Tri-M Systems HE104 technical manual Sample Battery Charging Program Listing

Page 28

23 June 2005

HE104MAN-V8 Manual

7. Sample Battery Charging Program Listing

The following program listing is intended for use as a guide to customizing the BC104 and PM104 operation. Additional functions and features can be added including temperature monitoring are left up to the OEM to implement.

BC104, Battery Charger Sample program code

SYMBOL Pwr_Status = 0 SYMBOL Pwrp_Status =pin0 SYMBOL PSU_On/Off = 1 SYMBOL PSUp_OnOff = pin1 SYMBOL CS1 = 2 SYMBOL CS1p = pin2 SYMBOL Int2 = 3 SYMBOL Int2p = pin3

SYMBOL DIO = 4 SYMBOL DIOp = pin4

SYMBOL CLK = 5 SYMBOL CLKp = pin5 SYMBOL Int1 = 6 SYMBOL Intp = pin6 SYMBOL Chrg_Limit = 7 SYMBOL Chrgp_Limit = pin7

SYMBOL Bat_Set = bit1 SYMBOL Adbits = b1 SYMBOL Bat1_Chrg = bit1 SYMBOL D0 = bit2 SYMBOL D1 = bit3

Status of input power

Pin number of status of input power ‘OnOff control of power supply

Chip select A/D on Battery Charger; 0=active

PC/104 bus interrupt

Pin_number_of data input/output.

Variable_name_of date input/output.

Clock to ADC; out on rising, in on falling edge.

PC/104 bus interrupt

PWM output for current limit

Counter variable for serial bit reception.

LSB of ADC channel selection

second bit of ADC channel selection

Tri-M Engineering

Tel:

800.665.5600, 604.945.9565

27

1407 Kebet Way, Unit 100

Fax:

604.945.9566

 

Port Coquitlam, BC V3C 6L3

E-mail:

info@tri-m.com

 

Canada

Web site:

www.tri-m.com

 

Image 28 Contents
HE104 TRI-MTechnical Manual PC/104 Vehicle Power Supply TRI-M EngineeringHE104MAN-V8 Manual Preface Introduction General DescriptionFeatures HE104 Dimensions 1000mil=1inSpecifications Model HE104Configuration and Installation IntroductionPower Considerations HE104 ConnectorsOutput Power Connector Bus Termination Optional Installation Onto PC104 ModulesJumper Selection 2 +5VDC Low Q/ Noise Q=quiescent Connector CN5 Pinout Connector CN6 Pinout PC/104 Bus Interrupts OptionalPower Management Controller PM104 optional Interrupt IRQ SelectionLow Input Alarm PM104 Pin Number and I/O Functions10 HE104 Efficiency and Heat Dissipation Calculation Switching Regulator, +5VDC Input power protectionTheory of Operation Switching regulator, +12VDC Charge PumpsFilter Capacitors Vp -p L1 ∙ frequencyExample RC1 RC2 RC3 RC4 RC5Appendix 1 HE104, +5V Regulator Block Diagram HE104MAN-V8 Manual Appendix 2 Advantages of Using AC Termination Appendix 3 Installation Hints for the HE104 Power Supply Appendix DescriptionConnections Programming Cable Sample Battery Charging Program Listing ‘Get battery charging voltage BattChrgTerm‘Return to program InitNoPower ‘debug nopwr pause BattTrickle ‘debug trickle gosub ChkPwr let D1 =ChkPwr BattChrgDistributed By