Advantech PCI-1602 Especificaciones Pagina 85

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 89
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 84
78 PCL-743/745 Series User's Manual
/* Set up Port 1 (COM1) */
outport((base0+2),0xc9); /* Enable FIFO
*/
outp(base1+3,0x80); /* Set DLAB=1 */
/*Set bps = 115200 */
outp(base0 ,0x01); outp(base0+1,0x00);
outp(base0+3,0x03); /* set data=8; stop=1; no
parity*/
outp(base0+1,0x00); /* disable interrupt */
/* (Set up) Port 2 (COM2) */
outport((base1+2),0xc9); /* Enable FIFO
*/
outp(base1+3,0x80); /* Set DLAB=1 */
/* Set bps = 115,200 */
outp(base1 ,0x01); outp(base1+1,0);
outp(base1+3,0x03); /* Set data=8; stop=1; no pari-
ty*/
oupt(base1+1,0x00); /* Disable interrupt */
printf(:\nEnter string (max 15 char) or Q to
quit:");
gets(cmd);
while (cmd{0} != 'q' && cmd[0] != 'Q')
{
/* Send string on Port 1 (COM1) */
i=0;
cmd[strlen(cmd)] = 0x0d;
flag=1;
while (flag)
{
outportb(base0,cmd[i]); /* send data */
if (cmd[i] == 0x0d;
Vista de pagina 84
1 2 ... 80 81 82 83 84 85 86 87 88 89

Comentarios a estos manuales

Sin comentarios