8 ‘c’ programming, 1 sm-adc1 library, 8 ‘c’ programming -94 – Pepper Computer Modular Computers RS485 User Manual

Page 250: 1 sm-adc1 library -94, Smart i/o user’s manual, Chapter 5 analog modules

Advertising
background image

SMART I/O User’s Manual

October 01, 1996

©1996 PEP Modular Computers GmbH

Page 5 - 94

Chapter 5 Analog Modules

5.4.8 ‘C’ Programming

5.4.8.1 SM-ADC1 Library

The SM-ADC1 library of functions smartio.l provide a convenient way of

accessing the SM-ADC1 module.

• All functions are written in ANSI C;

• Prototypes are to be found in the file adc1lib.h.

Hardware Requirements

• SMART I/O Base Module or Base Module and Extension unit;

• SM-ADC1 Module.

Software Requirements

The compiler from one of the following:

• Ultra C Version 1.1.2 or higher;

• FasTrak 2.0.2 or higher.

The leftmost SM-Module has number 0 assigned to it a far as programming

is concerned although physically this is slot 1!

Before a library function can be used, the function SMADC1Init must first be

called. This allocates the requested resources. Furthermore, this function

needs to be called for each SM-ADC1 Module called within the task. Upon

completion of the application, the function SMADC1DeInit needs to be

called for each SM-ADC1 Module that has been initialised.

In order to illustrate the use of the SM-ADC1 library, an application example

called demoadc1.c can be found in the SMART I/O application directory

(normally found in /<device>/APPLIC/SMART/CMDS).

Advertising
This manual is related to the following products: