AT89LP216 Atmel Corporation, AT89LP216 Datasheet - Page 25

no-image

AT89LP216

Manufacturer Part Number
AT89LP216
Description
Manufacturer
Atmel Corporation
Datasheet

Specifications of AT89LP216

Flash (kbytes)
2 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
14
Spi
1
Uart
1
Sram (kbytes)
0.125
Operating Voltage (vcc)
2.4 to 5.5
Timers
2
Isp
SPI/OCD
Watchdog
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89LP216-20XU
Manufacturer:
ATMEL
Quantity:
539
Part Number:
AT89LP216-20XU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
13.2
13.3
3621E–MICRO–11/10
Port 1 Analog Functions
Port Read-modify-write
Figure 13-5. Push-pull Output
The AT89LP216 incorporates an analog comparator. In order to give the best analog perfor-
mance and minimize power consumption, pins that are being used for analog functions must
have both their digital outputs and digital inputs disabled. Digital outputs are disabled by putting
the port pins into the input-only mode as described in
inputs on P1.0 and P1.1 are disabled whenever the Analog Comparator is enabled by setting the
CEN bit in ACSR. CEN forces the PWD input on P1.0 and P1.1 low, thereby disabling the
Schmitt trigger circuitry. P1.0 and P1.1 will always default to input-only mode after reset regard-
less of the state of the Tristate-Port Fuse.
A read from a port will read either the state of the pins or the state of the port register depending
on which instruction is used. Simple read instructions will always access the port pins directly.
Read-modify-write instructions, which read a value, possibly modify it, and then write it back, will
always access the port register. This includes bit write instructions such as CLR or SETB as they
actually read the entire port, modify a single bit, then write the data back to the entire port. See
Table 13-3
Table 13-3.
Mnemonic
ANL
ORL
XRL
JBC
CPL
INC
DEC
DJNZ
MOV PX.Y, C
CLR PX.Y
SETB PX.Y
From Port
Register
for a complete list of Read-modify-write instruction which may access the ports.
Port Read-modify-write Instructions
Instruction
Logical AND
Logical OR
Logical EX-OR
Jump if bit set and clear bit
Complement bit
Increment
Decrement
Decrement and jump if not zero
Move carry to bit Y of Port X
Clear bit Y of Port X
Set bit Y of Port X
Input
Data
PWD
V
CC
“Port Configuration” on page
Example
ANL P1, A
ORL P1, A
XRL P1, A
JBC P3.0, LABEL
CPL P3.1
INC P1
DEC P3
DJNZ P3, LABEL
MOV P1.0, C
CLR P1.1
SETB P3.2
Port
Pin
AT89LP216
22. Digital
25

Related parts for AT89LP216