Delta ASDA-A3 Series User Manual page 619

Hide thumbs Also See for ASDA-A3 Series:
Table of Contents

Advertisement

MODBUS Communication
outportb(PORT+BRDH,0x00);
outportb(PORT+LCR,0x06);
9
for( I = 0; I<=16; I++ ) {
while( !(inportb(PORT+LSR) & 0x20) );
outportb(PORT+THR,tdat[I]);
}
I = 0;
while( !kbhit() ) {
if( inportb(PORT+LSR)&0x01 ) {
}
}
}
9-14
rdat[I++] = inportb(PORT+RDR);
/* set prorocol
<7,E,1> = 1AH,
<8,N,2> = 07H
<8,O,1> = 0BH
/* wait until THR empty */
/* send data to THR */
/* b0==1, read data ready */
/*
read data from RDR */
ASDA-A3
<7,O,1> = 0AH
<8,E,1> = 1BH
*/

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ecm-a3 series

Table of Contents