background image

 7

0368G–MICRO–6/05

 AT89C2051

9.

Idle Mode 

In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The 
mode is invoked by software. The content of the on-chip RAM and all the special functions regis-
ters remain unchanged during this mode. The idle mode can be terminated by any enabled 
interrupt or by a hardware reset. 

The P1.0 and P1.1 should be set to “0” if no external pull-ups are used, or set to “1” if 
external pull-ups are used.

It should be noted that when idle is terminated by a hardware reset, the device normally 
resumes program execution, from where it left off, up to two machine cycles before the internal 
reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but 
access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a 
port pin when Idle is terminated by reset, the instruction following the one that invokes Idle 
should not be one that writes to a port pin or to external memory.

10. Power-down Mode 

In the power-down mode the oscillator is stopped, and the instruction that invokes power-down 
is the last instruction executed. The on-chip RAM and Special Function Registers retain their 
values until the power-down mode is terminated. The only exit from power-down is a hardware 
reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be 
activated before V

CC

 is restored to its normal operating level and must be held active long 

enough to allow the oscillator to restart and stabilize.

The P1.0 and P1.1 should be set to “0” if no external pull-ups are used, or set to “1” if 
external pull-ups are used.

11. Programming The Flash

The AT89C2051 is shipped with the 2K bytes of on-chip PEROM code memory array in the 
erased state (i.e., contents = FFH) and ready to be programmed. The code memory array is pro-
grammed one byte at a time. 

Once the array is programmed, to re-program any non-blank byte, 

the entire memory array needs to be erased electrically.

Internal Address Counter: 

The AT89C2051 contains an internal PEROM address counter 

which is always reset to 000H on the rising edge of RST and is advanced by applying a positive 
going pulse to pin XTAL1.

Programming Algorithm:

 To  program the  AT89C2051, the following sequence is 

recommended.

1.

Power-up sequence:

 

Apply power between V

CC 

and GND pins

 

Set RST and XTAL1 to GND

2.

Set pin RST to “H”

 

Set pin P3.2 to “H”

3.

Apply the appropriate combination of “H” or “L” logic 

 

levels to pins P3.3, P3.4, P3.5, P3.7 to select one of the programming operations 
shown in the PEROM Programming Modes table.

Summary of Contents for AT89C2051

Page 1: ...ion set By combining a versatile 8 bit CPU with Flash on a monolithic chip the Atmel AT89C2051 is a power ful microcomputer which provides a highly flexible and cost effective solution to many embedde...

Page 2: ...nfiguration 2 1 20 lead PDIP SOIC 3 Block Diagram 1 2 3 4 5 6 7 8 9 10 20 19 18 17 16 15 14 13 12 11 RST VPP RXD P3 0 TXD P3 1 XTAL2 XTAL1 INT0 P3 2 INT1 P3 3 TO P3 4 T1 P3 5 GND VCC P1 7 P1 6 P1 5 P1...

Page 3: ...utput of the on chip comparator and is not accessible as a gen eral purpose I O pin The Port 3 output buffers can sink 20 mA When 1s are written to Port 3 pins they are pulled high by the internal pul...

Page 4: ...e used To drive the device from an external clock source XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 5 2 There are no require ments on the duty cycle of the external cloc...

Page 5: ...write 1s to these unlisted locations since they may be used in future products to invoke new features In that case the reset or inactive values of the new bits will always be 0 Table 6 1 AT89C2051 SF...

Page 6: ...NZ 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 inter...

Page 7: ...isters retain their values until the power down mode is terminated The only exit from power down is a hardware reset Reset redefines the SFRs but does not change the on chip RAM The reset should not b...

Page 8: ...of byte programming can also be monitored by the RDY BSY output signal Pin P3 1 is pulled low after P3 2 goes High during programming to indicate BUSY P3 1 is pulled High again when programming is don...

Page 9: ...crocontroller series Please contact your local programming vendor for the appropriate software revision Notes 1 The internal PEROM address counter is reset to 000H on the rising edge of RST and is adv...

Page 10: ...10 0368G MICRO 6 05 AT89C2051 Figure 13 1 Programming the Flash Memory Figure 13 2 Verifying the Flash Memory PP...

Page 11: ...11 5 12 5 V IPP Programming Enable Current 250 A tDVGL Data Setup to PROG Low 1 0 s tGHDX Data Hold after PROG 1 0 s tEHSH P3 4 ENABLE High to VPP 1 0 s tSHGL VPP Setup to PROG Low 10 s tGHSL VPP Hol...

Page 12: ...h Respect to Ground 1 0V to 7 0V Maximum Operating Voltage 6 6V DC Output Current 25 0 mA 17 DC Characteristics TA 40 C to 85 C VCC 2 7V to 6 0V unless otherwise noted Symbol Parameter Condition Min M...

Page 13: ...ime 20 20 ns tCHCL Fall Time 20 20 ns 20 Serial Port Timing Shift Register Mode Test Conditions VCC 5 0V 20 Load Capacitance 80 pF Symbol Parameter 12 MHz Osc Variable Oscillator Units Min Max Min Max...

Page 14: ...riven at VCC 0 5V for a logic 1 and 0 45V for a logic 0 Timing measurements are made at VIH min for a logic 1 and VIL max for a logic 0 23 Float Waveforms 1 Note 1 For timing purposes a port pin is no...

Page 15: ...C 0 5 10 15 20 0 6 12 18 24 FREQUENCY MHz I C C m A Vcc 6 0V Vcc 5 0V Vcc 3 0V AT89C2051 TYPICAL ICC IDLE 85 C 0 1 2 3 0 3 6 9 12 FREQUENCY MHz I C C m A Vcc 6 0V Vcc 5 0V Vcc 3 0V AT89C2051 TYPICAL I...

Page 16: ...4PC AT89C2051 24SC 20P3 20S Commercial 0 C to 70 C AT89C2051 24PI AT89C2051 24SI 20P3 20S Industrial 40 C to 85 C 27 2 Green Package Option Pb Halide free Speed MHz Power Supply Ordering Code Package...

Page 17: ...NG PLANE A D e eB eC COMMON DIMENSIONS Unit of Measure mm SYMBOL MIN NOM MAX NOTE A 5 334 A1 0 381 D 24 892 26 924 Note 2 E 7 620 8 255 E1 6 096 7 112 Note 2 B 0 356 0 559 B1 1 270 1 551 L 2 921 3 810...

Page 18: ...Small Outline SOIC B 20S 10 23 03 7 60 0 2992 7 40 0 2914 0 51 0 020 0 33 0 013 10 65 0 419 10 00 0 394 PIN 1 ID 1 27 0 050 BSC 13 00 0 5118 12 60 0 4961 0 30 0 0118 0 10 0 0040 2 65 0 1043 2 35 0 09...

Page 19: ...19 0368G MICRO 6 05 AT89C2051...

Page 20: ...el 1 408 441 0311 Fax 1 408 487 2600 Regional Headquarters Europe Atmel Sarl Route des Arsenaux 41 Case Postale 80 CH 1705 Fribourg Switzerland Tel 41 26 426 5555 Fax 41 26 426 5500 Asia Room 1219 Chi...

Reviews: