| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
HT46R005 Datasheet(PDF) 35 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT46R005 Datasheet(HTML) 35 Page - Holtek Semiconductor Inc |
|
35 / 62 page ![]() HT48R005/HT46R005 Rev. 1.00 35 November 29, 2011 If the CTRL0 register has selected the buzzer function, then for both buzzer outputs to operate, it is essential that the Port A control register PAC bit 0 and PAC bit 1 are setup as outputs. If only one pin is setup as an out- put, the other pin can still be used as a normal data input pin. However, if both pins are setup as inputs then the buzzer will not function. The buzzer outputs will only be activated if bit PA0 is set to ²1². This output data bit is used as the on/off control bit for the buzzer outputs. Note that the BZ and BZ outputs will both be low if the PA0 output data bit is cleared to ²0². The condition of data bit PA1 has no effect on the overall control of the BZ and BZ pins. Using this method of frequency generation, and if a crystal oscillator is used for the system clock, very pre- cise values of frequency can be generated. I/O Interfacing The Timer/Event Counter, when configured to run in the event counter or pulse width measurement mode, re- quires the use of an external timer pin for its operation. As this pin is a shared pin it must be configured correctly to ensure that it is setup for use as a Timer/Event Coun- ter input pin. This is achieved by ensuring that the mode select bits in the Timer/Event Counter control register, select either the event counter or pulse width measure- ment mode. Additionally the corresponding PAC Port Control Register bit must be set high to ensure that the pin is setup as an input. Any pull-high resistor connected to this pin will remain valid even if the pin is used as a Timer/Event Counter input. Programming Considerations When configured to run in the timer mode, the internal system clock is used as the timer clock source and is therefore synchronised with the overall operation of the microcontroller. In this mode when the appropriate timer register is full, the microcontroller will generate an inter- nal interrupt signal directing the program flow to the re- spective internal interrupt vector. For the pulse width measurement mode, the internal system clock is also used as the timer clock source but the timer will only run when the correct logic condition appears on the external timer input pin. As this is an external event and not syn- chronized with the internal timer clock, the microcontroller will only see this external event when the next timer clock pulse arrives. As a result, there may be small differences in measured values requiring pro- grammers to take this into account during programming. The same applies if the timer is configured to be in the event counting mode, which again is an external event and not synchronized with the internal system or timer clock. T i m e r O v e r f l o w B u z z e r C l o c k P A 0 D a t a B Z O u t p u t a t P A 0 B Z O u t p u t a t P A 1 Buzzer Function BZEN1 BZEN0 PAC Register PAC0 PAC Register PAC1 PA Register PA0 PA Register PA1 Output Function I I O O I x PA0=BZ, PA1=BZ I I O O O x PA0=0, PA1=0 I O O I I x PA0=BZ, PA1=input I x O I O x PA0=0, PA1=input x C I I x D PA0=input, PA1=D x x I I x x PA0=input, PA1=input Note: The BZEN1 and BZEN0 bits are located in the CTRL0 register; ²I²: Input; ²O²: Output; ²×² don¢t care; ²D²: data ²0² or ²1²; ²C²: CMOS output structure. PA0/PA1 I/O Funcion Control |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |