beautypg.com

2 waveform output with, 2 waveform output with gating -25, Figure 6-7. waveform output with gating -25 – Maxim Integrated MAXQ7667 User Manual

Page 119: Maxq7667 user’s guide

background image

6-25

__________________________________________________________________________________________________________

MAXQ7667 User’s Guide

6.7.8.2 Waveform Output with Gating

This example uses the code from the previous example, with the modification that the primary pin is now the gating input. The output

on the secondary pin is gated when the primary pin is low. The 1/3 duty cycle waveform is output on the secondary pin whenever the

primary pin is held high.

org 0

;

main_top:

move T2V0, #04000h

;

move T2R0, #04000h

;

move T2C0, #0C000h

;

move T2CFG0, #000h

; 0010 0000

; C/T2

0,

Timer Mode

; CCF1:0

00,

Compare Mode

; T2MD

0,

16-bit Mode

; T2DIV2:0

000,

No freq. pre-scaling

; T2CI

0,

use system clock

move T2CNB0, #040h

INPUT ON THE

PRIMARY PIN

COUNT

RESUMED

COUNT

SUSPENDED

NOT TO SCALE

OUTPUT ON THE

SECONDARY PIN

Figure 6-7. Waveform Output with Gating