background image

 

UPS25 31 

 RTD Embedded Technologies, Inc

 

  

Interrupt request lines 

 

To allow different peripheral devices to generate interrupts on the same computer, 
the PC AT bus has interrupt request channels (IRQs). A rising edge transition on 
one of these lines will be latched into the interrupt controller. The interrupt 
controller checks to see if the interrupts are to be acknowledged from that IRQ 
and, if another interrupt is being processed, it decides if the new request should 
supercede the one in progress or if it has to wait until the one in progress has 
been completed. The priority level of the interrupt is determined by the number of 
the IRQ as follows; IRQ0 has the highest priority whilst IRQ15 has the lowest. 
Many of the IRQs are used by the standard system resources, IRQ0 is dedicated 
to the internal timer, and IRQ1 is dedicated to the keyboard input, IRQ3 for the 
serial port COM2, and IRQ4 for the serial port COM1. Often interrupts 2,5 and 7 
are free for the user. 

 

  

8259 Programmable Interrupt Controller  

 

The chip responsible for handling interrupt requests in a PC is the 8259 Interrupt 
Controller. To use interrupts you will need to know how to read and set the 8259's 
internal interrupt mask register (IMR) and how to send the end-of-interrupt (EOI) 
command to acknowledge the 8259 interrupt controller. 

 

  

Interrupt Mask Register (IMR) 

 

Each bit in the interrupt mask register (IMR) contains the mask status of the 
interrupt line.  If a bit is set (equal to 1), then the corresponding IRQ is masked, 
and it will not generate an interrupt. If a bit is cleared (equal to 0), then the 
corresponding IRQ is not masked, and it can then generate an interrupt. The 
interrupt mask register is programmed through port 21h

 

  

End-of-Interrupt (EOI) Command 

 
After an interrupt service routine is complete, the 8259 Interrupt Controller must be 
acknowledged by writing the value 20h to port 20h. 

 

  

 

Содержание UPS25

Страница 1: ...UPS25 Uninterruptible power supply and Ni Mh Ni Cd charger unit User s Manual BDM 610020008 Rev C I IS SO O9 90 00 01 1 a an nd d A AS S9 91 10 00 0 C Ce er rt ti if fi ie ed d...

Страница 2: ...c UPS25 Uninterruptible Power Supply User s Manual RTD Embedded Technologies INC 103 Innovation Blvd State College PA 16803 0906 Phone 1 814 234 8087 FAX 1 814 234 5218 E mail sales rtd com techsuppor...

Страница 3: ...t 1999 2002 2003 2004 2005 by RTD Embedded Technologies Inc All rights reserved Printed in U S A The RTD Logo is a registered trademark of RTD Embedded Technologies cpuModule and utilityModule are tra...

Страница 4: ...ck 16 External power connections 18 CHAPTER 4 HARDWARE DESCRIPTION 20 Current Limit 21 Charger power converter 21 Ni Mh Ni CD Battery Pack and Thermistor 22 Ni Mh Ni Cd battery charger 23 Discharging...

Страница 5: ...hould be like 34 Saving the Startup Interrupt Mask Register IMR and interrupt vector 34 Common Interrupt mistakes 35 Example on Interrupt vector table setup in C code 36 CHAPTER 6 UPS25 SPECIFICATIONS...

Страница 6: ...onnector Fig 3 1 UPS25 integrated in a RTD PC 104 cpuModule stack together with a HPWR104 power supply module Fig 3 2 UPS25 power supply connections Fig 4 1 Block diagram of the UPS25 Fig 4 2 Discharg...

Страница 7: ...e 24 Watt 30 min backup time Discharge 10 to 65 C battery temperature Charge 0 to 40 C 8 Ni Cd battery cells 25 Watt 20 min backup time 1000 mAh 9 6V nominal battery voltage 24 Watt 20 min backup time...

Страница 8: ...wing conditions are met 1 main power is below 10V 2 battery temperature is out of limits 3 battery is already charged 4 battery error exists Host interface and control The UPS25 can be controlled and...

Страница 9: ...the following items UPS25 board with mating connectors for the supported power connections User s manual Note Software and drivers can be downloaded from our website If any item is missing or damaged...

Страница 10: ...the most demanding applications When you need help This manual and all the example programs will provide you with enough information to fully utilize all the features on this board If you have any pr...

Страница 11: ...hich can be changed to suit your application and host computer configuration The factory settings are listed and shown in the diagram at the beginning of this chapter Make sure you completely study an...

Страница 12: ...ry jumper settings to suit your specific application Table 2 1 Factory configured jumper settings Please see figure 2 1 below for more detailed locations JUMPER NAME DESCRIPTION NUMBER OF JUMPERS FACT...

Страница 13: ...ay occur and the data read from the board may be corrupted To avoid this problem make sure you set up the base address by using the three jumpers marked J14 this allows you to choose from a number of...

Страница 14: ...TINGS UPS25 Base address Hex Jumper settings A8 A7 A6 200 0 0 0 240 0 0 1 280 0 1 0 2C0 0 1 1 300 1 0 0 340 1 0 1 380 1 1 0 3C0 1 1 1 0 JUMPER OFF 1 JUMPER CLOSED Table 2 2 Base address jumper setting...

Страница 15: ...of the PC 104 special features After extensive software and hardware tests we have found that error free interrupt performance cannot be guaranteed when sharing interrupts Charger control Factory sett...

Страница 16: ...or even cause permanent damage General installation guidelines Touch the grounded metal housing of your computer to discharge any antistatic buildup and then remove the board from its antistatic bag H...

Страница 17: ...c Fig 3 1 UPS25 integrated in a RTD PC 104 cpuModule stack together with a HPWR104 power supply module Note For full output power performance install your UPS25 toward the top of your PC 104 system ma...

Страница 18: ...UPS25 18 RTD Embedded Technologies Inc External power connections The illustration 3 2 below shows the input and output power connections of the UPS25 board Fig 3 2 UPS25 power supply connections...

Страница 19: ...short as possible to reduce voltage drops and interference Batt Connect your external 8 AA size 1500mAh Ni MH or 1000mAh Ni Cd battery pack here Batt is connected to the system ground NTC Direct conne...

Страница 20: ...r describes the major hardware building blocks of the UPS25 which are The main 25W 5V step down converter Charger power converter Ni MH Ni Cd battery charger Power switching circuitry Voltage monitors...

Страница 21: ...ion After reaching the current limit point between 5 5 and 8 5Amps the voltage output will range between the rated output and zero depending on the amount of overload At this point the output current...

Страница 22: ...circuitry If no thermistor is detected the charger will not charge the battery Not just any kind of thermistor can be used since many component values are trimmed to meet the characteristics of the t...

Страница 23: ...charge 1 8 sec 1 3 8 sec Discharging 1 3 8 sec 1 8 sec Fast charging Continuous Charge complete 1 8 sec 1 8 sec Top off charge 1 8 sec 1 8 sec Table 4 1 Charger status LED functional description Pend...

Страница 24: ...ntain good battery performance and reduce memory effect of the Ni Cd battery pack Discharging may be required if the back up is used very infrequently and for a very short period of time Charger mode...

Страница 25: ...switching using logic and power MOSFET transistors These transistors are controlled based on the voltages detected by the onboard voltage monitor The following power switches are included in the desig...

Страница 26: ...host indicating low or failing power This bit can also be interrogated from the charger status register bit 0 The other voltage monitor follows the battery voltage BATT and is indicated by bit 1 of th...

Страница 27: ...he main power VIN drops below the set trip point factory set to 10V This interrupt can be disabled or enabled by the IRQ enable bit 0 of the control register In case the interrupt is disabled you can...

Страница 28: ...described in the next sections in detail Register Description Address in HEX UPS25 Control register BA 0 UPS25 Status register BA 1 BA Base Address BA 0 Control register Read and Write The UPS25 cont...

Страница 29: ...ar the host interrupt register Must be performed for a new interrupt to be possible to take place Programming the UPS25 This section gives you some general information about programming the UPS25 boar...

Страница 30: ...f the port with the value B where B sum of the individual bits to be set INTERRUPTS What is an interrupt An interrupt is an event that causes the processor in your computer to temporarily halt its cur...

Страница 31: ...to the keyboard input IRQ3 for the serial port COM2 and IRQ4 for the serial port COM1 Often interrupts 2 5 and 7 are free for the user 8259 Programmable Interrupt Controller The chip responsible for h...

Страница 32: ...owest 1024 bytes of memory These memory locations are referred to as the interrupt vector table and each entry to this table is called an interrupt vector Once the new CS and IP are loaded from the in...

Страница 33: ...ed the ISR and executed it successfully For example set a flag in your ISR and in your main program check for the flag Note If you choose to write your ISR in in line Assembly you must push and pop re...

Страница 34: ...g Returns Nothing void interrupt far new_IRQ_handler void IRQ_flag 1 Indicate to main process interrupt has occurred Your program code to shut down should be here outp BASE 0x01 0x00 Clear interrupt o...

Страница 35: ...interrupt vector to point to your ISR Again you can overwrite the appropriate entry in the vector table with a direct memory write but this is not recommended Instead use the DOS function 25h Set Inte...

Страница 36: ...q_handlers Inputs Nothing Returns Nothing Purpose Set the pointers in the interrupt table to point to our funtions ie setup for ISRs void init_irq_handlers void _disable old_IRQ1_handler _dos_getvect...

Страница 37: ...MH part UPS25 1 Ni Cd part UPS25 2 Required cell count 8 Nominal battery pack voltage 9 6V Battery capacity 1500mAh Ni MH 1000mAh Ni Cd Charge voltage 10 5 to 12 5V Charge current 1 25A maximum Charg...

Страница 38: ...tion of the board s behavior List the name of a contact person familiar with the technical details of the problem or situation along with their phone and fax numbers address and e mail address if avai...

Страница 39: ...UPS25 39 RTD Embedded Technologies Inc...

Страница 40: ...e control of RTD Embedded Technologies OR AS A RESULT OF SERVICE OR MODIFICATION BY ANYONE OTHER THAN RTD Embedded Technologies EXCEPT AS EXPRESSLY SET FORTH ABOVE NO OTHER WARRANTIES ARE EXPRESSED OR...

Страница 41: ...UPS25 41 RTD Embedded Technologies Inc RTD Embedded Technologies Inc 103 Innovation Blvd State College PA 16803 0906 USA Our website www rtd com...

Отзывы: