Delta Electronics VFD004L21B [29/50] Рэ_vdf_l_201529

Содержание

Похожие устройства

include stdio h include dos h include conio h include process h define PORT Ox03F8 the address of C0M1 the address offset value relative to C0M1 define THR 0x0000 define RDR 0x0000 define BRDL 0x0000 definelER 0x0001 define BRDH 0x0001 define LCR 0x0003 define MCR 0x0004 define LSR 0x0005 define MSR 0x0006 unsigned char rdat 60 read 2 data from address 2102H of AC drive with address 1 unsigned char idat 60 0 1 0 3 2 T 0 2 0 0 0 2 D 7 r n void main int i outportb PORT MCR 0x08 interrupt enable outportb PORT IER 0x01 interrupt as data in outportb PORT LCR inportb PORT LCR 10x80 the BRDL BRDH can be access as LCR b7 1 7 outportb PORT BRDL 12 set baudrate 9600 12 115200 96007 outportb PORT BRDH 0x00 outportb PORT LCR Ox06 set protocol 7 N 2 06H 7 E 1 1AH 7 0 1 OAH 8 N 2 07H 8 E 1 1BH 8 0 1 0BH 7 for i 0 K 16 i while inportb PORT LSR 0x20 wait until THR empty outportb PORT THR tdat i send data to THR 7 0 while kbhit lf inportb PORT LSR 0x01 b0 1 read data ready 7 rdat i inportb PORT RDR read data form RDR 7 Перевод и адаптация ООО НПО СТОИК www stoikltd ru 29

Скачать