HT45R22E Holtek Semiconductor, HT45R22E Datasheet - Page 32

no-image

HT45R22E

Manufacturer Part Number
HT45R22E
Description
Remote Type 8-bit OTP MCU
Manufacturer
Holtek Semiconductor
Datasheet
Programming Considerations
Within the user program, one of the first things to con-
sider is port initialisation. After a reset, the I/O data reg-
ister and I/O 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
port control registers, are then programmed to setup
some pins as outputs, these output pins will have an ini-
tial high output value unless the associated port data
register is first programmed. Selecting which pins are in-
puts and which are outputs can be achieved byte-wide
by loading the correct value into the port control register
or by programming individual bits in the port control reg-
ister 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
Rev. 1.00
Generic Input/Output Ports
32
port, modify it to the required new bit values and then re-
write this data back to the output ports.
Pins PA0 to PA7 and PC0 to PC7 each has a wake-up
function, selected via the PAWK and the PCWK regis-
ters respectively. When the device is in the Idle/Sleep
Mode, various methods are available to wake the device
up. One of these is a high to low transition of any of
these pins. Single or multiple pins on Port A or Port C
can be setup to have this function.
Read Modify Write Timing
HT45R22E
March 17, 2010
www.DataSheet4U.com

Related parts for HT45R22E