| Electronic Components Datasheet Search |
|
HT56R25 Datasheet(PDF) 44 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT56R25 Datasheet(HTML) 44 Page - Holtek Semiconductor Inc |
|
44 / 131 page ![]() HT56R22/HT56R23/HT56R24/HT56R25/HT56R26 Rev. 1.00 44 March 11, 2010 I/O Port Control Registers Each Port has its own control register, known as PAC, PBC, PCC, PDC, PEC, PFC and PGC which controls the input/output configuration. With this control register, each I/O pin with or without pull-high resistors can be re- configured dynamically under software control. For the I/O pin to function as an input, the corresponding bit of the control register must be written as a ²1². This will then allow the logic state of the input pin to be directly read by instructions. When the corresponding bit of the control register is written as a ²0², the I/O pin will be setup as a CMOS output. If the pin is currently setup as an output, instructions can still be used to read the out- put register. However, it should be noted that the pro- gram will in fact only read the status of the output data latch and not the actual logic status of the output pin. Pin-shared Functions The flexibility of the microcontroller range is greatly en- hanced by the use of pins that have more than one func- tion. Limited numbers of pins can force serious design constraints on designers but by supplying pins with multi-functions, many of these difficulties can be over- come. For some pins, the chosen function of the multi-function I/O pins is set by configuration options while for others the function is set by application pro- gram control. · External Interrupt Input The external interrupt pin, INT0/INT1, are pin-shared with an I/O pins. To use the pins as external interrupt inputs the correct bits in the INTC0 register must be programmed. The pin must also be setup as an input by setting bit in the Port Control Register. A pull-high resistor can also be selected via the appropriate port pull-high resistor register. Note that even if the pin is setup as an external interrupt input the I/O function still remains. · External Timer/Event Counter Input The Timer/Event Counter pins, TC0, TC1, TC2 and TC3 are pin-shared with I/O pins. For these shared pins to be used as Timer/Event Counter inputs, the Timer/Event Counter must be configured to be in the Event Counter or Pulse Width Capture Mode. This is achieved by setting the appropriate bits in the Timer/Event Counter Control Register. The pins must also be setup as inputs by setting the appropriate bit in the Port Control Register. Pull-high resistor options can also be selected using the port pull-high resistor registers. Note that even if the pin is setup as an exter- nal timer input the I/O function still remains. · PFD Output The PFD function output is pin-shared with an I/O pin. The output function of this pin is chosen using the Configuration option. Note that the corresponding bit of the port control register, must setup the pin as an output to enable the PFD output. If the port control register has setup the pin as an input, then the pin will function as a normal logic input with the usual pull-high selection, even if the PFD function has been selected. · PWM Outputs The PWM function whose outputs are pin-shared with I/O pins. The PWM output functions are chosen using the PWMnL and PWMnH (n=0~3) registers. Note that the corresponding bit of the port control registers, for the output pin, must setup the pin as an output to en- able the PWM output. If the pins are setup as inputs, then the pin will function as a normal logic input with the usual pull-high selections, even if the PWM regis- ters have enabled the PWM function. · SCOM Driver Pins Pins PB0~PB3 on Port B can be used as LCD COM driver pins. This function is controlled using the SCOMC register which will generate the necessary 1/2 bias signals on these four pins. · A/D Inputs Each device in this series has eight inputs to the A/D converter. All of these analog inputs are pin-shared with I/O pins. If these pins are to be used as A/D inputs and not as I/O pins then the corresponding PCRn bits in the A/D converter control register, ADPCR, must be properly setup. There are no configuration options as- sociated with the A/D converter. If chosen as I/O pins, then full pull-high resistor configuration options re- main, however if used as A/D inputs then any pull-high resistor configuration options associated with these pins will be automatically disconnected. Pin Remapping Configuration The pin remapping function enables the function pins INT0/1, TC0/1, PFD, PWM0/1/2 to be located on differ- ent port pins. It is important not to confuse the Pin Re- mapping function with the Pin-shared function, these two functions have no interdependence. The PMAP0~7 bit in the PINMAP register allows the three function pins INT0/1, TC0/1, PFD, PWM0/1/2 to be remapped to different port pins. After power up, these bits will be reset to zero, which will define the de- fault port pins to which these three functions will be mapped. Changing this bit will move the functions to other port pins. Examination of the pin names on the package diagrams will reveal that some pin function names are repeated, this indicates a function pin that can be remapped to other port pins. If the pin name is bracketed then this in- dicates its alternative location. Pin names without brack- ets indicates its default location which is the condition after Power-on. |
|
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 |