
comunicacion puerto serial
Publicado por manuel (1 intervención) el 13/07/2012 02:08:31
hola veran tengo problemas con el siguiente programa para utilizar el puerto serial de un pc a otro pc, los errores son estos :call to undefined function "bioscom" in function leer() y call to undefined function "bioscom" in function main()
lo estoy haciendo en turbo c++
lo estoy haciendo en turbo c++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <conio.h>
#include <stdio.h>
#include <dos.h>
#include <math.h>
#include <bios.h>
int puerto,k,j,dato,config;
char lectura[1],dato1[2];
char leer()
{
do{
dato=bioscom(2,0x83,puerto);
} while (!kbhit());
return(dato);
}
void main(void)
{
clrscr();
printf("Ingrese puerto COM a usar: ");
scanf("%d", &puerto);
while(puerto<1 || puerto>4)
{
clrscr();
printf("ERROR... Debe ingresar 1, 2, 3 o 4 !!!\n\n");
printf("Ingrese puerto COM a usar: ");
scanf("%d", &puerto);
}
puerto--;
config=0x83;
bioscom(0,config,puerto);
clrscr();
gotoxy(14,4);
printf("RECEPCION DE DATOS VIA SERIE");
gotoxy(8,6);
printf("Config --> COM %d \\ 1200 bps \\ 8N1", puerto+1);
gotoxy(29,8);
printf("Escape --> Salir");
gotoxy(23,10);
printf("MONITOR DE RECEPCION: ");
do{
if(!kbhit()) dato1[0]=leer();
if(!kbhit())
{
gotoxy(40,12);
printf("%1s ",dato1);
}
}while(!kbhit());
getch();
}
Valora esta pregunta


0