| Electronic Components Datasheet Search |
|
HT82A623R Datasheet(PDF) 41 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT82A623R Datasheet(HTML) 41 Page - Holtek Semiconductor Inc |
|
41 / 98 page ![]() HT82A623R/HT82A6208/HT82A6216 Rev.1.30 41 January14,2011 will then allow the logic state of the input pin to be di- rectly read by instructions. When the corresponding bit of the control register is written as a ²0², the I/O pin will be setup as an output. If the pin is currently setup as an output, instructions can still be used to read the output register. However, it should be noted that the program will in fact only read the status of the output data latch andnottheactuallogicstatusoftheoutputpin. PortB VDDIO Function The output drivers of most I/O pins use the VDD power supply line as their high voltage level. In this device pins PB0~PB6 can use a different voltage, other than VDD as their high level. This is supplied externally on pin PB7. This function is selected using configuration op- tions. Pin-sharedFunctions 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- gramcontrol. · Externalinterruptinput The external interrupt pin INT is pin-shared with the I/O pin PA6. For applications not requiring an external interrupt input, the pin-shared external interrupt pin can be used as a normal I/O pin, however to do this, the external interrupt enable bits in the INTC0 register mustbedisabled. · ExternalTimerClockInputs The external timer pins TMR0 and TMR1 are pin-shared with I/O pins. To configure these pins to operate as timer inputs, the corresponding control bits in the timer control register must be correctly set. For applications that do not require external timer inputs, these pins can be used as normal I/O pins. Note that if used as normal I/O pins the timer mode control bits in the timer control register must select the timer mode, which has an internal clock source, to prevent the in- putpinfrominterferingwiththetimeroperation. · PWM outputs The device contains two PWM outputs which are pin-shared with I/O pins. The PWM output functions are chosen via configuration options and remain fixed after the device is programmed. Note that the corre- sponding bit of the port control register, PAC, must setup the pin as an output to enable the PWM output. If the PAC 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 option, even if the PWM con- figurationoptionhasbeenselected. · A/Dinputs These devices can have up to 16 A/D converter inputs depending upon which package type is chosen. All of these analog inputs are pin-shared with I/O pins on Port B and Port C. If these pins are to be used as A/D inputs and not as normal I/O pins then the corre- sponding bits in the A/D Converter Control Register, ADCR, must be properly set. There are no configura- tion options associated with the A/D function. If used as I/O pins, then full pull-high resistor configuration options remain, however if used as A/D inputs then any pull-high resistor options associated with these pinswillbeautomaticallydisconnected. I/OPinStructures The vast range of I/O functions and pin-shared options results in a huge variety of I/O pin structure types. For this reason the generic Input/Output Port diagram pro- vided here is for general reference only. As the exact logical construction of the I/O pin will differ from the drawing, they are supplied as a guide only to assist with thefunctionalunderstandingofthebasicI/Opins. ProgrammingConsiderations Within the user program, one of the first things to con- sider is port initialisation. After a reset, all of the data and port control register will be set high. This means that all I/O pins will default to an input state, the level of which depends on the other connected circuitry and whether pull-high options have been selected. If the PAC, PBC, PCC and PDC port control register, are then pro- grammed to setup some pins as outputs, these output pins will have an initial high output value unless the as- sociated PA, PB, PC and PD port data registers are first programmed. Selecting which pins are inputs and which are outputs can be achieved byte-wide by loading the correct value into the port control register or by program- ming individual bits in the port control register using the ²SET [m].i² and ²CLR [m].i² instructions. Note that when using these bit control instructions, a read-modify-write operation takes place. The microcontroller must first read in the data on the entire port, modify it to the re- quired new bit values and then rewrite this data back to theoutputports. The ports have the additional capability of providing wake-up functions. When the device is in the Power Down Mode, various methods are available to wake the device up. One of these is a high to low transition of any of the port pins. Single or multiple pins on the ports can besetuptohavethisfunction. T 1 T 2 T 3 T 4 T 1 T 2 T 3 T 4 W r i t e t o P o r t R e a d f r o m P o r t S y s t e m C l o c k P o r t D a t a Read/WriteTiming |
|
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 |