Rainbow-electronics T89C51CC01 User Manual

Browse online or download User Manual for Sensors Rainbow-electronics T89C51CC01. Rainbow Electronics T89C51CC01 User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 149
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
Rev. D – 17-Dec-01
1
1. Features
80C51 core architecture:
256 bytes of on-chip RAM
1 Kbytes of on-chip ERAM
32 Kbytes of on-chip Flash memory
Data Retention: 10 years at 85°C
Read/Write cycle: 10k
2 Kbytes of on-chip Flash for Bootloader
2 Kbytes 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. In X2 mode, 20 MHz (CPU core, 40 MHz)
Five ports: 32 + 2 digital I/O lines
Five-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
Full CAN controller:
Fully compliant with CAN rev2.0A and 2.0B
Optimized structure for communication management (via SFR)
15 independent message objects:
Each message object programmable on transmission or reception
individual tag and mask filters up to 29-bit identifier/channel
8-byte cyclic data register (FIFO)/message object
16-bit status & control register/message object
16-bit Time-Stamping register/message object
CAN specification 2.0 part A or 2.0 part B programmable for each message
object
Access to message object control and data registers via SFR
Programmable reception buffer length up to 15 message objects
Priority management of reception of hits on several message objects at the
same time (Basic CAN Feature)
Priority management for transmission
message object overrun interrupt
Supports
Time Triggered Communication
Autobaud and Listening mode
Programmable Automatic reply mode
1 Mbit/s maximum transfer rate at 8MHz* Crystal frequency in X2 mode.
Readable error counters
Programmable link to on-chip Timer for Time Stamping and Network
synchronization
Independent baud rate prescaler
Data, Remote, Error and overload frame handling
On-chip emulation Logic (enhanced Hook system)
Power saving modes:
Idle mode
Power down mode
Power supply: 5V +/- 10% (or 3V** +/- 10%)
Temperature range: Industrial (-40° to +85°C)
Packages: VQFP44, PLCC44, CA-BGA64
Note:
* At BRP = 1 sampling point will be fixed.
** Ask for availability
Enhanced 8-bit
MCU with CAN
controller and
Flash
T89C51CC01
Page view 0
1 2 3 4 5 6 ... 148 149

Summary of Contents

Page 1 - T89C51CC01

Rev. D – 17-Dec-0111. Features• 80C51 core architecture:– 256 bytes of on-chip RAM– 1 Kbytes of on-chip ERAM– 32 Kbytes of on-chip Flash memoryData Re

Page 2

10T89C51CC01Rev. D – 17-Dec-01It is not obvious the last three instructions in this list are Read-Modify-Write instructions.These instructions read th

Page 3

100T89C51CC01Rev. D – 17-Dec-01Table 60. CANIDT2 Register for V2.0 part BCANIDT2 for V2.0 part B(S:BDh)CAN Identifier Tag Registers 2No default value

Page 4

101T89C51CC01Rev. D – 17-Dec-01Table 63. CANIDM1 Register for V2.0 part ACANIDM1 for V2.0 part A(S:C4h)CAN Identifier Mask Registers 1No default value

Page 5

102T89C51CC01Rev. D – 17-Dec-01Table 66. CANIDM4 Register for V2.0 part ACANIDM4 for V2.0 part A(S:C7h)CAN Identifier Mask Registers 4Note: The ID Mas

Page 6

103T89C51CC01Rev. D – 17-Dec-01Table 68. CANIDM2 Register for V2.0 part BCANIDM2 for V2.0 part B(S:C5h)CAN Identifier Mask Registers 2Note: The ID Mas

Page 7

104T89C51CC01Rev. D – 17-Dec-01Table 70. CANIDM4 Register for V2.0 part BCANIDM4 for V2.0 part B(S:C7h)CAN Identifier Mask Registers 4Note: The ID Mas

Page 8

105T89C51CC01Rev. D – 17-Dec-01Table 72. CANTCON RegisterCANTCON (S:A1h)CAN Timer ClockControlReset Value: 00hTable 73. CANTIMH RegisterCANTIMH (S:ADh

Page 9

106T89C51CC01Rev. D – 17-Dec-01Table 75. CANSTMPH RegisterCANSTMPH (S:AFh Read Only)CAN Stamp Timer HighNo default value after resetTable 76. CANSTMPL

Page 10

107T89C51CC01Rev. D – 17-Dec-01Table 78. CANTTCL RegisterCANTTCL(S:A4hReadOnly)CAN TTC Timer LowReset Value: 0000 0000b76543210TIMTTC 7 TIMTTC 6 TIMTT

Page 11

108T89C51CC01Rev. D – 17-Dec-0116. ProgrammableCounter Array PCAThe PCA provides more timing capabilities with less CPU intervention than the standard

Page 12

109T89C51CC01Rev. D – 17-Dec-01Figure 40. PCA Timer/CounterThe CMOD register includes three additional bits associated with the PCA.• The CIDL bit whi

Page 13

11T89C51CC01Rev. D – 17-Dec-015. SFR Mapping The Special Function Registers (SFRs) of the T89C51CC01 fall into the followingcategories:Table 2. C51Cor

Page 14

110T89C51CC01Rev. D – 17-Dec-01Each module in the PCA has a special function register associated with it (CCAPM0 formodule 0 ...). The CCAPM0:4 regist

Page 15

111T89C51CC01Rev. D – 17-Dec-01Figure 42. PCA Capture Mode16.5 16-bit SoftwareTimer ModeThe PCA modules can be used as software timers by setting both

Page 16

112T89C51CC01Rev. D – 17-Dec-0116.6 High Speed OutputModeIn this mode the CEX output (on port 1) associated with the PCA module will toggleeach time a

Page 17

113T89C51CC01Rev. D – 17-Dec-01Figure 45. PCA PWM Mode16.8 PCA WatchdogTimerAn on-board watchdog timer is available with the PCA to improve system rel

Page 18

114T89C51CC01Rev. D – 17-Dec-0116.9 PCA Registers Table 79. CMOD RegisterCMOD (S:D8h)PCA Counter Mode RegisterReset Value = 00XX X000b76543210CIDL WDT

Page 19

115T89C51CC01Rev. D – 17-Dec-01Table 80. CCON RegisterCCON (S:D8h)PCA Counter Control RegisterReset Value = 00X0 0000b76543210CF CR - CCF4 CCF3 CCF2 C

Page 20

116T89C51CC01Rev. D – 17-Dec-01Table 81. CCAPnH RegistersCCAP0H (S:FAh)CCAP1H (S:FBh)CCAP2H (S:FCh)CCAP3H (S:FDh)CCAP4H (S:FEh)PCA High ByteCompare/Ca

Page 21

117T89C51CC01Rev. D – 17-Dec-01Table 83. CCAPMn RegistersCCAPM0 (S:DAh)CCAPM1 (S:DBh)CCAPM2 (S:DCh)CCAPM3 (S:DDh)CCAPM4 (S:DEh)PCA Compare/Capture Mod

Page 22

118T89C51CC01Rev. D – 17-Dec-01Table 84. CH RegisterCH (S:F9h)PCA Counter Register HighvalueReset Value = 0000 00000bTable 85. CL RegisterCL (S:E9h)PC

Page 23

119T89C51CC01Rev. D – 17-Dec-0117. Analog-to-DigitalConverter (ADC)This section describes the on-chip 10 bit analog-to-digital converter of theT89C51C

Page 24

12T89C51CC01Rev. D – 17-Dec-01Table 5. Serial I/O Port SFRsTable 6. PCA SFRsT2CON C8hTimer/Counter 2controlTF2 EXF2 RCLK TCLK EXEN2 TR2 C/T2# CP/RL2#T

Page 25

120T89C51CC01Rev. D – 17-Dec-01Figure 46. ADC DescriptionFigure 47 shows the timing diagram of a complete conversion. For simplicity, the figuredepict

Page 26

121T89C51CC01Rev. D – 17-Dec-01set, an interrupt occur when flag ADEOC is set (see Figure 49). Clear this flag for re-arming the interrupt.ThebitsSCH0

Page 27

122T89C51CC01Rev. D – 17-Dec-0117.6 ADC Standby Mode When the ADC is not used, it is possible to set it in standby mode by clearing bit ADENin ADCON r

Page 28

123T89C51CC01Rev. D – 17-Dec-0117.9 Registers Table 87. ADCF RegisterADCF (S:F6h)ADC ConfigurationReset Value=0000 0000bTable 88. ADCON RegisterADCON

Page 29

124T89C51CC01Rev. D – 17-Dec-01Table 89. ADCLK RegisterADCLK (S:F2h)ADC Clock PrescalerReset Value: XXX0 0000bTable 90. ADDH RegisterADDH (S:F5h Read

Page 30

125T89C51CC01Rev. D – 17-Dec-0118. Interrupt System18.1 Introduction The CAN Controller has a total of 10 interrupt vectors: two external interrupts (

Page 31

126T89C51CC01Rev. D – 17-Dec-01Each of the interrupt sources can be individually enabled or disabled by setting or clear-ing a bit in the Interrupt En

Page 32

127T89C51CC01Rev. D – 17-Dec-0118.2 Registers Table 89. IEN0 RegisterIEN0 (S:A8h)Interrupt Enable RegisterReset Value: 0000 0000bbit addressable765432

Page 33

128T89C51CC01Rev. D – 17-Dec-01Table 90. IEN1 RegisterIEN1 (S:E8h)Interrupt Enable RegisterReset Value: xxxx x000bbit addressable76543210- - - - ETIM

Page 34

129T89C51CC01Rev. D – 17-Dec-01Table 91. IPL0 RegisterIPL0 (S:B8h)Interrupt Enable RegisterReset Value: X000 0000bbit addressable76543210- PPC PT2 PS

Page 35

13T89C51CC01Rev. D – 17-Dec-01Table 7. Interrupt SFRsTable 8. ADC SFRsCCAP0HCCAP1HCCAP2HCCAP3HCCAP4HFAhFBhFChFDhFEhPCA CompareCapture Module 0 HPCA Co

Page 36

130T89C51CC01Rev. D – 17-Dec-01Table 92. IPL1 RegisterIPL1 (S:F8h)Interrupt Priority Low Register 1Reset Value: XXXX X000bbit addressable76543210- - -

Page 37

131T89C51CC01Rev. D – 17-Dec-01Table 93. IPL0 RegisterIPH0 (B7h)Interrupt High Priority RegisterReset Value: X000 0000b76543210- PPCH PT2H PSH PT1H PX

Page 38

132T89C51CC01Rev. D – 17-Dec-01Table 94. IPH1 RegisterIPH1 (S:FFh)Interrupt high priority Register 1Reset Value = XXXX X000b76543210- - - - POVRH PADC

Page 39

133T89C51CC01Rev. D – 17-Dec-0119. Electrical Characteristics19.1 Absolute MaximumRatings(1)19.2 DC Parameters for Standard VoltageTA =-40°Cto+85°C; V

Page 40

134T89C51CC01Rev. D – 17-Dec-01Notes: 1. Operating ICCis measured with all output pins disconnected; XTAL1 driven withTCLCH,TCHCL= 5 ns (see Figure 61

Page 41

135T89C51CC01Rev. D – 17-Dec-01Figure 58. ICCTest Condition, Active ModeFigure 59. ICCTest Condition, Idle ModeFigure 60. ICCTest Condition, Power-Dow

Page 42

136T89C51CC01Rev. D – 17-Dec-01Figure 61. Clock Signal Waveform for ICCTests in Active and Idle Modes19.3 DC Parameters for A/D ConverterTable 94. DC

Page 43

137T89C51CC01Rev. D – 17-Dec-0119.4.2 External ProgramMemory Characteristics Table 95. Symbol DescriptionTable 96. AC Parameters for a Fix Clock (F= 4

Page 44

138T89C51CC01Rev. D – 17-Dec-01Table 97. AC Parameters for a Variable Clock19.4.3 External ProgramMemory Read CycleSymbol TypeStandardClock X2 Clock X

Page 45

139T89C51CC01Rev. D – 17-Dec-0119.4.4 External Data MemoryCharacteristicsTable 98. Symbol DescriptionTable 99. AC Parameters for a Variable Clock (F=4

Page 46

14T89C51CC01Rev. D – 17-Dec-01Table 9. CAN SFRsMnemonicAddName 76543210CANGCON ABh CAN General Control ABRQ OVRQ TTC SYNCTTCAUT-BAUDTEST ENA GRESCANGS

Page 47

140T89C51CC01Rev. D – 17-Dec-01Table 100. AC Parameters for a Variable Clock19.4.5 External Data MemoryWrite CycleSymbol TypeStandardClock X2 Clock X

Page 48

141T89C51CC01Rev. D – 17-Dec-0119.4.6 External Data MemoryRead Cycle19.4.7 Serial Port Timing -Shift Register ModeTable 101. Symbol Description (F= 40

Page 49

142T89C51CC01Rev. D – 17-Dec-01Table 103. AC Parameters for a Variable Clock19.4.8 Shift Register TimingWaveforms19.4.9 External Clock DriveCharacteri

Page 50

143T89C51CC01Rev. D – 17-Dec-0119.4.11 AC TestingInput/Output WaveformsAC inputs during testing are driven at VCC- 0.5 for a logic “1” and 0.45V for a

Page 51

144T89C51CC01Rev. D – 17-Dec-01This diagram indicates when signals are clocked internally. The time it takes the signalsto propagate to the pins, howe

Page 52

145T89C51CC01Rev. D – 17-Dec-0119.5.14 Flash Memory Table 105. Timing Symbol DefinitionsTable 106. Memory AC TimingVDD= 5 V +/- 10% , TA= -40 to +85°C

Page 53

146T89C51CC01Rev. D – 17-Dec-0120. Ordering InformationTable 106. Possible order entriesPart Number Boot LoaderTemperatureRange Package PackingT89C51C

Page 54

iT89C51CC01Rev. D – 17-Dec-01Table of Contents1. Features ...

Page 55

iiT89C51CC01Rev. D – 17-Dec-0114.1 WatchDog Programming ... 6814.2 WatchDog Time

Page 56

© Atmel Corporation 2001.Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company’s standa

Page 57

15T89C51CC01Rev. D – 17-Dec-01Table 10. Other SFRsCANCONH B3h CAN Control Channel CONCH1 CONCH0 RPLV IDE DLC3 DLC2 DLC1 DLC0CANMSG A3h CAN Message Dat

Page 58

16T89C51CC01Rev. D – 17-Dec-01Table 11. SFR’s mappingReservedNotes: 1. These registers are bit-addressable.Sixteen addresses in the SFR space are both

Page 59

17T89C51CC01Rev. D – 17-Dec-016. Clock The T89C51CC01 core needs only 6 clock periods per machine cycle. This feature,called”X2”, provides the followi

Page 60

18T89C51CC01Rev. D – 17-Dec-01Figure 5. Clock CPU Generation DiagramXTAL1XTAL2PDPCON.1CPU Core10÷ 2PERIPHCLOCKClockPeripheral Clock SymbolCPUCLOCKCPU

Page 61

19T89C51CC01Rev. D – 17-Dec-01Figure 6. Mode Switching WaveformsNote: In order to prevent any incorrect operation while operating in the X2 mode, user

Page 62

2T89C51CC01Rev. D – 17-Dec-012. Description The T89C51CC01 is the first member of the CANaryTMfamily of 8-bit microcontrollersdedicated to CAN network

Page 63

20T89C51CC01Rev. D – 17-Dec-01Notes: 1. This control bit is validated when the CPU clock bit X2 is set; when X2 is low, this bithas no effect.Reset Va

Page 64

21T89C51CC01Rev. D – 17-Dec-017. Data Memory The T89C51CC01 provides data memory access in two different spaces:1. The internal space mapped in three

Page 65

22T89C51CC01Rev. D – 17-Dec-017.1 Internal Space7.1.1 Lower 128 Bytes RAM The lower 128 bytes of RAM (see Figure 2) are accessible from address 00h to

Page 66

23T89C51CC01Rev. D – 17-Dec-017.2 External Space7.2.1 Memory Interface The external memory interface comprises the external bus (port 0 and port 2) as

Page 67

24T89C51CC01Rev. D – 17-Dec-01For simplicity, the accompanying figures depict the bus cycle waveforms in idealizedform and do not provide precise timi

Page 68

25T89C51CC01Rev. D – 17-Dec-01Figure 7. Dual Data Pointer Implementation7.3.2 Application Software can take advantage of the additional data pointers

Page 69

26T89C51CC01Rev. D – 17-Dec-017.4 Registers Table 3. PSW RegisterPSW (S:8Eh)Program Status Word Register.Reset Value= 0000 0000bTable 4. AUXR Register

Page 70

27T89C51CC01Rev. D – 17-Dec-01Reset Value= X00X 1100bNot bit addressableTable 5. AUXR1 RegisterAUXR1 (S:A2h)Auxiliary Control Register 1.Reset Value=

Page 71

28T89C51CC01Rev. D – 17-Dec-018. EEPROM DataMemoryThe 2k byte on-chip EEPROM memory block is located at addresses 0000h to 07FFh ofthe XRAM/ERAM memor

Page 72

29T89C51CC01Rev. D – 17-Dec-018.4 Examples ;*F*************************************************************************;* NAME: api_rd_eeprom_byte;* D

Page 73

3T89C51CC01Rev. D – 17-Dec-014. Pin ConfigurationPLCC44P1.3 / AN3 / CEX0P1.2 / AN2 / ECIP1.1 / AN1 / T2EXP1.0 / AN 0 / T2VAREFVAGNDRESETVSSVCCXTAL1XTA

Page 74

30T89C51CC01Rev. D – 17-Dec-018.5 Registers Table 6. EECON RegisterEECON (S:0D2h)EEPROM Control RegisterReset Value= XXXX XX00bNot bit addressable7654

Page 75

31T89C51CC01Rev. D – 17-Dec-019. Program/CodeMemoryThe T89C51CC01 implement 32 Kbytes of on-chip program/code memory. Figure 8shows the partitioning o

Page 76

32T89C51CC01Rev. D – 17-Dec-01Figure 9. External Code Memory Interface StructureTable 7. External Code Memory Interface Signals9.1.2 External Bus Cycl

Page 77

33T89C51CC01Rev. D – 17-Dec-01Figure 10. External Code Fetch Waveforms9.2 FLASH MemoryArchitectureT89C51CC01 features two on-chip flash memories:• Fla

Page 78

34T89C51CC01Rev. D – 17-Dec-019.2.1 FM0 MemoryArchitectureThe flash memory is made up of 4 blocks (see Figure 11):3. The memory array (user space) 32

Page 79

35T89C51CC01Rev. D – 17-Dec-019.3 Overview of FM0operationsThe CPU interfaces to the flash memory through the FCON register and AUXR1register.These re

Page 80

36T89C51CC01Rev. D – 17-Dec-01Table 10. Programming spacesNote: The sequence 5xh and Axh must be executing without instructions between them other-wis

Page 81

37T89C51CC01Rev. D – 17-Dec-01Figure 12. Column Latches Loading ProcedureNote: The last page address used when loading the column latch is the one use

Page 82

38T89C51CC01Rev. D – 17-Dec-01• Launch the programming by writing the data sequence 52h followed by A2h inFCON register (only from FM1).The end of the

Page 83

39T89C51CC01Rev. D – 17-Dec-01Figure 14. Hardware Programming Procedure9.3.7 Reading the FLASHSpacesUser The following procedure is used to read the U

Page 84

4T89C51CC01Rev. D – 17-Dec-01P1.2/AN2P1.4/AN4 P1.0/AN0P1.3/AN3P1.5/AN5P1.1/AN1NCP1.6/AN6NCP1.7/AN7EANCNC NC RESETNC P0.6P0.5P0.7PSENNCNCVDDVSSVAGNDVAR

Page 85

40T89C51CC01Rev. D – 17-Dec-01Figure 15. Reading Procedure9.3.8 Flash Protection fromParallel ProgrammingThe three lock bits in Hardware Security Byte

Page 86

41T89C51CC01Rev. D – 17-Dec-019.4 RegistersFCON RegisterFCON (S:D1h)FLASH Control RegisterReset Value= 0000 0000b76543210FPL3 FPL2 FPL1 FPL0 FPS FMOD1

Page 87

42T89C51CC01Rev. D – 17-Dec-0110. In-System-Programming (ISP)With the implementation of the User Space (FM0) and the Boot Space (FM1) in Flashtechnolo

Page 88

43T89C51CC01Rev. D – 17-Dec-0110.2 Boot Process10.2.1 Software boot processexampleMany algorithms can be used for the software boot process. Before de

Page 89

44T89C51CC01Rev. D – 17-Dec-01Figure 17. Hardware Boot Process Algorithm10.3 Application-Programming-InterfaceSeveral Application Program Interface (A

Page 90

45T89C51CC01Rev. D – 17-Dec-01Table 12. List of API10.4 XROW Bytes Table 13. Xrow mappingAPI CALL DescriptionPROGRAM DATA BYTE Write a byte in flash m

Page 91

46T89C51CC01Rev. D – 17-Dec-0110.5 Hardware SecurityByteTable 14. Hardware Security byteDefault value after erasing chip: FFhNote: Only the 4 MSB bits

Page 92

47T89C51CC01Rev. D – 17-Dec-0111. Serial I/O Port The T89C51CC01 I/O serial port is compatible with the I/O serial port in the 80C52.It provides both

Page 93

48T89C51CC01Rev. D – 17-Dec-01valid stop bits cannot clear the FE bit. When the FE feature is enabled, RI rises on thestop bit instead of the last dat

Page 94

49T89C51CC01Rev. D – 17-Dec-0111.3 Given Address Each device has an individual address that is specified in the SADDR register; theSADEN register is a

Page 95

5T89C51CC01Rev. D – 17-Dec-01Table 1. Pin DescriptionPin Name Type DescriptionVSS GND Circuit ground.VCC Supply Voltage.VAREF Reference Voltage for AD

Page 96

50T89C51CC01Rev. D – 17-Dec-01For 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 mast

Page 97

51T89C51CC01Rev. D – 17-Dec-01Table 16. SADEN RegisterSADEN (S:B9h)Slave Address Mask RegisterReset Value = 0000 0000bNot bit addressableTable 17. SAD

Page 98

52T89C51CC01Rev. D – 17-Dec-01Table 19. PCON RegisterPCON (S:87h)Power Control RegisterReset Value = 00X1 0000bNot bit addressable76543210SMOD1 SMOD0

Page 99

53T89C51CC01Rev. D – 17-Dec-0112. Timers/Counters The T89C51CC01 implements two general-purpose, 16-bit Timers/Counters. Such areidentified as Timer 0

Page 100

54T89C51CC01Rev. D – 17-Dec-01Figure 22. Timer/Counter x (x= 0 or 1) in Mode 012.2.2 Mode 1 (16-bit Timer) Mode 1 configures Timer 0 as a 16-bit Timer

Page 101

55T89C51CC01Rev. D – 17-Dec-0112.2.4 Mode 3 (Two 8-bitTimers)Mode 3 configures Timer 0 such that registers TL0 and TH0 operate as separate 8-bitTimers

Page 102

56T89C51CC01Rev. D – 17-Dec-0112.3.1 Mode 0 (13-bit Timer) Mode 0 configures Timer 1 as a 13-bit Timer, which is set up as an 8-bit Timer (TH1 reg-ist

Page 103

57T89C51CC01Rev. D – 17-Dec-0112.5 Registers Table 20. TCON RegisterTCON (S:88h)Timer/Counter Control RegisterReset Value= 0000 0000b76543210TF1 TR1 T

Page 104

58T89C51CC01Rev. D – 17-Dec-01Table 21. TMOD RegisterTMOD (S:89h)Timer/Counter Mode ControlRegister.Reset Value= 0000 0000b76543210GATE1 C/T1# M11 M01

Page 105

59T89C51CC01Rev. D – 17-Dec-01Table 22. TH0 RegisterTH0 (S:8Ch)Timer 0 High Byte Register.Reset Value= 0000 0000bTable 23. TL0 RegisterTL0 (S:8Ah)Time

Page 106

6T89C51CC01Rev. D – 17-Dec-01P3.0:7 I/OPort 3:Is an 8-bit bi-directional I/O port with internal pull-ups. Port 3 pins that have 1’s written to them ar

Page 107

60T89C51CC01Rev. D – 17-Dec-01Table 25. TL1 RegisterTL1 (S:8Bh)Timer 1 Low Byte Register.Reset Value= 0000 0000b76543210BitNumberBitMnemonic Descripti

Page 108

61T89C51CC01Rev. D – 17-Dec-0113. Timer 2 The T89C51CC01 timer 2 is compatible with timer 2 in the 80C52.It is a 16-bit timer/counter: the count is ma

Page 109

62T89C51CC01Rev. D – 17-Dec-01Figure 27. Auto-Reload Mode Up/Down Counter13.2 ProgrammableClock-OutputIn clock-out mode, timer 2 operates as a 50%-dut

Page 110

63T89C51CC01Rev. D – 17-Dec-01It is possible to use timer 2 as a baud rate generator and a clock generator simulta-neously. For this configuration, th

Page 111

64T89C51CC01Rev. D – 17-Dec-0113.3 Registers Table 26. T2CON RegisterT2CON (S:C8h)Timer 2 Control RegisterReset Value = 0000 0000bBit addressable76543

Page 112

65T89C51CC01Rev. D – 17-Dec-01Table 27. T2MOD RegisterT2MOD (S:C9h)Timer 2 Mode Control RegisterReset Value = XXXX XX00bNot bit addressableTable 28. T

Page 113

66T89C51CC01Rev. D – 17-Dec-01Table 29. TL2 RegisterTL2 (S:CCh)Timer 2 Low Byte RegisterReset Value = 0000 0000bNot bit addressableTable 30. RCAP2H Re

Page 114

67T89C51CC01Rev. D – 17-Dec-0114. WatchDog Timer T89C51CC01 contains a powerful programmable hardware WatchDog Timer (WDT)that automatically resets th

Page 115

68T89C51CC01Rev. D – 17-Dec-0114.1 WatchDogProgrammingThe three lower bits (S0, S1, S2) located into WDTPRG register permit to program theWDT duration

Page 116

69T89C51CC01Rev. D – 17-Dec-01interrupt is pulled high. It is suggested that the WDT be reset during the interrupt servicefor the interrupt used to ex

Page 117

7T89C51CC01Rev. D – 17-Dec-014.2 I/O Configurations Each Port SFR operates via type-D latches, as illustrated in Figure 1 for Ports 3 and 4. ACPU &quo

Page 118

70T89C51CC01Rev. D – 17-Dec-01Table 35. WDTRST RegisterWDTRST (S:A6h Write only)WatchDog Timer EnableregisterReset Value = 1111 1111bNote: The WDRST r

Page 119

71T89C51CC01Rev. D – 17-Dec-0115. Atmel CANControllerThe Atmel CAN Controller provides all the features required to implement the serialcommunication

Page 120

72T89C51CC01Rev. D – 17-Dec-0115.2 CAN ControllerMailbox and RegistersOrganizationThe pagination allows management of the 321 registers including 300(

Page 121

73T89C51CC01Rev. D – 17-Dec-0115.2.1 Working on messageobjectsThe Page message object register (CANPAGE) is used to select one of the 15 messageobject

Page 122

74T89C51CC01Rev. D – 17-Dec-0115.3.1 Buffer mode Any message object can be used to define one buffer, including non-consecutive mes-sage objects, and

Page 123

75T89C51CC01Rev. D – 17-Dec-01Figure 33. CAN Controller interrupt structureTo enable a transmission interrupt:• Enable General CAN IT in the interrupt

Page 124

76T89C51CC01Rev. D – 17-Dec-01To enable an interrupt on general error:• Enable General CAN IT in the interrupt system register,• Enable interrupt on e

Page 125

77T89C51CC01Rev. D – 17-Dec-01Figure 35. General structure of a bit periodexample of bit timing determination for CAN baudrate of 500kbit/s:Fosc = 12

Page 126

78T89C51CC01Rev. D – 17-Dec-0115.6 Fault Confinement With respect to fault confinement, a unit may be in one of the three following status:• error act

Page 127

79T89C51CC01Rev. D – 17-Dec-0115.7 Acceptance filter Upon a reception hit (i.e., a good comparison between the ID+RTR+RB+IDE receivedand an ID+RTR+RB+

Page 128

8T89C51CC01Rev. D – 17-Dec-01Figure 1. Port 1, Port 3 and Port 4 StructureNote: The internal pull-up can be disabled on P1 when analog function is sel

Page 129

80T89C51CC01Rev. D – 17-Dec-0115.8 Data and RemoteframeDescription of the different steps for:•Dataframe,• Remote frame, with automatic reply,• Remote

Page 130

81T89C51CC01Rev. D – 17-Dec-0115.9 Time TriggerCommunication (TTC)and Message StampingThe T89C51CC01 has a programmable 16-bit Timer (CANTIMH&CANT

Page 131

82T89C51CC01Rev. D – 17-Dec-0115.10 CAN Autobaud andListening modeTo activate the Autobaud feature, the AUTOBAUD bit in the CANGCON register mustbe se

Page 132

83T89C51CC01Rev. D – 17-Dec-01// Enable the CAN macroCANGCON = 02h2. Configure message object 3 in reception to receive only standard (11-bit identi-f

Page 133

84T89C51CC01Rev. D – 17-Dec-01// Find the first message object which generate an interrupt in CANSIT1 andCANSIT2// Select the corresponding message ob

Page 134

85T89C51CC01Rev. D – 17-Dec-0115.12 CAN SFR’s Table 37. CAN SFR’s with reset values0/8(1)1/9 2/A 3/B 4/C 5/D 6/E 7/FF8hIPL1xxxx x000CH0000 0000CCAP0H0

Page 135

86T89C51CC01Rev. D – 17-Dec-0115.13 Registers Table 38. CANGCON RegisterCANGCON (S:ABh)CAN General Control RegisterReset Value: 0000 0x00b7654 3210ABR

Page 136

87T89C51CC01Rev. D – 17-Dec-01Table 39. CANGSTA RegisterCANGSTA (S:AAh)CAN General Status RegisterNote: 1. These fields are Read Only.Reset Value: x0x

Page 137

88T89C51CC01Rev. D – 17-Dec-01Table 40. CANGIT RegisterCANGIT (S:9Bh)CAN General InterruptNote: 1. These fields are Read Only.Reset Value: 0x00 0000b7

Page 138

89T89C51CC01Rev. D – 17-Dec-01Table 41. CANTEC RegisterCANTEC (S:9Ch Read Only)CAN Transmit Error CounterReset Value: 00hTable 42. CANREC RegisterCANR

Page 139

9T89C51CC01Rev. D – 17-Dec-01Figure 3. Port 2 StructureNotes: 1. Port 2 is precluded from use as general purpose I/O Ports when as address/data busdri

Page 140

90T89C51CC01Rev. D – 17-Dec-01Note: see Figure 33Reset Value: xx00 000xbTable 44. CANEN1 RegisterCANEN1 (S:CEh Read Only)CAN Enable message objectRegi

Page 141

91T89C51CC01Rev. D – 17-Dec-01Table 45. CANEN2 RegisterCANEN2 (S:CFh Read Only)CAN Enable message objectRegisters 2Reset Value: 0000 0000bTable 46. CA

Page 142

92T89C51CC01Rev. D – 17-Dec-01Table 47. CANSIT2 RegisterCANSIT2 (S:BBh Read Only)CAN Status Interrupt messageobject Registers 2Reset Value: 0000 0000b

Page 143

93T89C51CC01Rev. D – 17-Dec-01Table 49. CANIE2 RegisterCANIE2 (S:C3h)CAN Enable Interrupt messageobject Registers 2Reset Value: 0000 0000bTable 50. CA

Page 144

94T89C51CC01Rev. D – 17-Dec-01Table 51. CANBT2 RegisterCANBT2 (S:B5h)CAN Bit Timing Registers 2Note: The CAN controller bit timing registers must be a

Page 145

95T89C51CC01Rev. D – 17-Dec-01Table 52. CANBT3 RegisterCANBT3 (S:B6h)CAN Bit Timing Registers 3Note: The CAN controller bit timing registers must be a

Page 146

96T89C51CC01Rev. D – 17-Dec-01Table 53. CANPAGE RegisterCANPAGE (S:B1h)CAN message object PageRegisterReset Value: 0000 0000bTable 54. CANCONCH Regist

Page 147

97T89C51CC01Rev. D – 17-Dec-01No default value after resetTable 55. CANSTCH RegisterCANSTCH (S:B2h)CAN message object StatusRegister3-0 DLC3:0Data len

Page 148

98T89C51CC01Rev. D – 17-Dec-01Note: See Figure 33.No default value after reset.Table 56. CANIDT1 Register for V2.0 part ACANIDT1 for V2.0 part A(S:BCh

Page 149

99T89C51CC01Rev. D – 17-Dec-01Table 58. CANIDT3 Register for V2.0 part ACANIDT3 for V2.0 part A(S:BEh)CAN Identifier Tag Registers 3No default value a

Comments to this Manuals

No comments