SH7147 APPLICATION NOTE. Resolver Built-in DC Brushless Motor Control. 1. Abstract. 2. Introduction. 2.1 Specification

Size: px
Start display at page:

Download "SH7147 APPLICATION NOTE. Resolver Built-in DC Brushless Motor Control. 1. Abstract. 2. Introduction. 2.1 Specification"

Transcription

1 APPLICATION NOTE SH747. Abstract This application note is organized based on sample of resolver built-in DC brushless motor control, which uses SH747 embedded ADC_0, MTU2S_3,4, and CMT_0,, and is aimed to provide information users may need during software and hardware design. Although the operation of each program in this application note has been checked, make sure that you conduct your own operation checks before actually using. 2. Introduction 2. Specification () System Architecture Specification Figure describes system architecture of this control. SH747 is used as motor control MCU. M5934 is used as step-up predriver for inverter driver Six H7N0602LS (power MOS FET) is used as 3-phase inverter (2) Motor Control Specification Resolver built-in DC brushless motor is controlled in 20-degree energization drive system. Resolver output signal is converted to digital at ADC_0 and motor position is detected at every 30 degree. Motor drive wave most suitable to motor position will be outputted from MTU2S (level output on positive phase side, PWM output on antiphase side) Motor revolving direction reverses at every 4[sec]. REJ05B /Rev Page of 55

2 Motor control MCU SH747 MTU2S_3,4 TIOC3BS (U-phase) TIOC3DS (*U-phase) TIOC4AS (V-phase) TIOC4CS (*V-phase) TIOC4BS (W-phase) TIOC4DS (*W-phase) CMT_0, Predriver M5934 UT (U-phase) VT (V-phase) WT (W-phase) UB (*U-phase) VB (*V-phase) 3-Phase inverter H7N0602LS DC brushless motor WB (*W-phase) ADC_0 AN0 (resolver excitation) AN (resolver sin wave) AN2 (resolver cos wave) Resolver excitation signal generation circuit Resolver * Note: *U-phase, *V-phase, and *W-phase describes antiphase of each phase Figure Overview of System REJ05B /Rev Page 2 of 55

3 2.2 Functions Used Multi-function Timer pulse Unit 2S channel 3,4 (MTU2S_3,4) A/D converter 0 (ADC_0) Compare Match Timer channel 0, (CMT_0,) SH Applicable Conditions MCU : SH747(R5F7474AK64FPV) Operation Frequency : Internal Clock 64MHz : Bus Clock 32MHz : Peripheral Clock 32MHz : MTU2S Clock 64MHz : MTU2 Clock 32MHz C Compiler : Renesas Technology product SuperH RISC engine Family C/C++ compiler package Ver.9.00 Compile Option : Default setting by HEW 2.4 Related Application Note Power MOS FET Application Note REJ05B /Rev Page 3 of 55

4 3. Description of Control Sample This control sample determines motor position by A/D converting output signal of resolver, which is built in DC brushless motor. A motor drive wave, most suitable to the determined mortar position, will be output from MTU2S and controls DC brushless motor. 3. Overview of Entire Operation Following describes functions used by SH747 for controlling resolver built-in DC brushless motor (Figure 2.) SH747 Function Assignment CMT_0 Compare match interrupt function CMT_ Compare match interrupt function Motor position information ADC_0 A/D conversion end interrupt AN0 AN AN2 Resolver excitation wave Resolver output Sin wave Resolver output Cos wave Assigns motor revolving direction changing timing MTU2S_3,4 Assigns motor drive waveform switch timing CPU Assigns motor drive output wave TIOC3BS (U-phase) TIOC3DS (*U-phase) TIOC4AS (V-phase) TIOC4CS (*V-phase) TIOC4BS (W-phase) TIOC4DS (*W-phase) Complementary PWM output function Output motor drive wave (Connect to predriver M5934) Note: *U-phase, *V-phase, and *W-phase describes antiphase of each phase. Figure 2 SH747 Control Block Diagram Following describes each function. A/D Conversion End Interrupt: After conversing resolver input excitation signal, resolver output Sin wave signal, and resolver output Cos wave signal into digital, it requests CPU for interrupt. A/D conversion result is stored to RAM by interrupt procedure. Compare Match Interrupt Function (CMT_0): Request CPU for interrupt at every 50μ[sec]. Interrupt procedure determines motor position and outputs motor drive wave. Compare Match Interrupt Function (CMT_): Request CPU for interrupts at every 0.8[sec] Interrupt procedure counts number of interrupting times and reverses motor revolving direction at every 5 interrupts process. (reverse motor revolving direction at every 0.8[sec] x 5 = 4[sec]) Complementary PWM Output Function: Level output on positive phase side and chopping wave output on antiphase side. REJ05B /Rev Page 4 of 55

5 3.2 Description of Functions Used SH747 [] A/D Converter (a) Overview of A/D converter (ADC) operation Resolver input excitation signal, resolver output Sin wave signal, and resolver output Cos wave signal are input from analog input pin 0,,2 (AN0, AN, and AN2) respectively. Input voltage of AN0 to 2 are sampled at a same timing at sample & hold circuit (the step before analog multiplexer) and A/D converted sequentially. The operation mode is continuous scan mode. Figure 3 describes ADC_0 block diagram. AVcc AVss AVrefh AVrefl 2bit D/A approximation register Successive ADDR0 ADDR ADDR2 ADDR3 ADDR4 ADDR5 ADDR6 ADDR7 Synchronous sampling AN0 (Resolver excitation signal) AN (Resolver output Sin wave) AN2 (Resolver output Cos wave) AN3 AN4 AN5 Sample & hold circuit Sample & hold circuit Sample & hold circuit Impedance conversion circuit Impedance conversion circuit Impedance conversion circuit Analog multiplexer Sample & hold circuit Converter + - Control circuit ADCR_0 ADANSR_0 ADSR_0 ADSTRGR_0 Data bus within Module Bus I/F AN6 AN7 Impedance conversion circuit Impedance conversion circuit ADDR0 to 7 : A/D Data Register 0 to 7 ADCR_0 : A/D Control Register_0 ADANSR_0 : A/D Analog Input Channel Select Register_0 ADSR_0 : A/D Status Register_0 ADSTRGR : A/D Start Trigger Select Register Offset cancel circuit A/D conversion end interrupt signal ADI_3 Trigger signal from MTU2 TRGAN TRGON TRG4AN TRG4BN Trigger signal from MTU2S TRGAN TRG4AN TRG4BN External trigger signal ADTRG Internal data bus Figure 3 ADC_0 Block Diagram REJ05B /Rev Page 5 of 55

6 (b) Overview of Resolver Following describes resolver in motor position detection sensor, implemented in this system (Figure 4.) A coil is fixed on the rotor, and two coils are fixed 90 degree of each other on the stator. When resolver input excitation signal (Vr) is inputted, resolver output Sin wave (V sin ) and resolver output Cos wave (V cos ), which has 90 degree phase difference, are outputted from two coils on the stator. Rotor Stator Input Signal Resolver excitation signal Vr = Vs Sin(ωt) Output Signal Resolver output Cos wave Vcos = Vs Sin(ωt) Vr Cosθ Stator Output Signal Resolver output Sin wave Vsin = Vs Sin(ωt) Vr Sinθ Vs = Input Voltage ω = Angular Speed of Excitation θ = Motor Rotation Angle Figure 4 Diagram of Resolver Principle REJ05B /Rev Page 6 of 55

7 (c) Resolver Input/Output Signal and Motor Rotation Position Figure 5 describes resolver input excitation signal, resolver output Sin wave, and resolver output Cos wave per revolution of the motor. One motor revolution is equivalent to one cycle of Sin waveform and Cos waveform obtained from resolver output Sin wave and resolver output Cos wave. Resolver Input Excitation Signal Resolver Output Sin Wave Sin Sin waveform Resolver Output Cos Wave Motor Rotation Position Cos Cos waveform Figure 5 Resolver Input/Output Signal and Sin wave/ Cos wave (per motor revolution) (d) Obtaining Sin waveform/ Cos waveform from each Resolver Output wave Resolver output Sin wave/ Cos wave can be described in following formula, as been shown in Figure 4 Diagram of Resolver Principle. Resolver Output Sin Wave Signal: V sin = VsSin(ωt)VrSinθ Resolver Output Cos Wave Signal: V cos = VsSin(ωt)VrCosθ If resolver input excitation signal (VsSin(ωt)) is regarded as constant, Resolver Output Sin Wave Signal: V sin = ASinθ Resolver Output Cos Wave Signal: V cos = ACosθ A : VsVrSin(ωt) REJ05B /Rev Page 7 of 55

8 Sin/Cos waveform can be obtained from above. Following describes how to obtain Sinθ and Cosθ from resolver output Sin wave signal and resolver output Cos wave signal with regarding resolver input excitation signal as constant. (i) In this control sample, voltage of resolver input excitation signal (VsSin(ωt)) is kept constant to have above A to be constant. A can be regarded as amplitude of resolver output signal. For this amplitude to have the maximum value, the voltage of resolver input signal for achieving the maximum amplitude of resolver output signal shall be obtained in beforehand by examining resolver input/output signal waveform and shall be defined as the reference value. (ii) Voltage of resolver input excitation signal, resolver output Sin wave signal, and resolver output Cos wave signal are sampled at a same time and are A/D converted in continuous conversion mode. (iii)when A/D conversion result of resolver input excitation signal and the reference voltage defined at (i) matches, in other words, when amplitude of resolver output signal becomes maximum, A/D conversion result of two output signals, ASinθ and ACosθ, are stored to RAM. To look f or the v oltage to achiev e maximum amplitude of the output signal, A/D conv ersion result of resolv er input excitation signal and ref erence v oltage shall are A/D compared at all time. Resolver Input Excitation Signal (Vr) (Vr) Resolver Output Sin Sin Wave (V (V sin ) sin ) Sin A/D conversion value of resolver output Sin wav e is stored into A/D RAM RAM. Resolver Output Cos Wave (V Cos (V cos ) cos ) A/D conversion value of resolver Cos output Cos wav e is stored into A/D RAM RAM. Figure 6 RAM Storage Timing of Resolver Output Signal REJ05B /Rev Page 8 of 55

9 In this control sample, resolver input excitation signal cycle is set 900μ[sec] and motor rotation speed is set 300[rpm] (200m[sec]/revolution). There are about 222 resolver input excitation signal cycles per motor revolution. As shown in Figure 6, Sinθ and Cosθ can be achieved once in one resolver input excitation signal cycle. Therefore, Sinθ and Cosθ can be achieved 222 times per one motor revolution and motor position can be detected per approximately.6 degree (360 degree/222) (A/D conversion error not regarded). As for this control sample requires motor position information per 30 degree,.6 degree motor positioning meets the requirement. (e) Motor Position Determination Following describes how to calculate an angle from Sin waveform/ Cos waveform achieved from resolver input/output signal. As for this sample controls motor in 20-degree energization method, it captures motor position information for each 30 degree. Figure 7 describes relation between motor position and Sin waveform/ Cos waveform. Voltage.700[V] Sin waveform Cos waveform.000 [V] Motor Position [V] Area () (2) (3) (4) (5) (6) (7) (8) (9) (0) () (2) Figure 7 Motor Position and Sin Waveform/ Cos Waveform Motor position can be determined from Sin waveform/cos waveform with defining following provision. Area (): Cosθ > Cos30 & Sinθ > 0 Area (7): Cosθ > Cos50 & Sinθ < 0 Area (2): Sin60 > Sinθ > Sin30 & Cosθ > 0 Area (8): Sin20 > Sinθ > Sin240 & Cosθ < 0 Area (3): Sinθ > Sin60 & Cosθ > 0 Area (9): Sinθ > Sin240 & Cosθ < 0 Area (4): Sinθ > Sin60 & Cosθ < 0 Area (0):Sinθ > Sin240 & Cosθ > 0 Area (5): Sin60 > Sinθ > Sin30 & Cosθ < 0 Area ():Sin20 > Sinθ > Sin240 & Cosθ > 0 Area (6): Cosθ > Cos50 & Sinθ > 0 Area (2):Cosθ > Cos330 & Sinθ < 0 REJ05B /Rev Page 9 of 55

10 Following describes data comparing Sin waveform/cos waveform. SH747 Analog input voltage of this control sample is maximum of.7[v], minimum of 0.3[V], and intermediate of.0[v]. Avref is set to 5.0[V]. As for motor is positioned by 30 degrees, voltage for comparing Sin/Cos waveform and constant to be compared is defined as Table. Table Voltage of Sin/Cos waveform and Comparison Value Sin270, Cos80 Sin240, Sin300, Cos50, Cos20 Sin20, Sin330, Cos20, Cos240 Voltage [V] Compared constant H'0F5 H'42 H'23 Sin60, Sin20, Cos30, Cos330 Sin30, Sin50, Cos60, Cos300 Sin0, Cos90, Sin80, Cos270 Voltage [V] Compared constant H'332 H'45 H'522 Sin90, Cos0 Voltage [V].7 Compared constant H'570 REJ05B /Rev Page 0 of 55

11 Flowchart for actually determining motor position by this controller is described in Figure 8. Start Sin wave > Sin60 Yes Cos wave > Sin330 Yes No Cos wave > Cos90 Yes No Sin wave > Sin0 Yes No No Motor position: [Area (4)] Motor position: [Area (3)] Motor position: [Area (2)] Motor position: 0-30 [Area ()] Sin wave > Sin240 Yes Sin wave > Sin0 Yes No Cos wave > Cos270 Yes No Cos wave > Cos90 Yes No No Motor position: [Area (9)] Motor position: [Area (0)] Motor position: [Area (5)] Motor position: [Area (2)] Cos wave > Cos50 Yes Cos wave > Cos270 Yes No Sin wave > Sin80 Yes No Motor position: [Area ()] No Motor position: [Area (7)] Motor position: [Area (6)] Motor position: [Area (8)] Figure 8 Motor Position Determining Flow REJ05B /Rev Page of 55

12 (f) Principle of A/D Converting Operation Figure 9 describes principle of A/D converting operation. Table 2 shows details of software and hardware processing. ADST bit is set to by software and executes A/D conversion in continuous scan mode. Following are processed by A/D conversion end interrupt. When A/D conversion result of resolver input excitation signal meets the condition described in Figure 6, A/D conversion result of resolver output Sin/Cos wave signal will be stored to RAM. When Figure 6 condition meets (when Sinθ and Cosθ are defined) for the first time, compare match interrupt by compare match timer_0 is enabled. (Compare match timer_0 (CMT_0) interrupt processing (output motor drive wave) is executed after motor position is defined.) ADST (A/D conversion start) Conversion AN0 wait (Resolver excitation signal) Conversion AN wait (Resolver output Sin wave) S S Synchronous sampling OFC A/D H conversion () OFC H H Conversion wait A/D conversion () Conversion wait S S Synchronous sampling OFC A/D H conversion (2) OFC H H Conversion wait A/D conversion (2) Conversion wait S S Synchronous sampling OFC A/D H conversion OFC H H Conversion AN2 wait (Resolver output Cos wave) S OFC H H A/D conversion () S OFC H H A/D conversion (2) OFC S H H ADDR ADDR ADDR A/D conversion result (AN0) () A/D conversion result (AN2) () A/D conversion result (AN0) (2) A/D conversion result (AN) A/D conversion result (AN) () (2) A/D conversion result (AN2) (2) ADF (A/D conversion end) Process () Process (2) Process (3) Process (4) Process (3) Process (4) Process (3) OFC : Offset Cancel Process S : Sampling H : Holding Figure 9 A/D Conversion Operation in Continuous Scan Mode REJ05B /Rev Page 2 of 55

13 Table 2 Details of Software/Hardware process for A/D Conversion Software Process Process () After releasing AD_0 module stop, followings are set Set continuous scan mode by setting ADCS bit to Select AN0 to 2 as input channel by setting ANS0-2 to Enable A/D conversion end interrupt (ADI_3) by setting ADIE bit to SH747 None Process (2) Set A/D conversion start by setting ADST bit to Start A/D conversion Hardware Process Process (3) None Sample AN0-2 synchronously and execute A/D Process (4) Transfer A/D conversion result of AN0 (resolver input excitation signal) to RAM If A/D conversion result of AN0 meets the condition (please refer figure 6), following are executed. () Store A/D conversion result of AN (resolver output Sin wave) and AN2 (resolver output Cos wave) to RAM. (2) When condition meets for the first time, CMT_0 compare match interrupt is enabled. Clear ADF to 0. conversion Store A/D conversion result sequentially to ADDR0-2 Set ADF to. A/D conversion end interrupt been generated (ADI_3). REJ05B /Rev Page 3 of 55

14 [2] MTU2S (g) Overview of MTU2S Operation Complementary PWM wave of three positive phase and three antiphase are outputted by using channel 3 and channel 4 of MTU2S. Operation mode is complementary PWM mode. Correlation between UF bit, VF bit, and WF bit of timer gate control register S (TGCRS) and output level is shown in Table 3. (active level is set Low in this sample) UF bit, VF bit, and WF bit are switched by software depending on motor revolving direction and motor position, and then motor drive wave is outputted (Figure 0). Table 3 TGCRS (UF, VF, WF bit) and Output Level Bit 2 Bit Bit 0 Function WF VF UF TIOC3BS TIOC4AS TIOC4BS TIOC3DS TIOC4CS TIOC4D U-phase V-phase W-phase *U-phase *V-phase *W-phase OFF OFF OFF OFF OFF OFF 0 0 ON OFF OFF OFF OFF ON 0 0 OFF ON OFF ON OFF OFF 0 OFF ON OFF OFF OFF ON 0 0 OFF OFF ON OFF ON OFF 0 ON OFF OFF OFF ON OFF 0 OFF OFF ON ON OFF OFF OFF OFF OFF OFF OFF OFF REJ05B /Rev Page 4 of 55

15 TGCRS UF bit VF bit WF bit Motor Drive Output Wave TIOC3BS (U-phase) TIOC3DS (*U-phase) TIOC4AS (V-phase) TIOC4CS (*V-phase) TIOC4BS (W-phase) TIOC4DS (*W-phase) Motor Position When clockwise of rotation axis (CW) When counterclockwise of rotation axis (CCW) * Active level of both positive phase and antiphase are Low Hardware Process Output motor drive wave from TIOC3BS, TIOC3DS, TIOC4AS, TIOC4CS, TIOC4BS, and TIOC4DS Software Process Switch TGCRS (UF/VF/WF bit) depending to motor position Figure 0 Motor Drive Wave by TGCRS (UF, VF, WF bit) Switch REJ05B /Rev Page 5 of 55

16 (h) Duty Setting Figure describes MTU2S (ch3, ch4) in complementary PWM mode and duty setting is explained after it. Timer Gate Control Register S (TGCRS) U-phase, *U-phase Duty setting Timer General Register D_3 (TGRD_3S) Temporary Register S (TempS) Timer General Register B_3S (TGRB_3S) V-phase, *V-phase Duty setting Timer General Register C_4S (TGRC_4S) Temporary Register 2S (Temp2S) TIOC3BS (U-phase) W-phase, *W-phase Duty setting Timer General Register D_4S (TGRD_4S) Timer Counter_3S (TCNT_3S) Timer Counter_4S (TCNT_4S) Timer General Register A_4S (TGRA_4S) Temporary Register 3S (Temp3S) Timer General Register B_4S (TGRB_4S) Comparator Compare match signal Output Controller TIOC3DS (*U-phase) TIOC4AS (V-phase) TIOC4CS (*V-phase) TIOC4BS (W-phase) Set dead time Timer Sub-Counter S (TCNTSS) Timer Dead Time Data Register S (TDDRS) TIOC4DS (*W-phase) Set PWM cycle Timer Cycle Buffer Register S (TCBRS) Timer Cycle Data Register (TCDRS) Set TCNT_3S upper limit Timer General Register C_3S (TGRC_3S) Timer General Register A_3S (TGRA_3S) Note: *U-phase, *V-phase, and *W-phase are antiphase of each phase. Figure Block Diagram when in Complementary PWM Mode (Channel 3/4) [Notes] CPU cannot directly access Temporary Register (TempS, 2S, 3S) Write into TGRB_3S, TGRA_4S, TGRB_4S, TGRA_3S, and TCDRS are prohibited during timer operation. When write into above listed register during timer operation is necessary, please write into their buffer register TGRD_3S, TGRC_4S, TGRD_4S, TGRC_3S, and TCBRS. REJ05B /Rev Page 6 of 55

17 Following describes duty setting. This control sample outputs PWM only for antiphase. Level output is made for positive phase. Duty is determined by setting values of TGRB_3S, TGRA_4S, and TGRB_4S. Motor drive current changes by changing duty setting, and it allows changing motor torque and speed. Figure 2 describes operation principle and Table 4 shows details of software/hardware process. PWM Cycle Process (3) TGRA_3S TCNTSS TCDRS Process (2) TGRB_3S = TGRA_4S = TGRB_4S TDDRS H'0000 TCNT_3S TCNT_4S Process (4) Process (6) Process () Process (5) Antiphase Output Non-active Period PWM Cycle Active Period Antiphase: Low Level Active Duty (%) = Active Level Period PWM Cycle x 00 Figure 2 Counter Operation and Duty/PWM Cycle REJ05B /Rev Page 7 of 55

18 Table 4 Details of Software/Hardware Processing for Duty Setting SH747 Software Process Process () Configure followings after releasing AD_0 module stop and setting PFC Timer count start Output L level from pin Hardware Process TCNT_3S and TCNT_4S start up-count Process (2) None Output H level from pin by compare match between TCNT_3S and TGRB_3S, TGRA_4S, and TGRB_4S Process (3) None TCNT_3S starts down-count by compare match between TCNT_3S and TGRA_3S TCNT_4S starts down-count by compare match between TCNT_4S and TCDRS Process (4) None Output L level from pin by compare match between TCNT_3S and TGRB_3S, TGRA_4S, and TGRB_4S Process (5) None TCNT_3S starts up-count by compare match between TCNT_3S and TGRA_3S TCNT_4S starts up-count by compare match between TCNT_4S and TCDRS Process (6) None Output L level from pin by compare match between TCNT_3S and TGRB_3S, TGRA_4S, and TGRB_4S REJ05B /Rev Page 8 of 55

19 [3]CMT (i) Overview of CMT Operation Interrupt process is executed at every 50μ [sec] by using compare match timer channel 0 (CMT_0). Interrupt process switches timer gate control register S (TGCRS) of MTU2S for outputting a PWM wave, which is most suitable to motor position. Also, interrupt process is executed at every 0.8 [sec] by using compare match timer channel (CMT_). This interrupt process counts number of interrupt process and reverses motor revolving direction (clockwise counterclockwise) at every 5 interrupt process (every 4 [sec]). Figure 3 describes CMT block diagram. Compare match timer start register (CMSTR) Control Circuit Peripheral Clock (Pφ) Clock Select 8 division 32 division 28 division 52 division Compare match timer control/status register_0 (CMCSR_0) Compare match counter_0 (CMCNT_0) CMI_0 interrupt Comparator Compare match constant register_0 (CMCOR_0) Control Circuit Peripheral Clock (Pφ) Clock Select 8 division 32 division 28 division 52 division Compare match timer control/status register_ (CMCSR_) Compare match counter_ (CMCNT_) CMI_ interrupt Comparator Compare match constant register_ (CMCOR_) Figure 3 CMT Block Diagram REJ05B /Rev Page 9 of 55

20 (j) Principle of CMT Operation Figure 4 and Figure 5 describes principles of CMT_0 and CMT_ operation. STR0 bit CMCOR_0 CMCNT_0 H'0000 CMF bit (Compare match flag) Hardware Process None Software Process Sets following after releasing CMT module stop Set CKS bit to 0 and select pφ/8 for count clock Set H 00FA to CMCOR_0 register and configure compare match at every 50μ[sec] Hardware Process Count start Software Process Set STR0 bit to and start count Hardware Process Set CMF bit to Generate compare match interrupt (However, only when compare match interrupt by A/D conversion end is enabled Clear CMCNT_0 Software Process Configure timer gate control register S (TGCRS) of MTU2S depending to motor position Clear CMF_0 bit to 0 Figure 4 Principle of CMT_0 Operation (Assign TGCRS setting timing) STR0 bit CMCOR_ CMCNT_ H'0000 CMF bit (Compare match flag) Hardware Process None Software Process Sets following after releasing CMT module stop Set CKS bit to 3 and select pφ/52 for count clock Set CMIE bit to and enable compare match interrupt Set H F424 to CMCOR_ register and configure compare Match at every 0.8 [sec] Hardware Process Count start Software Process Set STR bit to and start count Hardware Process Set CMF bit to Generate compare match interrupt Clear CMCNT_ Software Process Clear CMF_ bit to 0 Hardware Process Set CMF bit to Generate compare match interrupt Clear CMCNT_ Software Process Clear CMF_ bit to 0 Reverse motor revolving direction at every 5 compare match occurrences Figure 5 Principle of CMT_ Operation (Assign motor revolving direction reversing timing) REJ05B /Rev Page 20 of 55

21 3.3 Sample program Procedure Following describes each register setting. Table 5 ADC_0 Setting Register Name Bit Name Bit Function Set Value A/D Control Register ADST 7 0: A/D conversion start 0 (ADCR_0) : A/D conversion stop ADSC 6 0: cycle scan : Continuous scan ACE 5 0: Prohibit automatic clear, after ADDR read 0 : Enable automatic clear, after ADDR read ADIE 4 0: Prohibit A/D conversion end interrupt : Enable A/D conversion end interrupt Reserve TRGE 0: Prohibit A/D conversion triggered by exterior or MTU2/2S : Enable A/D conversion triggered by exterior or MTU2/2S 0 EXTRG 0 0: Select MTU2/MTU2S as A/D conversion start trigger 0 : Select external pin (ADTRG) as A/D conversion start trigger A/D Status Register_0 Reserve 7-0 (ADSR_0) ADF 0 A status flag indicating A/D conversion end Set: A/D conversion of all the selected channels have ended. 0 Note (Settable only by hardware process) 0 Clear: After read, write 0 Activate DTC by A/D conversion end interrupt and read ADDR A/D Analog Input Channel ANS7 7 0: Unselect AN7 as input channel 0 Select Register_0 (ADANSR_0) ANS6 6 : Select AN7 as input channel 0: Unselect AN6 as input channel 0 : Select AN6 as input channel ANS5 5 0: Unselect AN5 as input channel 0 : Select AN5 as input channel ANS4 4 0: Unselect AN4 as input channel 0 : Select AN4 as input channel ANS3 3 0: Unselect AN3 as input channel 0 : Select AN3 as input channel ANS2 2 0: Unselect AN2 as input channel : Select AN2 as input channel ANS 0: Unselect AN as input channel : Select AN as input channel ANS0 0 0: Unselect AN0 as input channel : Select AN0 as input channel A/D Data Register 0 (ADDR0) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin 0(AN0) (2bit) A/D Data Register (ADDR) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin (AN) (2bit) REJ05B /Rev Page 2 of 55

22 Register Name Bit Name Bit Function Set Value A/D Data Register 2 (ADDR2) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin 2(AN2) (2bit) A/D Data Register 3 (ADDR3) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin 3(AN3) (2bit) A/D Data Register 4 (ADDR4) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin 4(AN4) (2bit) A/D Data Register 5 (ADDR5) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin 5(AN5) (2bit) A/D Data Register 6 (ADDR6) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin 6(AN6) (2bit) A/D Data Register 7 (ADDR7) Reserve 5-2 R ADD[:0] -0 A/D conversion result of analog input pin 7(AN7) (2bit) Note: : ADF is automatically set to R: Read-only bit REJ05B /Rev Page 22 of 55

23 Table 6 MTU2S Setting Register Name Bit Name Bit Function Set Value Timer Control Register_3S CCLR[2:0] 7-5 Select counter clear factor of timer counter_3s (TCNT_3S) H'000 (TCR_3S) 000: Prohibit clear 00: Clear by compare match/input capture of TGRA_3S 00: Clear by compare match/input capture of TGRB_3S 0: Clear by counter clear of other channel, which is cleared/operated synchronically 00: Prohibit clear 0: Clear by compare match/input capture of TGRC_3S 0: Clear by compare match/input capture of TGRD_3S : Clear by counter clear of other channel, which is cleared/operated synchronically CKEG[:0] 4-3 Select input clock edge Effective only when input clock is slower than MIΦ/4 When selected input clock is faster than MIΦ/4, it is counted at only rising edge. 00: Count at rising edge 0: Count at falling edge 0: Count at both rising/falling edge : Count at both rising/falling edge H'00 TPSC[2:0] 2-0 Select counter clock of timer counter_3s (TCNT_3S) H' : MIΦ/ 00: MIΦ/4 00: MIΦ/6 0: MIΦ/64 00: MIΦ/256 0: MIΦ/024 0: External clock (TCLKA) : External clock (TCKLB) Timer Control Register_4S (TCR_4S) CCLR[2:0] 7-5 Select counter clear factor of timer counter_4s (TCNT_4S) 000: Prohibit clear H'000 00: Clear by compare match/input capture of TGRA_4S 00: Clear by compare match/input capture of TGRB_4S 0: Clear by counter clear of other channel, which is cleared/operated synchronically 00: Prohibit clear 0: Clear by compare match/input capture of TGRC_4S 0: Clear by compare match/input capture of TGRD_4S : Clear by counter clear of other channel, which is cleared/operated synchronically CKEG[:0] 4-3 Select input clock edge Effective only when input clock is slower than MIΦ/4 When selected input clock is faster than MIΦ/4, it is counted at only rising edge. 00: Count at rising edge 0: Count at falling edge 0: Count at both rising/falling edge : Count at both rising/falling edge H'00 REJ05B /Rev Page 23 of 55

24 Register Name Bit Name Bit Function Set Value Timer Control Register_4S TPSC[2:0] 2-0 Select counter clock of timer counter_4s (TCNT_4S) H'000 (TCR_4S) 000: MIΦ/ 00: MIΦ/4 00: MIΦ/6 0: MIΦ/64 00: MIΦ/256 0: MIΦ/024 0: External clock (TCLKA) : External clock (TCKLB) Timer Mode Register_3S Reserve 7 0 (TMDR_3S) Reserve 6 0 BFB 5 0: TGRB_3S and TGRD_3S are in normal operation : TGRB_3S and TGRD_3S are in buffer operation BFA 4 0: TGRA_3S and TGRC_3S are in normal operation : TGRA_3S and TGRC_3S are in buffer operation MD[3:0] 0000: Normal operation 000: Setting prohibited 000: PWM mode 00: Setting prohibited 000: Setting prohibited 00: Setting prohibited 00: Setting prohibited 0: Setting prohibited 000: Reset-synchronized PWM mode 00: Setting prohibited 00: Setting prohibited 0: Setting prohibited 00: Setting prohibited 0: Complementary PWM mode (transfer at peaks) 0: Complementary PWM mode 2 (transfer at valleys) : Complementary PWM mode 3 (transfer at peaks and valleys) H'0 REJ05B /Rev Page 24 of 55

25 Register Name Bit Name Bit Function Set Value Timer Mode Register_4S Reserve 7 0 (TMDR_4S) Reserve 6 0 BFB 5 0: TGRB_4S and TGRD_4S are in normal operation : TGRB_4S and TGRD_4S are in buffer operation BFA 4 0: TGRA_4S and TGRC_4S are in normal operation : TGRA_4S and TGRC_4S are in buffer operation MD[3:0] : Normal operation 000: Setting prohibited H'0000 Note2 000: PWM mode 00: Setting prohibited 000: Setting prohibited 00: Setting prohibited 00: Setting prohibited 0: Setting prohibited 000: Setting prohibited 00: Setting prohibited 00: Setting prohibited 0: Setting prohibited 00: Setting prohibited 0: Setting prohibited 0: Setting prohibited : Setting prohibited Timer Output Master Enable Reserve Register S (TOERS) OE4D 5 0: Prohibit MTU2S output by TIOC4DS pin (Non-active level) Note2 : Enable MTU2S output by TIOC4DS pin (*W-phase) OE4C 4 0: Prohibit MTU2S output by TIOC4CS pin (Non-active level) Note2 : Enable MTU2S output by TIOC4CS pin OE3D 3 0: Prohibit MTU2S output by TIOC3DS pin (Non-active level) Note2 : Enable MTU2S output by TIOC3DS pin OE4B 2 0: Prohibit MTU2S output by TIOC4BS pin (Non-active level) Note2 : Enable MTU2S output by TIOC4BS pin OE4A 0: Prohibit MTU2S output by TIOC4AS pin (Non-active level) Note2 : Enable MTU2S output by TIOC4AS pin OE3B 0 0: Prohibit MTU2S output by TIOC3BS pin (Non-active level) Note2 : Enable MTU2S output by TIOC3BS pin REJ05B /Rev Page 25 of 55

26 Register Name Bit Name Bit Function Set Value Timer Gate Control Register S Reserve 7 (TGCRS) BDC 6 0: Disable TGCRS register (this register) setting : Enable TGCRS register (this register) setting N 5 Select output state of antiphase output pin (TIOC3DS (*U-phase), TIOC4CS (*V-phase), TIOC4DS (*W-phase)) Note3 0: Level output : Reset-synchronized PWM/ Complementary PWM P 4 Select output state of positive phase output pin 0 (TIOC3BS (U-phase), TIOC4AS (V-phase), TIOC4BS (W-phase)) Note3 0: Level output : Reset-synchronized PWM/ Complementary PWM FB 3 0: Switch output phase by external input : Switch output phase by software (setting of UF, VF, and WF bit of TGCRS) WF 2 Set output phase by switching WF, VF, and UF bit Please refer Table 7 H'000 Note4 Timer Output Control RegisterS Reserve 7 0 (TOCRS) PSYE 6 0: Prohibit toggle output synchronized to PWM cycle 0 : Enable toggle output synchronized to PWM cycle Reserve TOCL 3 0: Enable write to TOCS, OLSN, and OLSP bit : Prohibit write to TOCS, OLSN, and OLSP bit 0 TOCS 2 Set output level in complementary PWM mode/resetsynchronized PWM mode 0: TOCR setting effective : TOCR2 setting effective OLSN Select antiphase output level in complementary/ resetsynchronized PWM mode 0: Initial output H, Active level L, Compare match while up-count H, Compare match while down-count L : Initial output L, Active level H, Compare match while up-count L, Compare match while down-count H OLSP 0 Select positive phase output level in complementary/ reset-synchronized PWM mode 0: Initial output H, Active level L, Compare match while up-count L, Compare match while down-count H : Initial output L, Active level H, Compare match while up-count H, Compare match while down-count L REJ05B /Rev Page 26 of 55

27 Register Name Bit Name Bit Function Set Value Timer Counter_3S (TCNT_3S) 5-0 Counter of channel 3 H'0000 Note5 Timer Counter _4S (TCNT_4S) 5-0 Counter of channel 4 H'0000 Note5 Timer Cycle Data Register S 5-0 A register been used only in complementary PWM H'0640 (TCDRS) mode Set PWM carrier period to /2 Timer Dead Time Data 5-0 A register been used only in complementary PWM H'000 Register S (TDDRS) mode Set dead time Timer General Register A_3S 5-0 When complementary PWM mode is set; H'064 (TGRA_3S) Set (/2 of PWM carrier period + dead time) Timer General Register B_3S 5-0 When complementary PWM mode is set; H'00A0 (TGRB_3S) Compare register of TIOC3BS(U-phase)/TIOC3DS(*Uphase) pin output Timer General Register A_4S 5-0 When complementary PWM mode is set; H'00A0 (TGRA_4S) Compare register of TIOC3AS(V-phase)/TIOC4CS(*Vphase) pin output Timer General Register B_4S 5-0 When complementary PWM mode is set; H'00A0 (TGRB_4S) Compare register of TIOC4BS(W-phase)/ TIOC4DS(*W-phase) pin output Timer Cycle Buffer Register S (TCBRS) 5-0 A register been used only in complementary PWM mode Buffer register of TCDRS H'0640 Timer General Register C_3S (TGRC_3S) Timer General Register D_3S (TGRD_3S) Timer General Register C_4S (TGRC_4S) Timer General Register D_4S (TGRD_4S) Timer Dead Time Enable Register S (TDERS) 5-0 When complementary PWM mode is set; Buffer register of TGRA_3S TGRC_3S is set when changing TGRA_3S during timer operation 5-0 When complementary PWM mode is set; Buffer register of TGRB_3S TGRD_3S is set when changing TGRB_3S during timer operation 5-0 When complementary PWM mode is set; Buffer register of TGRA_4S TGRC_4S is set when changing TGRA_4S during timer operation 5-0 When complementary PWM mode is set; Buffer register of TGRB_4S TGRD_4S is set when changing TGRB_4S during timer operation Reserve 7- TDER 0 0: Do not generate dead time : Generate dead time H'064 H'00A0 H'00A0 H'00A0 REJ05B /Rev Page 27 of 55

28 Register Name Bit Name Bit Function Set Value Timer Start Register S CST4 7 0: Count stop of timer counter_4s (TCNT_4S) 0 (TSTRS) : Count start of timer counter_4s (TCNT_4S) CST3 6 0: Count stop of timer counter_3s (TCNT_3S) 0 : Count start of timer counter _3S (TCNT_3S) Reserve Reserve 2 0 Reserve 0 Reserve 0 0 Note2 Non-active level complies TOCRS/2S setting Note3 U-phase, V-phase, and W-phase are positive phase. *U-phase, *V-phase, and *W-phase are antiphase. Note4 Initial value. This control sample switches WF, VF, and UF bit depending on motor position. Note5 Initial value. Changes during timer operation. Table 7 Output Level Select Function Bit 2 Bit Bit 0 Function WF VF UF TIOC3BS TIOC4AS TIOC4BS TIOC3DS TIOC4CS TIOC4D U-phase V-phase W-phase *U-phase *V-phase *W-phase OFF OFF OFF OFF OFF OFF 0 0 ON OFF OFF OFF OFF ON 0 0 OFF ON OFF ON OFF OFF 0 OFF ON OFF OFF OFF ON 0 0 OFF OFF ON OFF ON OFF 0 ON OFF OFF OFF ON OFF 0 OFF OFF ON ON OFF OFF OFF OFF OFF OFF OFF OFF REJ05B /Rev Page 28 of 55

29 Table 8 CMT_0, Setting Register Name Bit Name Bit Function Set Value Compare Match Timer Start Reserve Register (CMSTR) STR 0: Count stop of compare match counter_ 0 : Count start of compare match counter_ STR0 0 0: Count stop of compare match counter_0 0 : Count start of compare match counter_0 Compare Match Timer Control Reserve Register_0 (CMCSR_0) CMF 7 A flag which indicates match of compare match constant register_0 (CMCOR_0) value and compare match timer counter_0 (CMCNT_0) value. 0 *Note6 Set: CMCOR_0 and CMCNT_0 matches (automatically set by hardware) 0 Clear: Write 0 When CMT register is accessed while DTC module is activated by CMI_0 interrupt and MRB/DISEL bit of DTC is 0 CMIE 6 0: Prohibit compare match interrupt (CMI_0) : Enable compare match interrupt (CMI_0) Reserve CKS[:0] -0 Select frequency for counting CMCNT_0 00: PΦ/8 0: PΦ/32 0: PΦ/28 : PΦ/52 H'00 Compare Match Counter_0 5-0 Counter for up-count H'0000 (CMCNT_0) Compare Match Constant 5-0 Set the duration until matching with CMCNT_0 H'00C8 Register_0 (CMCOR_0) Compare Match Timer Control Reserve Register_ (CMCSR_) CMF 7 A flag which indicates match of compare match constant register_ (CMCOR_) value and compare match timer counter_ (CMCNT_) value. 0 *Note6 Set: CMCOR_ and CMCNT_ matches (automatically set by hardware) 0 Clear: Write 0 When CMT register is accessed while DTC module is activated by CMI_ interrupt and MRB/DISEL bit of DTC is 0 CMIE 6 0: Prohibit compare match interrupt (CMI_) : Enable compare match interrupt (CMI_) Reserve CKS[:0] -0 Select frequency for counting CMCNT_ 00: PΦ/8 0: PΦ/32 0: PΦ/28 : PΦ/52 H' Compare MatchCounter_ 5-0 Counter for up-count H'0000 (CMCNT_) Compare Match Constant Register_ (CMCOR_) 5-0 Set the duration until matching with CMCNT_ H'C350 Note6: CMF is automatically set to REJ05B /Rev Page 29 of 55

30 Table 9 PFC Setting Register Name Bit Name Bit Function Set Value Port E IO Register H Reserve (PEIORH) PE2 5 0: PE2 pin (2pin) is input : PE2 pin (2pin) is output PE20 4 0: PE20 pin (4pin) is input : PE20 pin (4pin) is output PE9 3 0: PE9 pin (5pin) is input : PE9 pin (5pin) is output PE8 2 0: PE8 pin (6pin) is input : PE8 pin (6pin) is output PE7 0: PE7 pin (7pin) is input : PE7 pin (7pin) is output PE6 0 0: PE6 pin (8pin) is input : PE6 pin (8pin) is output Port E Control Register H2 Reserve (PECRH2) PE2MD 5 00: PE2 input/output (port) H'0 PE2MD0 4 0: TIOC4DS input/output (MTU2S) 0: WRL output (BSC) : Setting prohibited Reserve PE20MD 00: PE20 input/output (port) H'0 PE20MD0 0 0: TIOC4CS input/output (MTU2S) 0: Setting prohibited : Setting prohibited Port E Control Register H Reserve (PECRH) PE9MD PE9MD : PE9 input/output (port) 0: TIOC4BS input/output (MTU2S) H'0 0: RD output (BSC) : Setting prohibited Reserve -0 0 PE8MD PE8MD : PE8 input/output (port) 0: TIOC4AS input/output (MTU2S) H'0 0: CS output (BSC) : Setting prohibited Reserve PE7MD 5 00: PE7 input/output (port) H'0 PE7MD0 4 0: TIOC3DS input/output (MTU2S) 0: CS0 output (BSC) : Setting prohibited Reserve 3 0 PE6MD2 PE6MD PE6MD : PE6 input/output (port) 00: TIOC3BS input/output (MTU2S) 00: WAIT output (BSC) Other than above: Setting prohibited H'0 REJ05B /Rev Page 30 of 55

31 Table 0 STBYCR Setting Register Name Bit Name Bit Function Set Value Standby Control Register MSTP23 7 0: MTU2S is operating 0 (STBCR4) : Clock supply to MTU2S is halted (MTU2S is not operating) MSTP22 6 0: MTU2 is operating : Clock supply to MTU2 is halted (MTU2 is not operating) MSTP2 5 0: CMT is operating 0 : Clock supply to CMT is halted (CMT is not operating) MSTP20 4 0: A/D_ is operating : Clock supply to A/D_ is halted (A/D_ is not operating) MSTP9 3 0: A/D_0 is operating : Clock supply to A/D_0 is halted (A/D_0 is not operating) 0 Reserve 2-0 Table INTC Setting Register Name Bit Name Bit Function Set Value Interrupt Priority Register J (IPRJ) IPR[5:2] 5-2 Set the priority order of CMT_0 interrupt factor. Priority level is set between 0 to 5 H' : Priority level 0 (lowest) : Priority level 5 (highest) IPR[:8] -8 Set the priority order of CMT_ interrupt factor. H'00 Priority level is set between 0 to : Priority level 0 (lowest) : Priority level 5 (highest) Interrupt Priority Register K (IPRK) IPR[7:4] 7-4 Set the priority order of AD_0 interrupt factor. Priority level is set between 0 to : Priority level 0 (lowest) : Priority level 5 (highest) H'000 Table 2 CPG Setting Register Name Bit Name Bit Function Set Value Frequency Control Register Reserve 5 0 (FRQCR) IFC[2:0] 4-2 Division ratio of internal clock (Iφ) frequency 0 0:, When input clock 8MHz Iφ: 64MHz BFC[2:0] -9 Division ratio of bus clock (Bφ) frequency : /2, When input clock 8MHz Bφ: 32MHz PFC[2:0] 8-6 Division ratio of peripheral clock (Pφ) frequency : /2, When input clock 8MHz Pφ: 32MHz MIFC[2:0] 5-3 Division ratio of MTU2S clock (MIφ) frequency 0 0:, When input clock 8MHz MIφ: 64MHz MPFC[2:0] 2-0 Division ratio of MTU2S clock (Iφ) frequency : /2, When input clock 8MHz MPφ: 32MHz REJ05B /Rev Page 3 of 55

32 3.4 Used Function Setting Procedure SH747 Following describes procedure flow of sample programs. Please refer Table to 7 or SH747 Hardware Manual for each register settings. main SR 5: Set interrupt mask bit to 5 and prohibit interrupt Frequency setting (set_cpg_init) ADC_0 initial setting (set_ad_init) MTU2S initial setting (set_mtu2s_init) CMT_0, initial setting (set_cmt_init) ADC_0 conversion start [ADCR_0 setting] Set to ADST MTU2S CH3,4 count start [TSTR_S setting] Set H C0 to TSTR_S CMT_0, count start [CMSTR setting] Set H 03 to CMSTR SR 0: Set interrupt mask bit to 0 and enable interrupt Figure 6 Main Function Processing Flow REJ05B /Rev Page 32 of 55

33 set_cpg_init (frequency setting) IΦ (internal clock): Set to 64MHz [FRQCR setting] Set IFC to 0 BΦ (bus clock): Set to 32MHz Note: Bus clock do not affect this application example [FRQCR setting] Set BFC to PΦ (peripheral clock): Set to 32MHz [FRQCR setting] Set PFC to MIΦ (MTU2S clock): Set to 64MHz [FRQCR setting] Set MIFC to 0 MPΦ (MTU2 clock): Set to 32MHz Note: MTU2 clock do not affect this application example [FRQCR setting] Set MPFC to return Figure 7 Frequency Setting Process Flow REJ05B /Rev Page 33 of 55

34 set_ad_init (ADC_0 initial setting) ADC_0 module standby release [STBCR4 setting] ADC_0 conversion stop [ADCR setting] Conversion stop ADC_0 operation setting [ADCR setting] Set continuous scan mode Enable A/D conversion end interrupt Select analog input channel [ADANDR0-2 setting] Select AN0-2 as input channel Set interrupt priority of A/D conversion end interrupt [INTC setting] Set interrupt priority level to return Figure 8 ADC_0 Initial Setting Flow REJ05B /Rev Page 34 of 55

35 set_mtu2s_int (MTU2S initial setting) MTU2S module standby release [STBCR4 setting] Timer counter channel_3,4 operation stop [TSTRS setting] Timer counter channel_3,4 operation setting DC brushless motor control setting Timer counter channel_3,4 initial setting Duty setting Dead time setting Carrier period setting PWM output level setting Operation mode setting Output enable setting PFC setting return [TCR_3S/4S setting] Prohibit counter clear Count by rising edge MPΦ/ as count clock [TGCRS setting] TGCRS effective Antiphase PWM output Positive phase level output Output switch by software [TGCRS setting] Set dead time to TCNT_3S Set H 0000 to TCNT_4S [TGRD_3S/TGRB_3S setting] U-phase duty setting [TGRC_4S/TGRA_4S setting] V-phase duty setting [TGRD_4S/TGRB_4S setting] W-phase duty setting [TDERS setting] Generate dead time [TDDRS setting] Set dead time [TCBRS/TCDRS setting] Set /2 carrier period [TGRC_3S/TGRA_3 setting] Set /2 carrier period + dead time [TIOCRS setting] Prohibit toggle output synchronized to PWM cycle Select positive/anti-phase output level [TMDR_3S/4S setting] TGRB and TGRC is in buffer operation TGRA and TGRC is in buffer operation Complementary PWM mode (transfer at peak) [TOERS setting] Set output enable [PEIORH setting] Set MTU2S pin output [PECRH2/ setting] Select MTU2S pin Figure 9 MTU2S Initial Setting Flow REJ05B /Rev Page 35 of 55

36 set_cmt_init (CMT_0/ initial setting) Release CMT_0, module standby [STBCR4 setting] CMT_0, operation stop CMT_0 operation setting CMT_0 compare match period setting CMT_0 counter 0 clear CMT_ operation setting CMT_ compare match period setting CMT_ counter 0 clear CMT_0, compare match interrupt priority setting [CMSTR setting] Operation stop [CMCSR_0 setting] PΦ/8 as count clock [CMCOR_0 setting] Compare match at 50μ[s] [CMCNT_0 setting] Set to H 0000 [CMCSR_0 setting] Enable compare match interrupt PΦ/52 as count clock [CMCOR_ setting] Compare match at 0.8[s] [CMCNT_ setting] Set to H 0000 [INTC setting] Set CMT_0 interrupt priority level to 2 Set CMT_ interrupt priority level to 3 return Figure 20 CMT Initial Setting Flow REJ05B /Rev Page 36 of 55

37 ADI_3 (ADC_0 conversion end interrupt) Store ADDR0(AN0 conversion result) to RAM (resolver_re) resolver_ref? H 0B30? Yes No Flag set (flag_ref? H FF) resolver_ref? H 0570? Yes No Flag clear (flag_ref? H 00) H 980 > resolver_ref > H 0900? Yes No Flag clear? (flag_ref = H 00?) Yes No Transfer ADDR(AN conversion result) to RAM(Sin) Transfer ADDR2(AN2 conversion result) to RAM(Cos) Figure 2 ADC_0 Interrupt Process Flow () REJ05B /Rev Page 37 of 55

38 Sin H 0000 and Cos H 0000? Yes No i <? Yes No Enable compare match interrupt by CMT_0 CMIE i ++ Clear A/D end flag (ADF) ADF 0 return Figure 22 ADC_0 Interrupt Process Flow (2) REJ05B /Rev Page 38 of 55

39 CMI_0 (CMT_0 compare match interrupt) Clockwise motor revolving? No Yes Switch TGCRS depending on values of Sin and Cos Counterclockwise motor revolving? Yes No Switch TGCRS depending on values of Sin and Cos Clear compare match flag (CMF) CMF 0 return Figure 23 CMT_0 Interrupt Process Flow REJ05B /Rev Page 39 of 55

40 CMI_(CMT_ compare match interrupt) k < 5 No Yes Assign clockwise revolving k < 9? Yes No k ++ Assign counterclockwise revolving k ++ Assign counterclockwise revolving k 0 Clear compare match flag (CMF) CMF 0 return Figure 24 CMT_ Interrupt Process Flow REJ05B /Rev Page 40 of 55

41 4. Sample program /************************************************************************/ /* SH747 Motor Control */ /* - Resolver Built-in DC Brushless Motor - */ /* Used Module: */ /* ADC/MTU2S/CMT: */ /************************************************************************/ /* Include File */ #include <machine.h> #include"iodefine.h" /************************************************************************/ /* Function Declaration */ /************************************************************************/ void main(void); /* Main Function */ void set_cpg_init(void); /* Each Clock Setting */ void initial_value(void); /* Initializing Variable */ void set_ad_init(void); /* ADC Initial Setting */ void set_cmt_init(void); /* CMT Initial Setting */ void set_mtu2s_init(void); /* MTU2S Initial Setting */ /************************************************************************/ /* Variable Declaration */ /************************************************************************/ /* Used in ADC Interrupt Routine */ unsigned char flag_ref; /* Resolver Excitation Signal Slope Determination Flag */ unsigned short resolver_ref; /* Result of A/D Converting Resolver Excitation Signal */ unsigned short Sin; /* Result of A/D Converting Resolver Output Sin Wave */ unsigned short Cos; /* Result of A/D Converting Resolver Output Cos Wave */ unsigned char i; /* CMT_0 Interrupt Enable Flag */ /* Used in CMT_0 Interrupt Routine */ unsigned char flag_rot; /* Motor Revolving Direction Assigning Flag */ REJ05B /Rev Page 4 of 55

42 /* Used in CMT_ Interrupt Routine */ unsigned char k; /* CMT_ Interrupting Times Counting Flag */ /************************************************************************/ /* Symbol Declaration */ /************************************************************************/ /* Angle and A/D Conversion Result of Resolver Output Sin Wave */ #define Sin_0 0x0332 /* Result of A/D Converting Sin0 */ #define Sin_60 0x0522 /* Result of A/D Converting Sin60 */ #define Sin_80 0x0332 /* Result of A/D Converting Sin80 */ #define Sin_240 0x042 /* Result of A/D Converting Sin240 */ /* Angle and A/D Conversion Result of Resolver Output Cos Wave */ #define Cos_90 0x0332 /* Result of A/D Converting Cos90 */ #define Cos_50 0x042 /* Result of A/D Converting Cos50 */ #define Cos_270 0x0332 /* Result of A/D Converting Cos270 */ #define Cos_330 0x0522 /* Result of A/D Converting Cos330 */ /* Revolving Direction */ #define CW /* Clockwise of motor */ #define CCW 2 /* Counterclockwise of motor */ /* PWM Carrier Period/Dead Time */ #define CARRIER 0x0c80 /* PWM Carrier Period: 50[μs] */ #define HALF_CARRIER 0x0640 /* /2 of PWM Carrier Period: 25[μs] */ #define DEAD_TIME 0x000 /* Dead Time: 5.625[ns] */ #define TCNT3_COMP (DEAD_TIME + HALF_CARRIER) /* Dead Time + /2 of PWM Carrier Period */ /************************************************************************/ /* Main Function */ /************************************************************************/ void main(void){ set_imask(5); /* Interrupt Prohibited */ REJ05B /Rev Page 42 of 55

43 initial_value(); /* Initializing Variable */ set_cpg_init(); /* Each Clock Setting */ set_ad_init(); /* ADC Initial Setting */ set_mtu2s_init(); /* MTU2S Initial Setting */ set_cmt_init(); /* CMT Initial Setting */ AD0.ADCR.BIT.ADST = ; /* ADC_0 Conversion Start */ MTU2S.TSTR.BYTE = 0xC0; /* MTU2S ch3,4 Count Start */ CMT.CMSTR.WORD = 0x03; /* CMT ch0, Count Start */ SH747 set_imask(0); /* Interrupt Enable */ while(); /************************************************************************/ /* Initializing Variable */ /************************************************************************/ void initial_value(void){ /* Used in ADC Interrupt Routine */ flag_ref = 0; /* Resolver Excitation Signal Slope Flag */ i = 0; /* CMT_0 Interrupt Enable Flag */ resolver_ref = 0x00; /* Result of A/D Converting Resolver Excitation Signal */ Sin = 0x0000; /* Result of A/D Converting Resolver Output Sin Wave */ Cos = 0x0000; /* Result of A/D Converting Resolver Output Cos Wave */ /* Used in CMT_0 Interrupt Routine */ flag_rot = 0; /* Motor Revolving Direction Assigning Flag */ /* Used in CMT_ Interrupt Routine */ k = 0; /* CMT_ Interrupting Times Counting Flag */ /************************************************************************/ /* Each Clock Setting */ /* IΦ:BΦ:PΦ:MIΦ:MPΦ = 64MHz:32MHz:32MHz:64MHz:32MHz */ REJ05B /Rev Page 43 of 55

SH7080/SH7146/SH7125/SH7200 Series

SH7080/SH7146/SH7125/SH7200 Series APPLICATION NOTE SH78/SH746/SH75/SH7 Series Introduction This application note discusses synchronous operation of the MTU and MTUS timers, Target Device Microcomputer: SH785 (R5F785) Operating frequency:

More information

Interrupt Level Setting and Modification by Interrupt Controller

Interrupt Level Setting and Modification by Interrupt Controller Controller Introduction APPLICATION NOTE Interrupts of different levels are generated by specifying interrupt levels via the interrupt controller (INTC) of the SH7145F. Target Device SH7145F Contents 1.

More information

1. Specifications Conditions for Application Description of Modules Used Description of Operation... 7

1. Specifications Conditions for Application Description of Modules Used Description of Operation... 7 APPLICATION NOTE H8SX Family Introduction Relative phases of the two-phase pulse signal input from the two external clock pins are detected by the 6-bit timer pulse unit (TPU). Whether the timer counter

More information

SH7144/45 Group APPLICATION NOTE. 2-Phase Encoder Count. 1. Specifications

SH7144/45 Group APPLICATION NOTE. 2-Phase Encoder Count. 1. Specifications APPLICATION NOTE SH7144/45 Group 1. Specifications Two external clocks are input to channel 1 (ch1), and a counter is incremented or decremented according to the phase difference of the pulses, as shown

More information

1. Specifications Operational Overview of Functions Used Principles of Operation Description of Software...

1. Specifications Operational Overview of Functions Used Principles of Operation Description of Software... APPLICATION NOTE SH7080 Group Introduction This application note describes the serial data transmission function that uses the transmit-fifo-data-empty interrupt source of the SCIF (Serial Communication

More information

SCIF Asynchronous Serial Data Transfer Function Using the DTC. 1. Specifications Operational Overview of Functions Used...

SCIF Asynchronous Serial Data Transfer Function Using the DTC. 1. Specifications Operational Overview of Functions Used... Introduction APPLICATION NOTE This application note describes data transmission and reception that uses the internal SCIF (Serial Communication Interface with FIFO) for asynchronous serial transfer and

More information

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents To our customers, Old Company Name in Catalogs and Other Documents On April st, 2, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over

More information

Data Transfer between On-chip RAM Areas with DMAC (Burst Mode) 1. Introduction Description of Sample Application... 3

Data Transfer between On-chip RAM Areas with DMAC (Burst Mode) 1. Introduction Description of Sample Application... 3 Introduction APPLICATION NOTE This application note describes the operation of the DMAC, and is intended for reference to help in the design of user software. Target Device SH7211 Contents 1. Introduction...

More information

1. Specifications Applicable Conditions Operational Overview of Functions Used Principles of Operation...

1. Specifications Applicable Conditions Operational Overview of Functions Used Principles of Operation... APPLICATION NOTE SH7080 Group Introduction This application note provides information that may be useful in designing software. The note describes how to erase and program the flash memory when the flash

More information

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes Course Introduction Purpose: This course provides an overview of the Direct Memory Access Controller and the Interrupt Controller on the SH-2 and SH-2A families of 32-bit RISC microcontrollers, which are

More information

Example of Setting the SCIF for Clocked Synchronous Serial Communication (Full-Duplex Communication)

Example of Setting the SCIF for Clocked Synchronous Serial Communication (Full-Duplex Communication) APPLICATION NOTE Example of Setting the SCIF for Clocked Synchronous Serial Communication (Full-Duplex Communication) Introduction This application note presents an example of configuring the serial communication

More information

AN-8205 AMC Library Hall Interface Summary AMC Introduction

AN-8205 AMC Library Hall Interface Summary AMC Introduction www.fairchildsemi.com AMC Library Hall Interface Summary The FCM8531 is an application-specific parallel-core processor for motor control that consists of an Advanced Motor Controller (AMC) processor and

More information

Data Flash Reprogramming Using Background Operation (BGO) 1. Introduction Description of Functions Used... 4

Data Flash Reprogramming Using Background Operation (BGO) 1. Introduction Description of Functions Used... 4 Introduction APPLICATION NOTE R01AN0290EJ0220 Rev.2.20 This application note describes the use of background operation (BGO) on the SH7216. BGO allows the CPU to perform other operations while the on-chip

More information

Preface. * ZTAT (Zero Turn-Around Time) is a trademark of Hitachi, Ltd.

Preface. * ZTAT (Zero Turn-Around Time) is a trademark of Hitachi, Ltd. OMC 932723248 Hitachi Single-Chip Microcomputer H8/534, H8/536 HD6475348R, HD6435348R HD6475368R, HD6435368R HD6475348S, HD6435348S HD6475368S, HD6435368S Hardware Manual ADE-602-038B Preface The H8/534

More information

I Introduction to Real-time Applications By Prawat Nagvajara

I Introduction to Real-time Applications By Prawat Nagvajara Electrical and Computer Engineering I Introduction to Real-time Applications By Prawat Nagvajara Synopsis This note is an introduction to a series of nine design exercises on design, implementation and

More information

1. Specifications Functions Used Operation Software Flowcharts Program Listing... 13

1. Specifications Functions Used Operation Software Flowcharts Program Listing... 13 APPLICATION NOTE SH7145F Summary The SH7144 series is a single-chip microprocessor based on the SH-2 RISC (Reduced Instruction Set Computer) CPU core and integrating a number of peripheral functions. This

More information

1.Overview of X7083/X7043/X7023

1.Overview of X7083/X7043/X7023 1.Overview of X7083/X7043/X7023 11 Introduction X7083/X7043/X7023 is an LSI that generates a pulse for controlling the speed and positioning of pulse train inputtype servo motors and stepping motors. X7083

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System EE4390 Microprocessors Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System 1 Overview 68HC12 hardware overview Subsystems Memory System 2 68HC12 Hardware Overview "Copyright of Motorola,

More information

Topics. Interfacing chips

Topics. Interfacing chips 8086 Interfacing ICs 2 Topics Interfacing chips Programmable Communication Interface PCI (8251) Programmable Interval Timer (8253) Programmable Peripheral Interfacing - PPI (8255) Programmable DMA controller

More information

AN2820 Application note

AN2820 Application note Application note Driving bipolar stepper motors using a medium-density STM32F103xx microcontroller Introduction This application note describes how to achieve compact size, high speed and low cost with

More information

1. Specification Applicable Conditions Description of Modules Used Principles of Operation... 9

1. Specification Applicable Conditions Description of Modules Used Principles of Operation... 9 APPLICATION NOTE H8SX Family Introduction The H8SX/1638F microcomputer has a deep software standby mode as one of its low-power states. This application note gives an example of employment of the deep

More information

PSIM Tutorial. How to Use SPI in F2833x Target. February Powersim Inc.

PSIM Tutorial. How to Use SPI in F2833x Target. February Powersim Inc. PSIM Tutorial How to Use SPI in F2833x Target February 2013-1 - Powersim Inc. With the SimCoder Module and the F2833x Hardware Target, PSIM can generate ready-to-run codes for DSP boards that use TI F2833x

More information

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1 Module 2 Embedded Processors and Memory Version 2 EE IIT, Kharagpur 1 Lesson 11 Embedded Processors - II Version 2 EE IIT, Kharagpur 2 Signals of a Typical Microcontroller In this lesson the student will

More information

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1 SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1 Subject: Microcontroller and Interfacing (151001) Class: B.E.Sem V (EC-I & II) Q-1 Explain RISC

More information

ID630L: Becoming Familiar with Sensorless Vector Control of BLDC Motors

ID630L: Becoming Familiar with Sensorless Vector Control of BLDC Motors ID630L: Becoming Familiar with Sensorless Vector Control of BLDC Motors Description: This lab will teach the attendees how to use Renesas MCU to implement sensorless vector control of BLDC motors step

More information

Rotary Measuring Technology Absolute singleturn encoder shaft version

Rotary Measuring Technology Absolute singleturn encoder shaft version Highest shock resistance on the market ( 2500 m/s 2, 6 ms acc. to DIN IEC 68-2-27) SSI, parallel or current (4... 20 ma) interface Divisions: up to 16384 (14 bits), singleturn Housing Ø 58 mm IP 65 Various

More information

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1 M68HC08 Microcontroller The MC68HC908GP32 Babak Kia Adjunct Professor Boston University College of Engineering Email: bkia -at- bu.edu ENG SC757 - Advanced Microprocessor Design General Description The

More information

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1 Module 2 Embedded Processors and Memory Version 2 EE IIT, Kharagpur 1 Lesson 10 Embedded Processors - I Version 2 EE IIT, Kharagpur 2 In this lesson the student will learn the following Architecture of

More information

IP-THERMISTOR. 6 CHANNELS TEMPERATURE 8-CHANNEL VOLTAGE Industry Pack module HARDWARE REFERENCE MANUAL. Revision 1.0 JANUARY, 2008

IP-THERMISTOR. 6 CHANNELS TEMPERATURE 8-CHANNEL VOLTAGE Industry Pack module HARDWARE REFERENCE MANUAL. Revision 1.0 JANUARY, 2008 IP-THERMISTOR 6 CHANNELS TEMPERATURE 8-CHANNEL VOLTAGE Industry Pack module HARDWARE REFERENCE MANUAL Revision 1.0 JANUARY, 2008 This Document shall not be duplicated, nor its contents used for any purpose,

More information

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents To our customers, Old Company Name in Catalogs and Other Documents On April 1 st, 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took

More information

Fuel Injection Control for a 12 Cylinder Formula 1 Engine

Fuel Injection Control for a 12 Cylinder Formula 1 Engine Microcontrollers ApNote AP1635 o additional file APXXXX01.EXE available Consequently, the C166 finds many applications in areas such as motor control and automotive engine management where the production

More information

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port).

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port). This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port). 1. Programmable peripheral input-output port is other name for a) serial input-output

More information

Exercise 4-1. DSP Peripherals EXERCISE OBJECTIVES

Exercise 4-1. DSP Peripherals EXERCISE OBJECTIVES Exercise 4-1 DSP Peripherals EXERCISE OBJECTIVES Upon completion of this exercise, you will be familiar with the specialized peripherals used by DSPs. DISCUSSION The peripherals found on the TMS320C50

More information

A 3-SPEED STEPPER MOTOR

A 3-SPEED STEPPER MOTOR ECE 36 Projects; Stepper Motor 1 of 5 A 3-SPEED STEPPER MOTOR 1. Design a microprocessing system to implement a 3-speed stepper motor. Your design is constrained to use the parts shown in Fig. 1 and described

More information

KOLLMORGEN. SERVOSTAR CD. SERCOS IDN Manual M-SS rev. F. Solutions by D A N A H E R M O T I O N

KOLLMORGEN.  SERVOSTAR CD. SERCOS IDN Manual M-SS rev. F. Solutions by D A N A H E R M O T I O N KOLLMORGEN www.danahermotion.com SERVOSTAR CD Solutions by D A N A H E R M O T I O N SERCOS IDN Manual M-SS-017-05 rev. F Revision History Revision Edition Date Reason for Revision 1 05/01/1999 Initial

More information

Question Bank Microprocessor and Microcontroller

Question Bank Microprocessor and Microcontroller QUESTION BANK - 2 PART A 1. What is cycle stealing? (K1-CO3) During any given bus cycle, one of the system components connected to the system bus is given control of the bus. This component is said to

More information

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an Microcontroller Basics MP2-1 week lecture topics 2 Microcontroller basics - Clock generation, PLL - Address space, addressing modes - Central Processing Unit (CPU) - General Purpose Input/Output (GPIO)

More information

DSP240-LPI Inverter Controller Card. Technical Brief

DSP240-LPI Inverter Controller Card. Technical Brief DSP240-LPI Inverter Controller Card Technical Brief September 2006 Manual Release 3.0 Card Revision 3.0 Copyright 2001-2006 Creative Power Technologies P.O. Box 714 MULGRAVE Victoria, 3170 Tel: +61-3-9543-8802

More information

A variety of ECONseries modules provide economical yet flexible solutions. Waveform Generation

A variety of ECONseries modules provide economical yet flexible solutions. Waveform Generation ECONseries BUS: USB Type: Economy, Mini-Instruments ECONseries Economy USB Mini-Instruments Flexible Yet Economical A variety of low-cost ECONseries modules are available to provide flexible yet economical

More information

DSD: Delta Sigma Demodulator. XMC microcontrollers September 2016

DSD: Delta Sigma Demodulator. XMC microcontrollers September 2016 DSD: Delta Sigma Demodulator XMC microcontrollers September 2016 Agenda 1 Overview 2 Key feature: adjustable CIC filter 3 Key feature: parallel auxiliary CIC filter with boundaries 4 Key feature: resolver

More information

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization 8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization between two devices. So it is very useful chip. The

More information

RA8835. Dot Matrix LCD Controller Specification. Version 1.2 June 1, RAiO Technology Inc. Copyright RAiO Technology Inc.

RA8835. Dot Matrix LCD Controller Specification. Version 1.2 June 1, RAiO Technology Inc. Copyright RAiO Technology Inc. RAiO Dot Matrix LCD Controller Specification Version 1.2 June 1, 2005 RAiO Technology Inc. Copyright RAiO Technology Inc. 2004, 2005 RAiO TECHNOLOGY I. 1/6 Preliminary Version 1.2 1. Overview The is a

More information

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085. (1) Draw and explain the internal architecture of 8085. The architecture of 8085 Microprocessor is shown in figure given below. The internal architecture of 8085 includes following section ALU-Arithmetic

More information

FEATURES DESCRIPTION FEATURES

FEATURES DESCRIPTION FEATURES FEATURES Two High Speed Counters Two Pulse Train Outputs Two Pulse Width Modulation Outputs 24 Sinking or Sourcing Inputs 16 Outputs 1 RS232 Port 2 RS485 Ports Supports Modbus RTU Protocol Communicate

More information

Department of Electronics and Instrumentation Engineering Question Bank

Department of Electronics and Instrumentation Engineering Question Bank www.examquestionpaper.in Department of Electronics and Instrumentation Engineering Question Bank SUBJECT CODE / NAME: ET7102 / MICROCONTROLLER BASED SYSTEM DESIGN BRANCH : M.E. (C&I) YEAR / SEM : I / I

More information

EECS 373 Midterm 2 Fall 2018

EECS 373 Midterm 2 Fall 2018 EECS 373 Midterm 2 Fall 2018 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Nor did I discuss this exam with anyone after

More information

Advanced NI-DAQmx Programming Techniques with LabVIEW

Advanced NI-DAQmx Programming Techniques with LabVIEW Advanced NI-DAQmx Programming Techniques with LabVIEW Agenda Understanding Your Hardware Data Acquisition Systems Data Acquisition Device Subsystems Advanced Programming with NI-DAQmx Understanding Your

More information

PPG Function of F2MC-16LX MCU Series as PWM

PPG Function of F2MC-16LX MCU Series as PWM PPG Function of F2MC-16LX MCU Series as PWM Introduction... 1 PPG Function... 1 Important Register Configuration... 2 Flow chart... 3 Program Code... 4 Fujitsu Microelectronics America, Inc. i PPG Function

More information

UNIT - II PERIPHERAL INTERFACING WITH 8085

UNIT - II PERIPHERAL INTERFACING WITH 8085 UNIT - II PERIPHERAL INTERFACING WITH 8085 Peripheral Interfacing is considered to be a main part of Microprocessor, as it is the only way to interact with the external world. The interfacing happens with

More information

Clock Synchronous Control Module for Serial Flash Memory Access Firmware Integration Technology

Clock Synchronous Control Module for Serial Flash Memory Access Firmware Integration Technology APPLICATION NOTE RX Family R01AN2662EJ0234 Rev.2.34 Introduction This application note explains how to control and use serial flash memory with microcontrollers manufactured by Renesas Electronics. Refer

More information

Microprocessors/Microcontrollers

Microprocessors/Microcontrollers Microprocessors/Microcontrollers A central processing unit (CPU) fabricated on one or more chips, containing the basic arithmetic, logic, and control elements of a computer that are required for processing

More information

Lecture (02) PIC16F84 (I)

Lecture (02) PIC16F84 (I) Lecture (02) PIC16F84 (I) By: Dr. Ahmed ElShafee ١ Review of Memory Technologies The PIC 16 Series PIC 16F84A The PIC 16F84A Memory The Oscillator Instruction Cycle Power up and Reset Parallel ports Technical

More information

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used to connect devices such as microcontrollers, sensors,

More information

Stimuli Generator User s Guide

Stimuli Generator User s Guide Stimuli Generator User s Guide TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents... Stimuli Generator... Stimuli Generator User's Guide... 1 Stimuli-Generator... 2 Basics 2 Digital

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) END-TERM EXAMINATION DECEMBER 2006 Exam. Roll No... Exam Series code: 100919DEC06200963 Paper Code: MCA-103 Subject: Digital Electronics Time: 3 Hours Maximum

More information

4-Megabit (512K x 8) 5-volt Only CMOS Flash Memory AT49F040 AT49F040T AT49F040/040T AT49F040/040T. Features. Description. Pin Configurations

4-Megabit (512K x 8) 5-volt Only CMOS Flash Memory AT49F040 AT49F040T AT49F040/040T AT49F040/040T. Features. Description. Pin Configurations Features Single Voltage Operation 5V Read 5V Reprogramming Fast Read Access Time - 70 ns Internal Program Control and Timer 16K bytes Boot Block With Lockout Fast Erase Cycle Time - 10 seconds Byte By

More information

RA8835A. Dot Matrix LCD Controller Specification. Version 1.1 September 18, RAiO Technology Inc. Copyright RAiO Technology Inc.

RA8835A. Dot Matrix LCD Controller Specification. Version 1.1 September 18, RAiO Technology Inc. Copyright RAiO Technology Inc. RAiO Dot Matrix LCD Controller Specification Version 1.1 September 18, 2014 RAiO Technology Inc. Copyright RAiO Technology Inc. 2014 RAiO TECHNOLOGY I. 1/6 www.raio.com.tw Preliminary Version 1.1 1. Overview

More information

Application Note. Synchronous Operation Mode

Application Note. Synchronous Operation Mode Application Note Synchronous Operation Mode For H8/3694 series Contact Info: Brazen Tek, Inc. 20121 Ventura Blvd. Suite 310 Woodland Hills, CA 91364 USA Tel/Fax: (818) 710-9262 E-mail: info@brazentek.com

More information

Interrupts, timers and counters

Interrupts, timers and counters Interrupts, timers and counters Posted on May 10, 2008, by Ibrahim KAMAL, in Micro-controllers, tagged Most microcontrollers come with a set of ADD-ONs called peripherals, to enhance the functioning of

More information

TL0313. LCD driver IC. Apr VER 0.0. lsi. ( 5.5V Specification ) 65COM / 132SEG DRIVER & CONTROLLER FOR STN LCD. TOMATO LSI Inc.

TL0313. LCD driver IC. Apr VER 0.0. lsi. ( 5.5V Specification ) 65COM / 132SEG DRIVER & CONTROLLER FOR STN LCD. TOMATO LSI Inc. LCD driver IC Apr. 2001 VER 0.0 lsi 65COM / 132SEG DRIVER & CONTROLLER ( 5.5V Specification ) FOR STN LCD TOMATO LSI Inc. 1. INTRODUCTION The is a driver and controller LSI for graphic dot-matrix liquid

More information

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction. AVR XMEGA TM Product Introduction 32-bit AVR UC3 AVR Flash Microcontrollers The highest performance AVR in the world 8/16-bit AVR XMEGA Peripheral Performance 8-bit megaavr The world s most successful

More information

HC12 Built-In Hardware

HC12 Built-In Hardware HC12 Built-In Hardware The HC12 has a number of useful pieces of hardware built into the chip. Different versions of the HC12 have slightly different pieces of hardware. We are using the MC68HC912B32 chip

More information

RoHS. Shock / vibration resistant. Short circuit proof. Flexible. . XXXX e. . XXXX e

RoHS. Shock / vibration resistant. Short circuit proof. Flexible. . XXXX e. . XXXX e The Sendix multiturn encoders 5862 and 5882, with SSI or RS485 interface and combined optical and magnetic sensor technology, offer a maximum resolution of 25 bits. These encoders are programmable via

More information

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation Embedded systems Exercise session 3 Microcontroller Programming Lab Preparation Communications Contact Mail : michael.fonder@ulg.ac.be Office : 1.82a, Montefiore Website for the exercise sessions and the

More information

Rotary Measuring Technology Absolute encoders, Multiturn, optional with incremental track

Rotary Measuring Technology Absolute encoders, Multiturn, optional with incremental track Electronic multiturn gear with intelligent sensing technology (IST) Integrative Technology Max. 4 programmable outputs* for the SSI version Programmable parameters include*: code type, resolution per revolution,

More information

LV8414CSGEVK V1.0 Evaluation Kit User Guide

LV8414CSGEVK V1.0 Evaluation Kit User Guide LV8414CSGEVK V1.0 Evaluation Kit User Guide 03/25/2016 1 www.onsemi.com NOTICE TO CUSTOMERS The LV8414CS Evaluation Kit is intended to be used for ENGINEERING DEVELOPMENT, DEMONSTRATION OR EVALUATION PURPOSES

More information

Functional block diagram AD53x1 (Analog Devices)

Functional block diagram AD53x1 (Analog Devices) Objectives - To read the A/D converter and turn the converted digital value back into an analogue voltage using an external D/A converter. The entire cycle including ADC and DAC is to be run at a fixed

More information

PART TOP VIEW ADDR2 ADDR3 ADDR4 SELECT S/H CONFIG V L DGND V SS AGND IN CH. Maxim Integrated Products 1

PART TOP VIEW ADDR2 ADDR3 ADDR4 SELECT S/H CONFIG V L DGND V SS AGND IN CH. Maxim Integrated Products 1 9-675; Rev ; 4/ 32-Channel Sample/Hold Amplifier General Description The MAX567 contains 32 sample-and-hold amplifiers driven by a single multiplexed input. The control logic addressing the outputs is

More information

Course Introduction. 2009, Renesas Technology America, Inc., All Rights Reserved

Course Introduction. 2009, Renesas Technology America, Inc., All Rights Reserved Course Introduction Purpose This course provides an introduction to the peripheral functions built into R8C Tiny series microcontrollers (MCUs). Objective Learn about the features and operation of the

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

1-Megabit (128K x 8) 5-volt Only Flash Memory AT29C010A. Features. Description. Pin Configurations

1-Megabit (128K x 8) 5-volt Only Flash Memory AT29C010A. Features. Description. Pin Configurations Features Fast Read Access Time - 70 ns 5-Volt Only Reprogramming Sector Program Operation Single Cycle Reprogram (Erase and Program) 1024 Sectors (128 bytes/sector) Internal Address and Data Latches for

More information

Technical Information Manual

Technical Information Manual Technical Information Manual Revision n. 3 28 August 2002 MOD. V550 / V550 B MOD. V550 A / V550 AB 2 CHANNEL C-RAMS CAEN will repair or replace any product within the guarantee period if the Guarantor

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Stefan Kowalewski, 4. November 25 Introduction to Embedded Systems Part 2: Microcontrollers. Basics 2. Structure/elements 3. Digital I/O 4. Interrupts 5. Timers/Counters Introduction to Embedded Systems

More information

Product Information on the Manual

Product Information on the Manual Product Information on the Manual Edition 04.2003 S7-300 Module Specifications, Edition 11/2002, (A5E00105505-02) Introduction The S7-300 product family has been enhanced and improved. This document contains

More information

Course Introduction. Purpose: Objectives: Content: Learning Time:

Course Introduction. Purpose: Objectives: Content: Learning Time: Course Introduction Purpose: This course provides an overview of the Renesas SuperH series of 32-bit RISC processors, especially the microcontrollers in the SH-2 and SH-2A series Objectives: Learn the

More information

EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8

EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8 EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8 Jonathan W. Valvano First: Last: This is the closed book section. You must put your answers in the boxes on this answer page. When you are

More information

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт.

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт. SECOND шт. Assembly and С Programming forthefreescalehcs12 Microcontroller Fredrick M. Cady Department of Electrical and Computer Engineering Montana State University New York Oxford Oxford University

More information

PART TOP VIEW ADDR2 ADDR3 ADDR4 SELECT S/H CONFIG V L DGND V SS AGND IN N.C. Maxim Integrated Products 1

PART TOP VIEW ADDR2 ADDR3 ADDR4 SELECT S/H CONFIG V L DGND V SS AGND IN N.C. Maxim Integrated Products 1 9-674; Rev ; 4/ 32-Channel Sample/Hold Amplifier General Description The MAX568 contains 32 sample/hold amplifiers and four -of-8 multiplexers. The logic controlling the muxes and sample/hold amplifiers

More information

DM-OLED X 64 BLUE GRAPHIC OLED DISPLAY MODULE WITH SPI, I2C INTERFACE

DM-OLED X 64 BLUE GRAPHIC OLED DISPLAY MODULE WITH SPI, I2C INTERFACE 1.3 128 X 64 BLUE GRAPHIC OLED DISPLAY MODULE WITH SPI, I2C INTERFACE Contents Revision History Main Features Pin Description Panel Pin Description Module Pin Description Mechanical Drawing Panel Mechanical

More information

INTERFACING HARDWARE WITH MICROCONTROLLER

INTERFACING HARDWARE WITH MICROCONTROLLER INTERFACING HARDWARE WITH MICROCONTROLLER P.Raghavendra Prasad Final Yr EEE What is a Microcontroller? A microcontroller (or MCU) is acomputer-on-a-chip. It is a type of microprocessor emphasizing self-

More information

ST Sitronix ST7565R. 65 x 132 Dot Matrix LCD Controller/Driver. Ver 1.7 1/ /06/01

ST Sitronix ST7565R. 65 x 132 Dot Matrix LCD Controller/Driver. Ver 1.7 1/ /06/01 ST Sitronix ST7565R 65 x 32 Dot Matrix LCD Controller/Driver Features Directly display RAM data through Display Data RAM. RAM capacity : 65 x 32 = 8580 bits Display duty selectable by select pin /65 duty

More information

IP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1.

IP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1. IP-48DAC-16 48-channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL 828-10-000-4000 Version 1.0 January 2007 ALPHI TECHNOLOGY CORPORATION 1898 E. Southern Ave Tempe,

More information

INTERFACING INTERFACING. Richa Upadhyay Prabhu. NMIMS s MPSTME February 25, 2016

INTERFACING INTERFACING. Richa Upadhyay Prabhu. NMIMS s MPSTME February 25, 2016 INTERFACING Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu February 25, 2016 8255: Programmable Peripheral Interface or Programmable Input output Device Introduction METHODS OF DATA TRANSFER

More information

RX Family, RL78 Family

RX Family, RL78 Family Introduction APPLICATION NOTE This application note explains the method of controlling R1EV24xxx, R1EX24xxx, and HN58X24xxx series I 2 C serial EEPROM, manufactured by Renesas Electronics, by using a Renesas

More information

Tongta Inverter TDS-F8

Tongta Inverter TDS-F8 Tongta Inverter TDS-F8 MODBUS Communication Application Manual Please ensure the user gets this manual, for the optimal use of this device. 1. Introduction: TEK-DRIVE / TDS-F8 INVERTER MODBUS Communication

More information

Microcontroller & Interfacing

Microcontroller & Interfacing Course Title Course Code Microcontroller & Interfacing EC406 Lecture : 3 Course Credit Practical : 1 Tutorial : 0 Total : 4 Course Objective At the end of the course the students will be able to Understand

More information

CCS Technical Documentation NHL-2NA Series Transceivers. Camera Module

CCS Technical Documentation NHL-2NA Series Transceivers. Camera Module CCS Technical Documentation NHL-2NA Series Transceivers Issue 1 07/02 Nokia Corporation NHL-2NA CCS Technical Documentation [This page left intentionally blank] Page 2 Nokia Corporation Issue 1 07/02 CCS

More information

E Series Multifunction I/O 1.25 MS/s, 12-Bit, 16 or 64 Analog Inputs

E Series Multifunction I/O 1.25 MS/s, 12-Bit, 16 or 64 Analog Inputs E Series Multifunction I/O 1.25 MS/s, 12-Bit, 16 or 64 Inputs Families (E-1) Families (E-1) Family (MIO-16E-1) PCI-MIO-16E-1 PXI- AT-MIO-16E-1 Family (MIO-64E-1) PCI- PXI- VXI-MIO-64E-1 Input 16 single-ended,

More information

Lecture-50 Intel 8255A: Programming and Operating Modes

Lecture-50 Intel 8255A: Programming and Operating Modes Lecture-50 Intel 8255A: Programming and Operating Modes Operation Description: There are three basic modes of operation that can be selected by the system software. Mode 0: Basic Input/output Mode 1: Strobes

More information

CENG-336 Introduction to Embedded Systems Development. Timers

CENG-336 Introduction to Embedded Systems Development. Timers CENG-336 Introduction to Embedded Systems Development Timers Definitions A counter counts (possibly asynchronous) input pulses from an external signal A timer counts pulses of a fixed, known frequency

More information

SuperH RISC engine Family

SuperH RISC engine Family Safety Service Satisfaction -Renesas Microcomputer- 4/28/2009 Rev.16.00 1 SuperH RISC engine Roadmap SH-4A SH-4 SH-3, SH3-DSP SH7750 series SH7750R SH7751R SH7750S SH7751 to 240 MHz SH7700 series SH7720/21

More information

Rotary Measuring Technology

Rotary Measuring Technology --20 40... 60 + C 85 Temperature Shock/vibration resistant Short-circuit proof Reverse polarity protection One type for every situation: Version "flameproof-enclosure": approval zones 1, 2 and 21, 22 Zones

More information

CPU Units with 20 I/O points

CPU Units with 20 I/O points CPM2A General s CPU Units with 20 I/O points CPU Units with 30 I/O points CPU Units with 40 I/O points Supply voltage AC power 100 to 240 VAC, 50/60 Hz DC power 24 VDC Operating voltage AC power 85 to

More information

MOS INTEGRATED CIRCUIT

MOS INTEGRATED CIRCUIT DATA SHEET MOS INTEGRATED CIRCUIT µpd6708 IEBus (Inter Equipment Bus ) PROTOCOL CONTROL LSI DESCRIPTION The µpd6708 is a peripheral LSI for microcontrollers that controls the protocol of the IEBus. This

More information

Registers Format. 4.1 I/O Port Address

Registers Format. 4.1 I/O Port Address 4 Registers Format The detailed descriptions of the register format and structure of the ACL- 8112 are specified in this chapter. This information is quite useful for the programmer who wish to handle

More information

Real Time Operating Systems Application Board Details

Real Time Operating Systems Application Board Details Real Time Operating Systems Application Board Details Hardware Interface All labs involve writing a C program to generate an interface between a PC and an external Multi-Applications board. A 40-way ribbon

More information

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly. Unit I 8085 and 8086 PROCESSOR Introduction to microprocessor A microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale

More information

PMC-DA Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL Version 1.0 June 2001

PMC-DA Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL Version 1.0 June 2001 PMC-DA816 8 Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL 796-10-000-4000 Version 1.0 June 2001 ALPHI TECHNOLOGY CORPORATION 6202 S. Maple Avenue #120 Tempe, AZ 85283 USA Tel: (480) 838-2428 Fax:

More information

RL78/I1A APPLICATION NOTE. Lighting Communications Using RL78/I1A (Transmission) Introduction. Target Devices. Contents. R01AN3193EJ0100 Rev.1.

RL78/I1A APPLICATION NOTE. Lighting Communications Using RL78/I1A (Transmission) Introduction. Target Devices. Contents. R01AN3193EJ0100 Rev.1. Introduction APPLICATION NOTE R01AN3193EJ0100 Rev.1.00 The application note explains the control program to be implemented in RL78/I1A Lighting Communication Master Evaluation Board. Refer to the "RL78/I1A

More information