Download DB4getmud(int din)

Transcript
TG6 Timing Generator
1107
TG6high( din, snum, _beg, _end,
hmask)
Op Code
Prototype
Description
Arguments
Example 1
TG6_HIGH {0x18}
void TG6high( int din, int snum, int _beg, int _end,
int hmask );
Sets selected TG6 outputs high for an interval of a
timing sequence.
The outputs to set high
correspond to true bits (1's) in hmask (other outputs
are unchanged) and the time period is specified by
the _beg and _end parameters.
din
Device index number.
snum Sequence number (0...7).
_beg Seq. position to begin at (0 ... seq. lgth - 1).
_end Seq. position to end at ( _beg+1 ... seq. lgth - 1).
hmask Bit locations to set high (0...63/0x3f) dec/hex.
TG6high(1, 1, 10, 11, 0x01);
Channel 1 will produce a one-count pulse at time 10.
Example 2
TG6baserate(1, _1ms);
TG6new(1, 3, 200, 0x00);
TG6high(1, 3, 25, 75, 0x0a);
TG6high(1, 3, 100, 115, 0x0a);
TG6high(1, 3, 50, 130, 0x20);
TG6new defines a new timing sequence (#3) and
sets all channels default low. TG6high sets outputs
2, 4 and 6 to produce the timing sequence shown
below:
TG6 Outputs 2 and 4
0
25
75
199
100 115
TG6 Output 6
0
50
130
199
All other outputs remain unchanged from their
default states.