Advantech PCM-3718 Series User Manual page 69

Pc/104 12-bit das module with programmable gain
Table of Contents

Advertisement

Programming example
The following program (written in C) sets the pacer rate to 25 kHz. It uses
FCLK of 10 MHz, C1 of 40 and C2 of 10.
Then 25 kHz = 10 MHz/(40*10).
OUTPORTB (BASE+3, 0x76); /* SET COUNTER 1 TO MODE 3*/
OUTPORTB (BASE+1, 40); /* WRITE LOW BYTE OF C1*/
OUTPORTB (BASE+1, 0); /* WRITE HIGH BYTE OF C1*/
OUTPORTB (BASE+3, 0xB6); /* SET COUNTER 2 TO MODE 3*/
OUTPORTB (BASE+2, 10); /*WRITE LOW BYTE OF C2*/
OUTPORTB (BASE+2, 0); /*WRITE HIGH BYTE OF C2*/
PCM-3718 Series User Manual
60
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pcm-3718hPcm-3718hgPcm-3718ho

Table of Contents