Operation As Carrier Generator - NEC PD789860 User Manual

8-bit single-chip microcontrollers pd789860 subseries; pd789861 subseries
Table of Contents

Advertisement

9.4.3 Operation as carrier generator

An arbitrary carrier clock generated by TM40 can be output in the cycle set in TM30.
To operate timer 30 and timer 40 as carrier generators, setting must be made in the following sequence.
<1> Disable operation of TM30 and TM40 (TCE30 = 0, TCE40 = 0).
<2> Disable timer output of TMO (TOE40 = 0).
<3> Set count values in CR30, CR40, and CRH40.
<4> Set the operation mode of timer 40 to carrier generator mode (see Figures 9-4 and 9-5).
<5> Set the count clock for timer 30 and timer 40.
<6> Set remote control output to carrier pulse (RMC40 (bit 2 of carrier generator output control register 40
(TCA40)) = 0).
Input the required value to NRZB40 (bit 1 of TCA40) by program.
Input a value to NRZ40 (bit 0 of TCA40) before it is reloaded from NRZB40.
<7> Clear P20 to output mode (PM20 = 0) and the P20 output latch to 0 and enable TMO output by setting
TOE40 to 1.
<8> Enable the operation of TM30 and TM40 (TCE30 = 1, TCE40 = 1).
<9> Save the value of NRZB40 to a general-purpose register.
<10> When INTTM30 rises, the value of NRZB40 is transferred to NRZ40. After that, rewrite TCA40 with an 8-bit
memory manipulation instruction. Input the value to be transferred to NRZ40 next time to NRZB40, and input
the value saved in <9> to NRZ40.
<11> Generate the desired carrier signal by repeating <9> and <10>.
CHAPTER 9 8-BIT TIMERS 30 AND 40
User's Manual U14826EJ5V0UD
109

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd78e9861aPd78e9860aPd789860(a)Pd789861

Table of Contents