Problem in RS232 Port Access

Discussion in 'C' started by thangaduraibeece, Jul 4, 2008.

  1. thangaduraibeece

    thangaduraibeece New Member

    Joined:
    Jul 4, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Hi Friends,

    I am a newbie in port accessing from turboc.
    I established a communication between PC and another device through RS232 protocol.
    I am facing some problems in that which is explained below and if any one has solution please suggest me.

    Problem:

    When i open the turboc from windows OS mode first time, the program is able to transmit and receive the data successfully and am able to exit from the appliication.But when i run the same program next time with out closing the turboc application, the transmission and reception is not happenning properly.

    Inferrence:
    1. When i close the application from the developing environment and reopen, it is working fine.
    2. When i run the exe file rather than running in development environment, it is working always.

    Thanks in advance,Thangadurai
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    If by "always" you mean "never", it's possible your program could be dependent on the behaviour of an uninitialised variable. Debuggers often initialise stuff that wouldn't normally be initialised and this can lead to programs working perfectly in the IDE but not at all when you run them separately.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice