Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. query in rs232 programming in turbo c

query in rs232 programming in turbo c

Scheduled Pinned Locked Moved C / C++ / MFC
databasetutoriallounge
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    narasimhavarmap
    wrote on last edited by
    #1

    hai, i am developing a chat application in turbo c.i used bioscom function to set the port settings and to transmit the data,but iam unable to transmit the data. the prog is : bioscom(0,settings,com1); bioscom(1,n,com1); 'n' is the data which i am transmitting. but the data is not getting displayed in the hyperterminal of another system. plz guide me regarding this . plz reply as soon as possible. from narasimha varma p

    R 1 Reply Last reply
    0
    • N narasimhavarmap

      hai, i am developing a chat application in turbo c.i used bioscom function to set the port settings and to transmit the data,but iam unable to transmit the data. the prog is : bioscom(0,settings,com1); bioscom(1,n,com1); 'n' is the data which i am transmitting. but the data is not getting displayed in the hyperterminal of another system. plz guide me regarding this . plz reply as soon as possible. from narasimha varma p

      R Offline
      R Offline
      Roger CS
      wrote on last edited by
      #2

      What are you using to transmit the data?.. serial cable, modems? Have you confirmed that the hardware is configured correctly by opening a hyperterminal session on the transmitting PC and sending test data to the receiving PC using the same settings as you use in your program? You must make sure that the ports and hardware (serial cable or modems) are properly configured first. Then, if your program still does not work, start looking at the code for errors. Roger

      A 1 Reply Last reply
      0
      • R Roger CS

        What are you using to transmit the data?.. serial cable, modems? Have you confirmed that the hardware is configured correctly by opening a hyperterminal session on the transmitting PC and sending test data to the receiving PC using the same settings as you use in your program? You must make sure that the ports and hardware (serial cable or modems) are properly configured first. Then, if your program still does not work, start looking at the code for errors. Roger

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        i am using null modem cable for the transmission of data.through hyper terminal the data is getting transferred and recieved.but not happening through my program any way i am writing my code down to this matter if possible plz help me to solve this problem my program is as follows:#include #include #include #include #define COM1 1 #define SETTINGS (0x80 | 0x02 | 0x00 | 0x00) void transmit(); void display(); void main() { clrscr(); transmit(); } void transmit() { char msg,msg_in; int status,out,in,count=0,count_in=0,i,extra; int x,y,n; x=bioscom(0, SETTINGS, COM1); bioscom(3,0,COM1); n=x; printf("\n the status in binary is:"); while(n!=0) { printf("%d",(n%2)); n=n/2; } msg=getche(); bioscom(1,msg,COM1); printf("\n %d",x); window(10,10,40,11); /* while (1) { if (kbhit()) { gotoxy(count+1,1); if ((in = getche()) == 27)//if esc is pressed then exit break; if(in==0) { in= getch(); continue; } if(in==8 && count>0) { count-=2;cprintf(" \b");} else msg[count]=in; if(count==70) {in=13; msg[70]=13;} count++; if(in==13 ) { i=0; display(msg,14); for(i=0;i

        R 1 Reply Last reply
        0
        • A Anonymous

          i am using null modem cable for the transmission of data.through hyper terminal the data is getting transferred and recieved.but not happening through my program any way i am writing my code down to this matter if possible plz help me to solve this problem my program is as follows:#include #include #include #include #define COM1 1 #define SETTINGS (0x80 | 0x02 | 0x00 | 0x00) void transmit(); void display(); void main() { clrscr(); transmit(); } void transmit() { char msg,msg_in; int status,out,in,count=0,count_in=0,i,extra; int x,y,n; x=bioscom(0, SETTINGS, COM1); bioscom(3,0,COM1); n=x; printf("\n the status in binary is:"); while(n!=0) { printf("%d",(n%2)); n=n/2; } msg=getche(); bioscom(1,msg,COM1); printf("\n %d",x); window(10,10,40,11); /* while (1) { if (kbhit()) { gotoxy(count+1,1); if ((in = getche()) == 27)//if esc is pressed then exit break; if(in==0) { in= getch(); continue; } if(in==8 && count>0) { count-=2;cprintf(" \b");} else msg[count]=in; if(count==70) {in=13; msg[70]=13;} count++; if(in==13 ) { i=0; display(msg,14); for(i=0;i

          R Offline
          R Offline
          Roger CS
          wrote on last edited by
          #4

          Hey, been awful busy this week and didn't notice that you replied. Check your parameter to bioscom. I think COM1 should be defined as 0 and COM2 would be 1. Your library implementation may be different. You should be passing 3 for the first argument to obtain the status, not 0. Take a look at this page for a complete discussion on bisocom... http://www.funducode.com/freec/Hardware/new_hi_c02/Article02.htm[^] Roger

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups