AT89C4051 Atmel Corporation, AT89C4051 Datasheet - Page 6
![no-image](/images/manufacturer_photos/0/0/79/atmel_corporation_sml.jpg)
AT89C4051
Manufacturer Part Number
AT89C4051
Description
Manufacturer
Atmel Corporation
Datasheet
1.AT89C4051.pdf
(19 pages)
Specifications of AT89C4051
Flash (kbytes)
4 Kbytes
Max. Operating Frequency
24 MHz
Cpu
8051-12C
Max I/o Pins
15
Uart
1
Sram (kbytes)
0.125
Operating Voltage (vcc)
2.7 to 6.0
Timers
2
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
AT89C4051-12PI
Manufacturer:
ATMEL
Quantity:
1 588
Company:
Part Number:
AT89C4051-12PU
Manufacturer:
SyncMOS
Quantity:
5 000
Part Number:
AT89C4051-12PU
Manufacturer:
AT
Quantity:
20 000
Part Number:
AT89C4051-12SC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
AT89C4051-12SI
Manufacturer:
ES
Quantity:
21 000
Company:
Part Number:
AT89C4051-12SU
Manufacturer:
ATMEL
Quantity:
5 000
Part Number:
AT89C4051-12SU
Manufacturer:
AT
Quantity:
20 000
Company:
Part Number:
AT89C4051-24PC
Manufacturer:
ATM
Quantity:
2 060
Part Number:
AT89C4051-24PC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
AT89C4051-24PI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
7. Restrictions on Certain Instructions
7.1
7.2
8. Program Memory Lock Bits
6
Branching Instructions
MOVX-related Instructions, Data Memory
AT89C4051
The AT89C4051 is an economical and cost-effective member of Atmel’s growing family of micro-
controllers. It contains 4K bytes of Flash program memory. It is fully compatible with the MCS-51
architecture, and can be programmed using the MCS-51 instruction set. However, there are a
few considerations one must keep in mind when utilizing certain instructions to program this
device.
All the instructions related to jumping or branching should be restricted such that the destination
address falls within the physical program memory space of the device, which is 4K for the
AT89C4051. This should be the responsibility of the software programmer. For example, LJMP
0FE0H would be a valid instruction for the AT89C4051 (with 4K of memory), whereas LJMP
1000H would not.
LCALL, LJMP, ACALL, AJMP, SJMP, JMP @A+DPTR. These unconditional branching instruc-
tions will execute correctly as long as the programmer keeps in mind that the destination
branching address must fall within the physical boundaries of the program memory size (loca-
tions 00H to FFFH for the 89C4051). Violating the physical space limits may cause unknown
program behavior.
CJNE [...], DJNZ [...], JB, JNB, JC, JNC, JBC, JZ, JNZ. With these conditional branching
instructions the same rule above applies. Again, violating the memory boundaries may cause
erratic execution.
For applications involving interrupts, the normal interrupt service routine address locations of the
80C51 family architecture have been preserved.
The AT89C4051 contains 128 bytes of internal data memory. Thus, in the AT89C4051 the stack
depth is limited to 128 bytes, the amount of available RAM. External DATA memory access is
not supported in this device, nor is external Program memory execution. Therefore, no MOVX
[...] instructions should be included in the program.
A typical 80C51 assembler will still assemble instructions, even if they are written in violation of
the restrictions mentioned above. It is the responsibility of the controller user to know the physi-
cal features and limitations of the device being used and adjust the instructions used
correspondingly.
On the chip are two lock bits which can be left unprogrammed (U) or can be programmed (P) to
obtain the additional features listed in the
Table 8-1.
Note:
1
2
3
1. The Lock Bits can only be erased with the Chip Erase operation.
Program Lock Bits
Lock Bit Protection Modes
LB1
U
P
P
LB2
U
U
P
(1)
Table
Protection Type
No program lock features
Further programming of the Flash is disabled
Same as mode 2, also verify is disabled
8-1.
1001F–MICRO–6/08