This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printer interfacing

hello there,
i want to know the printer interfacing with 8051
i have interfaced it and it is working fine
-but when paper is not put properly that time my machine hangs can u guide me what to do in such case
is it related to BUSY signal?????
pls reply

Parents
  • One common reason for software hanging is infinite loops!

    eg, if you have a loop that waits for an event, but that event never happens, or you miss it, your software will hang:

    while( event_not_happened_yet )
    {
       // do nothing - wait
    }
    

    You need to provide a timeout or some other means to exit the loop in case of an excessive delay...

Reply
  • One common reason for software hanging is infinite loops!

    eg, if you have a loop that waits for an event, but that event never happens, or you miss it, your software will hang:

    while( event_not_happened_yet )
    {
       // do nothing - wait
    }
    

    You need to provide a timeout or some other means to exit the loop in case of an excessive delay...

Children
  • Yes, more than one interface has busy signals to inform the PC that no more data may be sent until the printer is ready.

    From the signal name, I assume that you are talking about the centronics interface. When the printer runs out of paper (or sometimes if you set it off-line), the printer interface in your PC will stop sending characters until you add paper.

  • "When the printer runs out of paper (or sometimes if you set it off-line), the printer interface in your PC will stop sending characters until you add paper."

    So the question to the OP is: does your software recover when you correct the "paper is not put properly" situation?