5-4
<Toc> <Ind>
<5. Sample Programs >
IM 34M6H54-01E
1st Edition : Feb.01,1999-00
5.2
Sample Program Using BASIC Statements
1000 ! F3XSO4 Sample program
1010 !
1020 ! Setting CH1
1030 ! Input : Rising edge, ring maximum value $FFFF, continue on return to $0,
no filter
1040 ! Output : On when counter value returns to 0
1050 CONTROL XS ,17 ; $4000
1060 CONTROL XS , 18 ; $8000
1070 CONTROL XS , 19 , $0
1080 CONTROL XS , 20 , $40
1090 !
1100 ! Setting CH2
1110 ! Input : Rising edge, ring maximum value = 19999, stop on return to $0,
with filter
1120 ! Output : On when counter value = preset value 1
1130 CONTROL XS , 21 ; 10000
1140 CONTROL XS , 22 ; 20000
1150 CONTROL XS , 23 ; $E
1160 CONTROL XS , 24 ; $1000
1170 !
1180 ! Setting CH3
1190 ! Input : Falling edge, ring maximum value = $FFFF, continue on return to
$0
1200 ! Output : On when counter value returns to $0
1210 CONTROL XS , 25 ; 0
1220 CONTROL XS , 26 ; 0
1230 CONTROL XS , 27 ; $9
1240 CONTROL XS , 28 ; $2080
1250 !
1260 ! CH4
1270 ! Input :
Falling edge, ring maximum value = 10, continue on return to $0,
with filter
1280 ! Output: On when counter value returns to $0
1290 CONTROL XS , 29 ; 0
1300 CONTROL XS , 30 ; 11
1310 CONTROL XS , 31 ; $B
1320 CONTROL XS , 32 ; $4100
1330 !
1340 ! Set receive filter constant
1350 ! Set to eliminate pulses below 32.7ms
1360 CONTROL XS , 33 ; 14
1370 !
1380 ! Start counting for all channels
1390 CONTROL XS , 102 ; $1111
Summary of Contents for F3XS04-3N
Page 2: ...Blank Page ...
Page 8: ...Blank Page ...
Page 10: ...Blank Page ...
Page 56: ...Blank Page ...
Page 66: ...Blank Page ...