| Electronic Components Datasheet Search |
|
HT68F20 Datasheet(PDF) 126 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT68F20 Datasheet(HTML) 126 Page - Holtek Semiconductor Inc |
|
126 / 210 page ![]() HT68F20/HT68F30/HT68F40/HT68F50/HT68F60 Rev. 1.00 126 November 3, 2009 Comparators Two independent analog comparators are contained within these devices. These functions offer flexibility via their register controlled features such as power-down, polarity select, hysteresis etc. In sharing their pins with normal I/O pins the comparators do not waste precious I/O pins if there functions are otherwise unused. Comparator Operation The device contains two comparator functions which are used to compare two analog voltages and provide an output based on their difference. Full control over the two internal comparators is provided via two control reg- isters, CP0C and CP1C, one assigned to each com- parator. The comparator output is recorded via a bit in their respective control register, but can also be trans- ferred out onto a shared I/O pin. Additional comparator functions include, output polarity, hysteresis functions and power down control. Any pull-high resistors connected to the shared com- parator input pins will be automatically disconnected when the comparator is enabled. As the comparator in- puts approach their switching level, some spurious out- put signals may be generated on the comparator output due to the slow rising or falling nature of the input sig- nals. This can be minimised by selecting the hysteresis function will apply a small amount of positive feedback to the comparator. Ideally the comparator should switch at the point where the positive and negative inputs sig- nals are at the same voltage level, however, unavoid- able input offsets introduce some uncertainties here. The hysteresis function, if enabled, also increases the switching offset value. Comparator Registers There are two registers for overall comparator opera- tion, one for each comparator. As corresponding bits in the two registers have identical functions, they following register table applies to both registers. C n + C n - C n P O L C n O U T C n X C n S E L Comparator Register Name Bit 76543210 CP0C C0SEL C0EN C0POL C0OUT C0OS ¾¾ C0HYEN CP1C C1SEL C1EN C1POL C1OUT C1OS ¾¾ C1HYEN Comparator Registers List Comparator Interrupt Each also possesses its own interrupt function. When any one of the changes state, its relevant interrupt flag will be set, and if the corresponding interrupt enable bit is set, then a jump to its relevant interrupt vector will be executed. Note that it is the changing state of the C0OUT or C1OUT bit and not the output pin which gen- erates an interrupt. If the microcontroller is in the SLEEP or IDLE Mode and the Comparator is enabled, then if the external input lines cause the Comparator output to change state, the resulting generated interrupt flag will also generate a wake-up. If it is required to disable a wake-up from occurring, then the interrupt flag should be first set high before entering the SLEEP or IDLE Mode. Programming Considerations If the comparator is enabled, it will remain active when the microcontroller enters the SLEEP or IDLE Mode, however as it will consume a certain amount of power, the user may wish to consider disabling it before the SLEEP or IDLE Mode is entered. As comparator pins are shared with normal I/O pins the I/O registers for these pins will be read as zero (port con- trol register is ²1²) or read as port data register value (port control register is ²0²) if the comparator function is enabled. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |