I-8000 Series (C Language Based) User Manual, Version 1.0.1 Page: 85
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
API for showing data from COM ports
6. printCom()
Functions such as printfCom() in the C library allow data to be output from COM
ports.
For example, showing data from the COM1 port.
#include <stdio.h>
#include “8000E.h”
void main(void)
{
int i;
/* Initiate the upac5000 library */
InitLib();
InstallCom(1, 115200, 8, 0, 1);
/* Install the COM1 driver */
for (i=0;i<10;i++)
{
printCom(1,”Test %d\n\r”, i);
}
Delay(10);
/* Wait for all data are transmitted to COM port */
RestoreCom(1);
}