Counter timer controller
6000 Series user’s manual
15-10
Return registers:
Carry flag cleared if successful
Carry flag set if error
AL
Error code
Comments:
This function shall be used to initialize CTC.
Programming example:
/* Inline assembly code for Borland C++ 3.1 */
/* To configure channel 0 to generate IRQ 12
interrupt every 1s */
/* To configure channel 1 to generate IRQ 11
interrupt every 10s */
asm {
mov
ax,0ee00h
mov
bl,01h /* timebase = 1/100*/
mov
bh,00h /* 1.8432 MHz input clock
frequency */
mov
cl,00h /* channel 0 used as square
wave generator */
mov
ch,01h /* channel 1, used as rate
generator */
mov
si,100 /* channel 0 period =
(1/100)*100 = 1s */
mov
di,1000 /* channel 1 period =
(1/100)*1000 = 10s */
mov
dx,0ffffh
int
17h
}
Error code definition:
Error code
Meaning
ffh
Unknown error
01h
Function not implemented
02h
Defective serial EEPROM
03h
Illegal access
04h
EZ I/O data out of range
05h
CTC data out of range
Note
Refer to the \CTC directory on the 6020 utility disk for programming
examples.
≡
CAMBASIC
CAMBASIC can program the CTC with the INT 17H commands. Refer to
the \CTC directory in the 6020 utility disk for CAMBASIC programming
examples.
Summary of Contents for 6000 Series
Page 7: ...Notice to user PC 500 user s manual ...
Page 9: ...About this manual 6000 Series user s manual ...
Page 37: ...2 20 Quick start 6000 Series user s manual ...
Page 65: ...5 16 Serial ports 6000 Series user s manual ...
Page 87: ...6 22 EZ I O 6000 Series user s manual ...
Page 103: ...8 8 Analog I O 6000 Series user s manual ...
Page 119: ...14 2 PC 104 expansion 6000 Series user s manual ...
Page 133: ...16 4 Watchdog timer reset and remote reset 6000 Series user s manual ...
Page 139: ...17 6 Serial EEPROM 6000 Series user s manual ...
Page 157: ...21 2 Software utilities 6000 Series user s manual ...
Page 161: ...22 4 Troubleshooting 6000 Series user s manual ...
Page 177: ...A 16 6010 technical data 6000 Series user s manual ...
Page 215: ...D 16 6040 technical data 6000 Series user s manual ...
Page 229: ...F 2 Miscellaneous 6000 Series user s manual ...