Serial Communication Timeout Problem

This is a discussion on Serial Communication Timeout Problem within the C++ Programming forums, part of the General Programming Boards category; Trying to receive data from a device, via the coms port. This all works fine whilst using an overlapped structure, ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    4

    Serial Communication Timeout Problem

    Trying to receive data from a device, via the coms port.

    This all works fine whilst using an overlapped structure, and a very large timeout (FFFFFFFF). When this is reduced, or the overlapped replaced by a non-overlaped, then the entire system seizes up, and the only response is to switch off pc (cold boot).

    This all seems to go wrong on the ReadFile (Visual C++ 6) command.

    Grateful for any hints, as my head has started to hurt, and the plaster on the walls is starting to crumble!!!!!!!!!

    Dave

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    I guess nobody has your answer...

    There is lots of info about programming the ports at www.beyondlogic.org

    The only port programming I've done was in DOS BASIC (a long-long time ago).

    I suspect your problem is related to your Multitasking OS (Windows?) doing stuff in the background to mess-up your timing and maybe delaying access to the port. It could be an interrupt related problem too. Although, I don't remember being required to use interrupts at all with my particular DOS BASIC application... I don't think there was anything related to IRQs in my program.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Duplex communication thro serial port
    By Priyachu in forum Networking/Device Communication
    Replies: 1
    Last Post: 05-30-2009, 05:24 AM
  2. Duplex communication thro serial port
    By Priyachu in forum Linux Programming
    Replies: 1
    Last Post: 05-30-2009, 05:03 AM
  3. Serial Port Communication
    By maxorator in forum C++ Programming
    Replies: 11
    Last Post: 04-27-2006, 04:13 PM
  4. Problem of serial programming
    By fingerling54 in forum Linux Programming
    Replies: 5
    Last Post: 05-11-2005, 12:05 PM
  5. Please help with serial communication problem - Long
    By spdylude in forum Windows Programming
    Replies: 3
    Last Post: 04-06-2005, 10:41 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21