Multiplexing i/o models, Performing i/o: functions and events, General i/o functions – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual

Page 28: 18 for mor

Advertising
background image

18

Introduction

The IO2 pin is an output bit I/O object (because the output is declared last).

Assuming that the io_set_direction( ) function is not called, a subsequent call to
the io_out( ) function for ioPoint2 sets the level of this pin. A call to the io_in( )

function for ioPoint1 can then be used to read back the actual pin level of this

output object.

Multiplexing I/O Models

Input to one of the timer/counter circuits can be multiplexed among pins IO_4 to

IO_7 or provide output to IO_0. This timer/counter is called Timer/Counter 1 or

the

multiplexed

timer/counter. A second timer/counter circuit derives input only

from IO_4 or provides output to IO_1. This second timer/counter circuit is called

Timer/Counter 2 or the

dedicated

timer/counter. Figure 6 shows a signal flow

diagram for both the multiplexed and dedicated timer/counter circuits.

Figure 6. Flow Diagram for Timer/Counter Circuits

Performing I/O: Functions and Events

A Neuron C application program can access I/O objects in either of the following
ways:

• By using an explicit io_in( ) or io_out() function
• By referring to an event associated with the object in a when clause
• For timer/counter objects, by using the io_select() function

The following sections describe both methods.

General I/O Functions

After you declare the I/O objects for a Neuron C application, you can access the

objects through the I/O functions that are provided by Neuron C language. Table
7
on page 19 lists these functions. You do not need to declare or link these

Advertising