ICP DAS USA PIO-D144 User Manual page 9

Hide thumbs Also See for PIO-D144:
Table of Contents

Advertisement

ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ
+7(495)109-02-08 sales@bbrc.ru www.bbrc.ru
Example 2: assume initial level=High, PC0 is used as interrupt source:
Initial=High
Iniaial_sub()
{ now_int_state=1
_outpd(wBase+0x2a,1)
/*(select the inverted signal)*/
ISR_sub()
{
If (now_int_state==0) /* old state=low ! change to high now */
{
now_int_state=1;
/*** application codes are given here ***/
_outpd(wBase+0x2a,1);
}
else
{
now_int_state=0;
/*** application codes are given here ***/
_outpd(wBase+0x2a,0);
}
if (wIrq>=8) outp(A2_8259,0x20);
outp(A1_8259,0x20);
}
Refer to DEMO4.C for source code.
Inverted=Low
/* now int_signal is High
/* select the inverted signal
/* old state=high! change to low now */
/* now int_signal is Low
/* select the non-inverted signal */
Version: 2.1
Date: 1999/10
PIO-D144 User's Manual
*/
*/
*/
/*
EOI
*/
/*
EOI
*/
Page 9

Advertisement

Table of Contents
loading

Table of Contents