background image

Ver.1.30

PO-32L(PC)V

4

Example

Program that makes LED connected to O00 output terminal
as an example of use of this board. According to ON/OFF of
the external switch connected to I00 input terminal turn on
switch off is shown below. Description language is Microsoft
C. In the state of switch-on, 1 is displayed on screen, LED
lights up, 0 is displayed on screen in the state of switch-off,
and LED puts out the light.

Setting Conditions

I/O Address: 0300H
Interrupt: unused (Please remove all the short connectors of
JP1.)

Connection example

 

+

 

-

 

O

 

0

 

0

 

(

 

C

 

N

 

1

 

 

 

:

 

 

 

2

 

p

 

i

 

n

 

)

 

t

 

r

 

o

 

P

 

External 

Power supply

 

D

 

C

 

1

 

2

 

 

 

~

 

2

 

4

 

V

 

L

 

E

 

D

 

5

 

.

 

1

 

k

 

O

 

Positive common

 

(

 

C

 

N

 

1

 

:

 

 

 

1

 

8

 

p

 

i

 

n

 

)

 

Negative common

 

 

 

(

 

C

 

N

 

1

 

 

 

:

 

1

 

p

 

i

 

n

 

)

 

Program List

#include<stdio.h>
void main (void)
{
  int port ;
  int pidata ;

  port = 0x300 ;         /*Set I/O Address*/
  do {
    pidata = inp ( port ) ;  /*Input data*/
    printf( "%x\n", pidata );  /*Display data*/
    outp( port, pidata )    /*Output data*/
  }while( !kbhit() ) ;
}

 

Start 

Set I/O Address 

 

Output Data 

 

Output Data

 

Bit Setting Of 

Output Data 

Bit Setting Of 

 

Output Data 

 

Flow Chat

Содержание PO-32L(PC)V

Страница 1: ...ification Item Specification Output Type Opto Isolated Open Collector Output current sinking type Negative logic Voltage 35VDC Max Rating Current 100mA Max per channel Number of Channels 32 channels 16 channels with the common Response time 1ms Max Common I O address Any 4 byte boundary External power supply 12 to 24VDC 15 Note 4mA 12V to 8mA 24V per input channel Power consumption 5VDC 50mA Max O...

Страница 2: ...O 15 O 16 O 17 OP 0 1 N C 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ON 2 3 O 20 O 21 O 22 O 23 O 24 O 25 O 26 O 27 O 30 O 31 O 32 O 33 O 34 O 35 O 36 O 37 OP 2 3 0 port Output 1 port Output 2 port Output 3 port Output Common minus pin for 2 3 output port Common plus pin for 0 1 output port Common plus pin for 2 3 output port Common minus pin for 0 1 output port Output Circuit Output ci...

Страница 3: ...tput to the bit the data is set to OFF Block Diagram I O base addr ess D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 0H 1H Oxx is an output signal name numbers in bracket s are connector pin number s 2H 3H O00 O10 O20 O30 29 21 10 2 O01 O11 O21 O31 30 22 11 3 O02 O12 O22 O32 31 23 12 4 O03 O13 O23 O33 32 24 13 5 O04 O14 O24 O34 33 25 14 6 O05 O15 O25 O35 34 26 15 7 O06 O16 O26 O36 35 27 16 8 O07 O17 O27 O37 36 ...

Страница 4: ... switch off and LED puts out the light Setting Conditions I O Address 0300H Interrupt unused Please remove all the short connectors of JP1 Connection example O00 CN1 2pin t r o P External Power supply DC12 24V LED 5 1kO Positive common CN1 18pin Negative common CN1 1pin Program List include stdio h void main void int port int pidata port 0x300 Set I O Address do pidata inp port Input data printf x...

Отзывы: