Examples; Software Mode - Contec PLUG-IN PTI-4GY Manual

Input module for pt100 thermo-sensor
Table of Contents

Advertisement

Examples

Software Mode

Flowchart
Following is a description of an example where the PTI-4(FIT)GY is installed at device ID: 0.
Start
Conversion disable
setting
Read input data
End
Figure 4.18. Flow chart of software mode
Sample program
/* ==========================================================================
Sample program 1
DEVICE ID:
Channel:
========================================================================== */
#include <stdio.h>
#include <conio.h>
/* ----- Constant --------------------------------------------------------- */
#define
ADR
0x0800
/* ----- Prototype -------------------------------------------------------- */
void
main( void );
/* ----- Main ------------------------------------------------------------- */
void
main( void )
{
long
float
unsigned char
unsigned char
PTI-4(FIT)GY
Address : Output 0Ch to a base I/O address of +0Eh
disables conversion of channels 2 and 3.
Address : Output channel value to a base I/O address+0Fh
and input a base I/O address+10h, 11h and 12h
gains temperature value and disables conversion of
channel 2 and 3.
0
Input 4ch/
/* I/O address */
inData;
inData1;
convSet=0x0C;
ch;
4. Using the I/O Address Map
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Plug-in pti-4fitgy

Table of Contents