Rainbow-electronics T89C5115 Manual do Utilizador Página 1

Consulte online ou descarregue Manual do Utilizador para Sensores Rainbow-electronics T89C5115. Rainbow Electronics T89C5115 User Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 105
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
Rev. 4128A–8051–04/02
1
Features
80C51 Core Architecture
256 Bytes of On-chip RAM
256 Bytes of On-chip ERAM
16-KB of On-chip Flash Memory
Data Retention: 10 Years at 85°C
Read/Write Cycle: 10K
2K Bytes of On-chip Flash for Bootloader
2K Bytes of On-chip EEPROM
Read/Write Cycle: 100k
14-sources 4-level Interrupts
Three 16-bit Timers/Counters
Full Duplex UART Compatible 80C51
Maximum Crystal Frequency 40 MHz
InX2Mode,20MHz(CPUcore,40MHz)
Three or Four Ports: 16 or 20 Digital I/O Lines
Two-channel 16-bit PCA with:
PWM (8-bit)
High-speed Output
Timer and Edge Capture
Double Data Pointer
21-bit WatchDog Timer (7 Programmable Bits)
A 10-bit Resolution Analog to Digital Converter (ADC) with 8 Multiplexed Inputs
Power Saving Modes:
Idle Mode
Power-down Mode
Power Supply: 5V ± 10% (or 3V
(1)
± 10%)
Temperature Range: Industrial (-40° to +85°C)
Packages: SOIC28, PLCC28, VQFP32
Note: 1. Ask for availability
Description
The T89C5115 is a high performance Flash version of the 80C51 single chip 8-bit
microcontrollers. It contains a 16-KB Flash memory block for program and data.
The 16-KB Flash memory can be programmed either in parallel mode or in serial
mode with the ISP capability or with software. The programming voltage is internally
generated from the standard VCC pin.
The T89C5115 retains all features of the 80C52 with 256 bytes of internal RAM, a 7-
source 4-level interrupt controller and three timer/counters. In addition, the T89C5115
has a 10-bit A/D converter, a 2-KB Boot Flash memory, 2-KB EEPROM for data, a
Programmable Counter Array, an ERAM of 256 bytes, a Hardware WatchDog Timer
and a more versatile serial channel that facilitates multiprocessor communication
(EUART). The fully static design of the T89C5115 reduces system power consumption
by bringing the clock frequency down to any value, even DC, without loss of data.
The T89C5115 has two software-selectable modes of reduced activity and an 8 bit
clock prescaler for further reduction in power consumption. In the idle mode the CPU
is frozen while the peripherals and the interrupt system are still operating. In the
power-down mode the RAM is saved and all other functions are inoperative.
The added features of the T89C5115 make it more powerful for applications that need
A/D conversion, pulse width modulation, high speed I/O and counting capabilities
such as industrial control, consumer goods, alarms, motor control, etc. While remain-
ing fully compatible with the 80C52 it offers a superset of this standard microcontroller.
Low Pin Count
8-bit MCU with
A/D Converter
and 16-Kbytes of
Flash Memory
T89C5115
Vista de página 0
1 2 3 4 5 6 ... 104 105

Resumo do Conteúdo

Página 1 - T89C5115

Rev. 4128A–8051–04/021Features• 80C51 Core Architecture• 256 Bytes of On-chip RAM• 256 Bytes of On-chip ERAM– 16-KB of On-chip Flash Memory– Data Rete

Página 2

10T89C51154128A–8051–04/02T2CON C8hTimer/Counter 2controlTF2 EXF2 RCLK TCLK EXEN2 TR2 C/T2# CP/RL2#T2MOD C9hTimer/Counter 2Mode––––––T2OEDCENRCAP2H CB

Página 3

100T89C51154128A–8051–04/02Package DrawingSOIC28

Página 4

101T89C51154128A–8051–04/02Package DrawingVQFP32

Página 5

iT89C51154128A–8051–04/02Table of ContentsFeatures ... 1

Página 6

iiT89C51154128A–8051–04/02In-System Programming (ISP) ... 38Flash Programming and Erasure...

Página 7

iiiT89C51154128A–8051–04/02Voltage Conversion ... 80Clock Sel

Página 8

Printedonrecycledpaper.ATMEL®, is a registered trademarkof Atmel.Other terms and product names may be the trademarks of others.© Atmel Corporation 200

Página 9

11T89C51154128A–8051–04/02Table 8. Interrupt SFRsMnemonicAddName 76543210IEN0 A8hInterrupt EnableControl 0EA EC ET2 ES ET1 EX1 ET0 EX0IEN1 E8hInterrup

Página 10

12T89C51154128A–8051–04/02ReservedNote: 1. These registers are bit-addressable.Sixteen addresses in the SFR space are both byte-addressable and bit-ad

Página 11

13T89C51154128A–8051–04/02Clock The T89C5115 core needs only 6 clock periods per machine cycle. This feature, called‘X2’, provides the following advan

Página 12

14T89C51154128A–8051–04/02Figure 3. Clock CPU Generation DiagramXTAL1XTAL2PDPCON.1CPU Core10÷ 2PERIPHCLOCKClockPeripheral Clock SymbolCPUCLOCKCPU Core

Página 13

15T89C51154128A–8051–04/02Figure 4. Mode Switching WaveformsNote: In order to prevent any incorrect operation while operating in the X2 mode, users mu

Página 14

16T89C51154128A–8051–04/02Register Table 12. CKCON RegisterCKCON (S:8Fh)Clock Control RegisterNotes: 1. This control bit is validated when the CPU clo

Página 15

17T89C51154128A–8051–04/02Power ManagementIntroduction Two power reduction modes are implemented in the T89C5115: the Idle mode and thePower-down mode

Página 16

18T89C51154128A–8051–04/02Idle Mode Idle mode is a power reduction mode that reduces the power consumption. In this mode,program execution halts. Idle

Página 17

19T89C51154128A–8051–04/02Exiting Power-down Mode Note: If VDD was reduced during the Power-down mode, do not exit Power-down mode untilVDD is restore

Página 18

2T89C51154128A–8051–04/02In X2 mode a maximum external clock rate of 20 MHz reaches a 300 ns cycle time.Block DiagramNotes: 1. 8 analog Inputs/8 Digit

Página 19

20T89C51154128A–8051–04/02Registers PCON (S:87h)Table 14. PCON RegisterPower Configuration RegisterReset Value = XXXX 0000b76543210––––GF1GF0PDIDLBitN

Página 20

21T89C51154128A–8051–04/02Data Memory The T89C5115 provides data memory access in two different spaces:The internal space mapped in three separate seg

Página 21

22T89C51154128A–8051–04/02Figure 8. Lower 128 bytes Internal RAM OrganizationUpper 128 Bytes RAM The upper 128 bytes of RAM are accessible from addres

Página 22

23T89C51154128A–8051–04/02Dual Data PointerDescription The T89C5115 implements a second data pointer for speeding up code execution andreducing code s

Página 23

24T89C51154128A–8051–04/02Registers Table 16. PSW RegisterPSW (S:8Eh)Program Status Word RegisterReset Value = 0000 0000b76543210CY AC F0 RS1 RS0 OV F

Página 24

25T89C51154128A–8051–04/02Table 17. AUXR1 RegisterAUXR1 (S:A2h)Auxiliary Control Register 1Reset Value = xxxx 00x0b76543210– – ENBOOT – GF3 0 – DPSBit

Página 25

26T89C51154128A–8051–04/02EEPROM DataMemoryThe 2-kbyte on-chip EEPROM memory block is located at addresses 0000h to 07FFh ofthe XRAM/ERAM memory space

Página 26

27T89C51154128A–8051–04/02Examples ;*F*************************************************************************;* NAME: api_rd_eeprom_byte;* DPTR cont

Página 27

28T89C51154128A–8051–04/02Registers Table 18. EECON RegisterEECON (S:0D2h)EEPROM Control RegisterReset Value = XXXX XX00bNot bit addressable76543210EE

Página 28

29T89C51154128A–8051–04/02Program/CodeMemoryThe T89C5115 implement 16-KB of on-chip program/code memory.The Flash memory increases EPROM and ROM funct

Página 29

3T89C51154128A–8051–04/02Pin ConfigurationP3.4/T0P3.3/INT1P4.11P3.7P3.2/INT0P1.5/AN5P1.7/AN7P1.6/AN6P2.0VAREFVAVCCVAGNDP1.0/AN0/T2P1.1/AN1/T2EXP1.2/AN

Página 30

30T89C51154128A–8051–04/02FM0 Memory Architecture The Flash memory is made up of 4 blocks (see Figure 11):1. The memory array (user space) 16-KB.2. Th

Página 31

31T89C51154128A–8051–04/02Overview of FM0OperationsThe CPU interfaces to the Flash memory through the FCON register and AUXR1register.These registers

Página 32

32T89C51154128A–8051–04/02Interrupts that may occur during programming time must be disabled to avoid any spuri-ous exit of the programming mode.Statu

Página 33

33T89C51154128A–8051–04/02Figure 12. Column Latches Loading ProcedureNote: The last page address used when loading the column latch is the one used to

Página 34

34T89C51154128A–8051–04/02Figure 13. Flash and Extra row Programming ProcedureHardware Security ByteThe following procedure is used to program the Har

Página 35

35T89C51154128A–8051–04/02Figure 14. Hardware Programming ProcedureReading the Flash SpacesUser The following procedure is used to read the User space

Página 36

36T89C51154128A–8051–04/02Figure 15. Reading ProcedureFlash Protection from ParallelProgrammingThe three lock bits in Hardware Security Byte (see &quo

Página 37

37T89C51154128A–8051–04/02Registers FCON RegisterFCON (S:D1h)Flash Control RegisterReset Value = 0000 0000b76543210FPL3 FPL2 FPL1 FPL0 FPS FMOD1 FMOD0

Página 38

38T89C51154128A–8051–04/02In-SystemProgramming (ISP)With the implementation of the User Space (FM0) and the Boot Space (FM1) in Flashtechnology the T8

Página 39

39T89C51154128A–8051–04/02Boot ProcessSoftware Boot ProcessExampleMany algorithms can be used for the software boot process. Before describing them,Th

Página 40

4T89C51154128A–8051–04/02Table 1. Pin DescriptionPin Name Type DescriptionVSS GND Circuit groundVCC Supply VoltageVAREF Reference Voltage for ADCVAVCC

Página 41

40T89C51154128A–8051–04/02ApplicationProgramming InterfaceSeveral Application Program Interface (API) calls are available for use by an applicationpro

Página 42

41T89C51154128A–8051–04/02Hardware Security Byte Table 25. Hardware Security byteDefault value after erasing chip: FFhNotes: 1. Only the 4 MSB bits ca

Página 43

42T89C51154128A–8051–04/02Serial I/O Port The T89C5115 I/O serial port is compatible with the I/O serial port in the 80C52.It provides both synchronou

Página 44

43T89C51154128A–8051–04/02valid stop bits cannot clear the FE bit. When the FE feature is enabled, RI rises on thestop bit instead of the last data bi

Página 45

44T89C51154128A–8051–04/02Given Address Each device has an individual address that is specified in the SADDR register; theSADEN register is a mask byt

Página 46

45T89C51154128A–8051–04/02For slaves A and B, bit 2 is a don’t care bit; for slave C, bit 2 is set. To communicate withall of the slaves, the master m

Página 47

46T89C51154128A–8051–04/02Table 27. SADEN RegisterSADEN (S:B9h)Slave Address Mask RegisterReset Value = 0000 0000bNot bit addressableTable 28. SADDR R

Página 48

47T89C51154128A–8051–04/02Table 30. PCON RegisterPCON (S:87h)Power Control RegisterReset Value = 00x1 0000bNot bit addressable76543210SMOD1 SMOD0 - PO

Página 49

48T89C51154128A–8051–04/02Timers/Counters The T89C5115 implements two general-purpose, 16-bit Timers/Counters. Such areidentified as Timer 0 and Timer

Página 50

49T89C51154128A–8051–04/02Mode 0 (13-bit Timer) Mode 0 configures Timer 0 as an 13-bit Timer which is set up as an 8-bit Timer (TH0register) with a mo

Página 51

5T89C51154128A–8051–04/02P3.0:7 I/O Port 3:Is an 8-bit bi-directional I/O port with internal pull-ups. Port 3 pins that have 1’swritten to them are pu

Página 52

50T89C51154128A–8051–04/02Mode 2 (8-bit Timer with Auto-Reload)Mode 2 configures Timer 0 as an 8-bit Timer (TL0 register) that automatically reloadsfr

Página 53

51T89C51154128A–8051–04/02Timer 1 Timer 1 is identical to Timer 0 excepted for Mode 3 which is a hold-count mode. Follow-ing comments help to understa

Página 54

52T89C51154128A–8051–04/02Interrupt Each Timer handles one interrupt source that is the timer overflow flag TF0 or TF1. Thisflag is set every time an

Página 55

53T89C51154128A–8051–04/02Registers Table 31. TCON RegisterTCON (S:88h)Timer/Counter Control RegisterReset Value = 0000 0000b76543210TF1 TR1 TF0 TR0 I

Página 56

54T89C51154128A–8051–04/02Table 32. TMOD RegisterTMOD (S:89h)Timer/Counter Mode Control RegisterNotes: 1. Reloaded from TH1 at overflow.2. Reloaded fr

Página 57

55T89C51154128A–8051–04/02Table 33. TH0 RegisterTH0 (S:8Ch)Timer 0 High Byte RegisterReset Value = 0000 0000bTable 34. TL0 RegisterTL0 (S:8Ah)Timer 0

Página 58

56T89C51154128A–8051–04/02Table 36. TL1 RegisterTL1 (S:8Bh)Timer 1 Low Byte RegisterReset Value = 0000 0000b76543210BitNumberBitMnemonic Description7:

Página 59

57T89C51154128A–8051–04/02Timer 2 The T89C5115 Timer 2 is compatible with Timer 2 in the 80C52.It is a 16-bit timer/counter: the count is maintained b

Página 60

58T89C51154128A–8051–04/02Programmable Clock-OutputIn clock-out mode, Timer 2 operates as a 50%-duty-cycle, programmable clock genera-tor (See Figure

Página 61

59T89C51154128A–8051–04/02Registers Table 37. T2CON RegisterT2CON (S:C8h)Timer 2 Control RegisterReset Value = 0000 0000bBit addressable76543210TF2 EX

Página 62

6T89C51154128A–8051–04/02I/O Configurations Each Port SFR operates via type-D latches, as illustrated in Figure 1 for Ports 3 and 4. ACPU "write

Página 63

60T89C51154128A–8051–04/02Table 38. T2MOD RegisterT2MOD (S:C9h)Timer 2 Mode Control RegisterReset Value = XXXX XX00bNot bit addressableTable 39. TH2 R

Página 64

61T89C51154128A–8051–04/02Table 40. TL2 RegisterTL2 (S:CCh)Timer 2 Low Byte RegisterReset Value = 0000 0000bNot bit addressableTable 41. RCAP2H Regist

Página 65

62T89C51154128A–8051–04/02WatchDog Timer T89C5115 contains a powerful programmable hardware WatchDog Timer (WDT) thatautomatically resets the chip if

Página 66

63T89C51154128A–8051–04/02WatchDog Programming The three lower bits (S0, S1, S2) located into WDTPRG register permit to program theWDT duration.Table

Página 67

64T89C51154128A–8051–04/02WatchDog Timerduring Power-downMode and IdleIn Power-down mode the oscillator stops, which means the WDT also stops. While i

Página 68

65T89C51154128A–8051–04/02Table 46. WDTRST RegisterWDTRST (S:A6h Write only)WatchDog Timer Enable RegisterReset Value = 1111 1111bNote: The WDRST regi

Página 69

66T89C51154128A–8051–04/02ProgrammableCounter Array (PCA)The PCA provides more timing capabilities with less CPU intervention than the standardtimer/c

Página 70

67T89C51154128A–8051–04/02Figure 30. PCA Timer/CounterThe CMOD register includes three additional bits associated with the PCA.• The CIDL bit which al

Página 71

68T89C51154128A–8051–04/02PCA Modules Each one of the five compare/capture modules has six possible functions. It canperform:• 16-bit Capture, positiv

Página 72

69T89C51154128A–8051–04/02PCA InterruptFigure 31. PCA Interrupt SystemPCA Capture Mode To use one of the PCA modules in capture mode either one or bot

Página 73

7T89C51154128A–8051–04/02Read-Modify-WriteInstructionsSome instructions read the latch data rather than the pin data. The latch based instruc-tions re

Página 74

70T89C51154128A–8051–04/0216-bit Software TimerModeThe PCA modules can be used as software timers by setting both the ECOM and MATbits in the modules

Página 75

71T89C51154128A–8051–04/02High Speed Output Mode In this mode the CEX output (on port 1) associated with the PCA module will toggleeach time a match o

Página 76

72T89C51154128A–8051–04/02Figure 35. PCA PWM ModeCL rolls over from FFh TO 00h loadsCCAPnH contents into CCAPnLCCAPnLCCAPnH8-BitComparatorCL (8 bits)“

Página 77

73T89C51154128A–8051–04/02PCA Registers Table 47. CMOD RegisterCMOD (S:D9h)PCA Counter Mode RegisterReset Value = 00XX X000b76543210CIDL WDTE - - - CP

Página 78

74T89C51154128A–8051–04/02Table 48. CCON RegisterCCON (S:D8h)PCA Counter Control RegisterReset Value = 00xx xx00b76543210CF CR - - - - CCF1 CCF0BitNum

Página 79

75T89C51154128A–8051–04/02Table 49. CCAPnH RegistersCCAP0H (S:FAh)CCAP1H (S:FBh)PCA High Byte Compare/Capture Module n Register (n=0..1)Reset Value =

Página 80

76T89C51154128A–8051–04/02Table 51. CCAPMn RegistersCCAPM0 (S:DAh)CCAPM1 (S:DBh)PCA Compare/Capture Module n Mode registers (n=0..1)Reset Value = X000

Página 81

77T89C51154128A–8051–04/02Table 52. CH RegisterCH (S:F9h)PCA Counter Register High ValueReset Value = 0000 00000bTable 53. CL RegisterCL (S:E9h)PCA co

Página 82

78T89C51154128A–8051–04/02Analog-to-DigitalConverter (ADC)This section describes the on-chip 10-bit analog-to-digital converter of the T89C5115.Eight

Página 83

79T89C51154128A–8051–04/02Figure 36. ADC DescriptionFigure 37 shows the timing diagram of a complete conversion. For simplicity, the figuredepicts the

Página 84

8T89C51154128A–8051–04/02associated nFET is switched off. This is traditional CMOS switch convention. Currentstrengths are 1/10 that of pFET #3Figure

Página 85

80T89C51154128A–8051–04/02Table 54. Selected Analog InputVoltage Conversion When the ADCIN is equals to VAREF the ADC converts the signal to 3FFh (ful

Página 86

81T89C51154128A–8051–04/02IT ADC Management An interrupt end-of-conversion will occurs when the bit ADEOC is activated and the bitEADC is set. For re-

Página 87

82T89C51154128A–8051–04/02Registers Table 55. ADCF RegisterADCF (S:F6h)ADC ConfigurationReset Value = 0000 0000bTable 56. ADCON RegisterADCON (S:F3h)A

Página 88

83T89C51154128A–8051–04/02Table 57. ADCLK RegisterADCLK (S:F2h)ADC Clock PrescalerReset Value = XXX0 0000bTable 58. ADDH RegisterADDH (S:F5h Read Only

Página 89

84T89C51154128A–8051–04/02Interrupt SystemIntroduction The T89C5115 has a total of 8 interrupt vectors: two external interrupts (INT0 andINT1), three

Página 90

85T89C51154128A–8051–04/02Table 60. Priority Level Bit ValuesA low-priority interrupt can be interrupted by a high priority interrupt but not by anoth

Página 91

86T89C51154128A–8051–04/02Registers Table 62. IEN0 RegisterIEN0 (S:A8h)Interrupt Enable RegisterReset Value = 0000 0000bbit addressable76543210EA EC E

Página 92

87T89C51154128A–8051–04/02Table 63. IEN1 RegisterIEN1 (S:E8h)Interrupt Enable RegisterReset Value = xxxx xx0xbbit addressable76543210------EADC-BitNum

Página 93

88T89C51154128A–8051–04/02Table 64. IPL0 RegisterIPL0 (S:B8h)Interrupt Enable RegisterReset Value = X000 0000bbit addressable76543210- PPC PT2 PS PT1

Página 94

89T89C51154128A–8051–04/02Table 65. IPL1 RegisterIPL1 (S:F8h)Interrupt Priority Low Register 1Reset Value = xxxx xx0xbbit addressable76543210- - - - -

Página 95

9T89C51154128A–8051–04/02SFR Mapping The Special Function Registers (SFRs) of the T89C5115 fall into the followingcategories:Table 3. C51CoreSFRsMnemo

Página 96

90T89C51154128A–8051–04/02Table 66. IPL0 RegisterIPH0 (B7h)Interrupt High Priority RegisterReset Value = X000 0000b76543210- PPCH PT2H PSH PT1H PX1H P

Página 97

91T89C51154128A–8051–04/02Table 67. IPH1 RegisterIPH1 (S:F7h)Interrupt high priority Register 1Reset Value = xxxx xx0xb76543210- - - - - - PADCH -BitN

Página 98

92T89C51154128A–8051–04/02Electrical CharacteristicsAbsolute Maximum RatingsDC Parameters for Standard VoltageTA =-40°Cto+85°C; VSS=0V; VCC=5V± 10%; F

Página 99

93T89C51154128A–8051–04/025. Under steady state (non-transient) conditions, IOLmust be externally limited as fol-lows:Maximum IOLper port pin: 10 mAMa

Página 100

94T89C51154128A–8051–04/02Figure 44. Clock Signal Waveform for ICCTests in Active and Idle ModesDC Parameters for A/DConverterTable 69. DC Parameters

Página 101

95T89C51154128A–8051–04/02AC ParametersExplanation of the ACSymbolsEach timing symbol has 5 characters. The first character is always a “T” (stands fo

Página 102

96T89C51154128A–8051–04/02Table 72. AC Parameters for a Variable ClockShift Register Timing WaveformsExternal Clock DriveCharacteristics (XTAL1)Table

Página 103

97T89C51154128A–8051–04/02Float WaveformsFor timing purposes as port pin is no longer floating when a 100 mV change from loadvoltage occurs and begins

Página 104

98T89C51154128A–8051–04/02Ordering InformationTable 75. Possible Order EntriesPart-NumberMemory Size Supply VoltageTemperatureRangeMaxFrequency Packag

Página 105 - 4128A–8051–04/02 /xM

99T89C51154128A–8051–04/02Package DrawingPLCC28

Comentários a estes Manuais

Sem comentários