| Electronic Components Datasheet Search |
|
HT56RB688 Datasheet(PDF) 66 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT56RB688 Datasheet(HTML) 66 Page - Holtek Semiconductor Inc |
|
66 / 164 page ![]() · Step 3 Select which channel is to be connected to the internal A/D converter by correctly programming the ACS4, ACS2~ACS0 bits which are also contained in the register. · Step 4 Select which pins on the I/O port are to be used as A/D inputs and configure them as A/D input pins by correctly programming the PCR7~PCR0 bits in the ADPCR register. · Step 5 If the interrupts are to be used, the interrupt control registers must be correctly configured to ensure the A/D converter interrupt function is active. The master interrupt control bit, EMI, in the INTC0 interrupt control register must be set to ²1² and the A/D converter interrupt enable bit, EADI, in the INTC2 register must also be set to ²1². · Step 6 The analog to digital conversion process can now be initialised by setting the START bit in the ADCR register from ²0² to ²1² and then to ²0² again. Note that this bit should have been originally set to ²0². · Step 7 To check when the analog to digital conversion process is complete, the EOCB bit in the ADCR register can be polled. The conversion process is complete when this bit goes low. When this occurs the A/D data registers ADRL and ADRH can be read to obtain the conversion value. As an alternative method if the interrupts are enabled and the stack is not full, the program can wait for an A/D interrupt to occur. Note When checking for the end of the conversion process, if the method of polling the bit in the ADCR register is used, the interrupt enable step above can be omitted. The accompanying diagram shows graphically the various stages involved in an analog to digital conversion process and its associated timing. The setting up and operation of the A/D converter function is fully under the control of the application program as there are no configuration options associated with the A/D converter. After an A/D conversion process has been initiated by the application program, the microcontroller internal hardware will begin to carry out the conversion, during which time the program can continue with other functions. The time taken for the A/D conversion is 16tAD where tAD is equal to the A/D clock period. Rev. 1.10 66 April 15, 2013 HT56RB688 TinyPowerTM A/D type Smart Card OTP MCU with LCD, DAC, ISO 7816 and USB Interfaces t A D C A / D c o n v e r s i o n t i m e 0 0 0 0 0 0 0 0 B x x x B 0 0 0 0 0 1 0 0 B 0 1 0 B S T A R T E O C B P C R 7 ~ P C R 0 A C S 2 ~ A C S 0 * P o w e r - o n R e s e t E n d o f A / D c o n v e r s i o n 1 : D e f i n e p o r t c o n f i g u r a t i o n 2 : S e l e c t a n a l o g c h a n n e l A / D c l o c k m u s t b e f S Y S , f S Y S / 2 , f S Y S / 4 , f S Y S / 8 , f S Y S / 1 6 o r f S Y S / 3 2 t A D C S = 4 t A D t A D C = t A D C S + n * t A D ; n = b i t c o u n t o f A D C r e s o l u t i o n " * " o n l y v a l i d i f A C S 4 = 0 N o t e : S t a r t o f A / D c o n v e r s i o n R e s e t A / D c o n v e r t e r A / D s a m p l i n g t i m e t A D C S 0 0 0 B S t a r t o f A / D c o n v e r s i o n R e s e t A / D c o n v e r t e r 0 0 0 0 0 1 0 1 B 0 0 1 B S t a r t o f A / D c o n v e r s i o n R e s e t A / D c o n v e r t e r E n d o f A / D c o n v e r s i o n A / D s a m p l i n g t i m e t A D C S 0 0 0 0 0 0 0 0 B x x x B A D C m o d u l e O N A D O N B o f f o f f o n o n t O N 2 S T t A D C A / D c o n v e r s i o n t i m e A/D Conversion Timing |
|
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 |