Renesas R8C/17 Guide de l'utilisateur

Naviguer en ligne ou télécharger Guide de l'utilisateur pour Mise en réseau Renesas R8C/17. Renesas R8C/17 User guide Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer

Résumé du contenu

Page 1 - SmartBook

1SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comSmartBookforRenesas R8C/Tiny MicrocontrollersR8C/Tiny Micon

Page 2

3SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comcore and the peripherals of H8 family. Initially R8C/Tiny devices were made availa

Page 3

4SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com1.3 Overview of R8C/Tiny Family:• CPU: M16C Core with Register based architecture.

Page 4 - Contents

5SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com1.4 R8C/Tiny Architecture:As you already know, R8C/Tiny CPU is compatible with oth

Page 5

6SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comA0 and A1 for manipulating address generation. Theseregisters are meant for differ

Page 6

7SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comCarry (C) Flag: This flag retains a carry, borrow or shift out bit that has occurr

Page 7

8SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comInterrupt Table Register (INTB): This 20-bit registercontains the address of an in

Page 8

9SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comFollowing is the address scheme for the memory organization. As you can see,the RA

Page 9

10SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comfirst mode (E/W=0) is selected, the built in programmingkernel is transferred to

Page 10

11SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 2. Clock Generating Mechanism2.1 Introduction:R8C/Tiny microcontrollers s

Page 11

12SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comclock to the high speed main clock source. This versatileclock generating circui

Page 12

2SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comSmartBookforRenesas R8C/Tiny Microcontrollers

Page 13

13SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comDuring stop mode, all clocks including the main clock are turned off.2.3 On Chip

Page 14

14SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comIf the main clock stops oscillating when the OCD1 to OCD0bits in the OCD register

Page 15

15SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThese different operating modes aremanaged by proper initialization in fewselecte

Page 16

16SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com2.7 Wait Mode:Getting into the wait mode is as easy as executingthe WAIT instruct

Page 17

17SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comLike wait mode, to exit from this stopmode, a hardware reset or a peripheralfunct

Page 18

18SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThe R8C/Tiny controllers sport a versatile resetfacility to keep the controller w

Page 19

19SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.cominternal reset condition is exited and the program is executed beginning with the

Page 20

20SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comLike the Hardware Reset 2, the internal counter countslow speed on chip oscillato

Page 21

21SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comApart from VC27 of Voltage Detection Register 2, following bits play importantrol

Page 22

22SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comVoltage Detection Circuit should be enabled (set VC27 of VCR2 to 1)Voltage Detect

Page 23

3SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comwww.MightyMicons.comPhone : 0091 427 2449238 / 3209844 Fax : 0091 427 2431312

Page 24

23SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 3. Instruction Set3.1 Introduction:In this chapter, we are going to discu

Page 25

24SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com3.3 Instruction Set:The instruction set of the R8C/Tiny contains 89 discreet inst

Page 26

25SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comDecimal add with carry (DADC) Unsigned multiply (MULU) Decimal add without carry

Page 27

26SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com3.8 Bit Manipulation (14):Logically AND bits (BAND) Exclusive OR inverted bits (B

Page 28

27SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comInterrupt on overflow (INTO) Save context (STCTX) Transfer to control register (L

Page 29

28SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comDADD instructions do an arithmetic addition on BCDcoded data and keeps the result

Page 30

29SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com3.12 String Move Forward (SMOVF):This instruction transfer a data string from a 2

Page 31

30SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comcontrollers sport a special instruction to save manyregisters using a single inst

Page 32 - 3.7 Branch (8):

31SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThere is a complementary instruction, Load Context, LDCTX, also available tocompl

Page 33 - 3.10 Control/Other (19):

32SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comtakes more code space, varying from two to eight bytes. Onthe other hand, the zer

Page 34

89SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comContentsChapter 1 R8C/Tiny Architecture1.1 Introduction ...

Page 35

33SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThe facility to define the required instructions in different formats seems like

Page 36

34SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com

Page 37

35SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 4. Addressing Modes4.1 Introduction:The facility to define the data that

Page 38

36SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThese registers can be used individually or can be combined to form bigger sizeof

Page 39

37SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comto generate the effective address. In other two relative addressing modes, thedis

Page 40

38SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThe address registers A0 and A1 are joined together togenerate a 32 bit address w

Page 41

39SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comFollowing are the options available toaccess different bit positions:1. Register

Page 42

40SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comthe target bit in the device memory. Bits at the address range 00000H to 01FFFHca

Page 43

41SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.combit can be located either above or below the address indicated by FB.When using F

Page 44

42SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comWith the help of therich vocabulary, anyone can easily createa classical workwith

Page 45

90SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 3 Instruction Set3.1 Introduction ...

Page 46

43SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 5. Interrupt Mechanism5.1 Introduction:Interrupt facilities of the target

Page 47

44SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.cominitiated. These interrupts also belong to thehardware group. A few of the contro

Page 48

45SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com5.2.1 Undefined Instruction Interrupt.The micon generates an interrupt when execu

Page 49

46SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comWhen any of these software interrupts in the range 0-31 is executed, the U flag i

Page 50

47SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comthe bits AIER0 or AIER1 of theregister, AIER. When this bit is setto one, the cor

Page 51

48SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com5.5 Interrupt Control.In general, you need to study the operations ofthe micon’s

Page 52

49SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comNow, we need to go back to interrupt sequence to know more about the workingsof t

Page 53

50SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comall the interrupts are engaged or not available for further use.The D flag is cle

Page 54

51SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com5.5.1 Saving the Registers in the InterruptSequence.The controller saves the cont

Page 55

52SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comAs you know well, the interrupts levels of the maskable interrupts meant for thed

Page 56

91SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 5 Interrupt Mechanism5.1 Introduction ...

Page 57

53SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comAnalog to Digital Converter.INT2.UART1 Transmission.UART0 Transmission.Key Input.

Page 58

54SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.cominterrupts are controlled by the KEIN register, which keepsthe details like inter

Page 59

55SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 6. Ports, Data Converters and Communication Facilities6.1 Introduction:As

Page 60

56SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comPort data registers are the intermediate stage between theCPU and the port lines

Page 61

57SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comAnalog Input range : 0V to Vref.Operating modes : One shot and Repeat modes.Sampl

Page 62

58SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThe result of A/D conversion is available in the 16 bit ADregister.The operation

Page 63

59SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com6.32 Clock Asynchronous Serial Mode.• Data Length: 7 or 8 or 9 bits with one or t

Page 64

60SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comUnder this mode, each receiving processor is addressed by an ID. A serialcommunic

Page 65

61SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com6.4.1 IIC Bus Interface.• Selectable master or slave modes.• Continuous transmit

Page 66 - Clock Synchro

62SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com

Page 67

92SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 7 Timer/Counter Functions7.1 Introduction ...

Page 68 - SSU Bus interface: Maxi

63SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 7. Timer/Counter Functions7.1 Introduction:The Timer and Counter function

Page 69

64SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comProgrammable one shot generation mode: This mode generates a one shotpulse under

Page 70

65SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com7.2 Timer Mode:Most of the timers of the R8C/Tiny have this mode. This helps the

Page 71

66SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comprescalar down. When the prescalar underflows, the countvalue of the timer regist

Page 72

67SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThe event counter mode is available inTimer X and Timer RA. The external sig-nal

Page 73

68SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com7.5 Pulse Period Measurement Mode:This mode of operation is similar to the pulse

Page 74

69SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comtion, the initial state of the output pin,CNTR0, can be defined to meet the re-qu

Page 75

70SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comters. Because of this facility, square waveform with differ-ent primary and secon

Page 76

71SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comFor the hardware trigger signal, the polarity can also be selected either as risi

Page 77

72SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comUnder this mode, the 16 bit timer is initialized to operate in free running count

Page 78 - Input capture mode

1SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 1. R8C/Tiny Architecture1.1 Introduction:Microcontrollers, an inevitable

Page 79

73SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comNow, we discuss the operation of this timerusing Timer C as reference.As you know

Page 80

74SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com7.12 PWM Mode of Timer RD:When the timers of R8C/Tiny micon are config-ured under

Page 81

75SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.commatch functions of the RD timer. Each of the compare registers has its own portli

Page 82

76SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThe status of all these compare match operations are indicated by the corre-spond

Page 83

77SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comInitially, both the PWM output pins are in the inactive levels. First, both TRDGR

Page 84

78SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comTo get the required PWM signals properly, the fol-lowing conditions are to be met

Page 85 - Reset Synchro

79SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comThe period of the PWM signal is 1/fk * ( m+1) where m is the count value kept int

Page 86

80SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comWhenever the contents of the timer register, TRD0,matches with the contents of th

Page 87 - PWM mode

81SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.compare match register, TRDGRA0 and then get decremented for the next PWM pe-riod as

Page 88

82SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comWhen the contents of registers, TRD0 and TRDGRA0 matches, the timer regis-ters st

Page 89

2SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comevery designer should find an optimized device for the targetproject. For the novi

Page 90 - Real time

83SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com7.16 Real Time Clock:Real time clock function is available with the timer RE and

Page 91

84SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com

Page 92 - 8.1 R8C/Tiny Micon Roadmap:

85SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comChapter 8. R8C/Tiny Micon Information8.1 R8C/Tiny Micon Roadmap:

Page 93 - 8.3 R8C/20-23 Group Features:

86SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com8.2 R8C/18-1B Group Features:8.3 R8C/20-23 Group Features:

Page 94 - 8.5 R8C/26-29 Group Features:

87SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com8.4 R8C/24-25 Group Features:8.5 R8C/26-29 Group Features:

Page 95 - 8.6 R8C/2A-2D Group Features:

88SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.com8.6 R8C/2A-2D Group Features:

Page 96

4SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comSupplementary Information for the SmartBook.Kindly Keep visiting the following sup

Page 97

5SmartBook for Renesas R8C/Tiny Microcontrollerswww.MightyMicons.comwww.MightyMicons.com

Commentaires sur ces manuels

Pas de commentaire