Delta ASDA-A3 Series User Manual page 481

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) ); /* wait until THR empty */
outportb(PORT+THR,tdat[I]);
}
I = 0;
while( !kbhit() ) {
if( inportb(PORT+LSR)&0x01 ) { /* b0==1, read data ready */
}
}
}
9-14
rdat[I++] = inportb(PORT+RDR); /*
/* set prorocol
<7,E,1> = 1AH,
<8,N,2> = 07H
<8,O,1> = 0BH
/* send data to THR */
read data from RDR */
<7,O,1> = 0AH
<8,E,1> = 1BH
*/
Revision December, 2017
ASDA-A3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents