EasyManuals Logo

Delta Electronics ASDA-B Series User Manual

Delta Electronics ASDA-B Series
321 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #251 background imageLoading...
Page #251 background image
Chapter 8 MODBUS Communications|ASDA-B Series
8-16 Revision January 2009
int I;
outportb(PORT+MCR,0x08); /* interrupt enable */
outportb(PORT+IER,0x01); /* interrupt as data in */
outportb(PORT+LCR,( inportb(PORT+LCR) | 0x80 ) );
/* the BRDL/BRDH can be access as LCR.b7 == 1 */
outportb(PORT+BRDL,12);
outportb(PORT+BRDH,0x00);
outportb(PORT+LCR,0x06); /* set prorocol
<7,E,1> = 1AH, <7,O,1> = 0AH
<8,N,2> = 07H <8,E,1> = 1BH
<8,O,1> = 0BH */
for( I = 0; I<=16; I++ ) {
while( !(inportb(PORT+LSR) & 0x20) ); /* wait until THR empty */
outportb(PORT+THR,tdat[I]); /* send data to THR */
}
I = 0;
while( !kbhit() ) {
if( inportb(PORT+LSR)&0x01 ) { /* b0==1, read data ready */
rdat[I++] = inportb(PORT+RDR); /* read data from RDR */
}
}
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Delta Electronics ASDA-B Series and is the answer not in the manual?

Delta Electronics ASDA-B Series Specifications

General IconGeneral
BrandDelta Electronics
ModelASDA-B Series
CategoryDC Drives
LanguageEnglish

Related product manuals