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
  • "i want to know the printer interfacing with 8051"

    What printer?
    What 8051?

    What type of interface does the printer have - USB? Centronics? Serial? Or what?

    "i have interfaced it and it is working fine"

    Is it?

    "but when paper is not put properly that time my machine hangs"

    So it is not fine - it has a bug!

    "can u guide me what to do in such case"

    You need to debug it!

    For a strart, you need to determine exactly what is happening when it "hangs"

    "is it related to BUSY signal?"

    Who knows?!
    You've given absolutely no details whatsoever of the printer, its interface, your circuit, or your software - so how can anyone possibly make any informed suggestions?!

    Your question really is just like, "my car won't work - what is wrong with it?" !

    For a start, you need to read the printer Manual to determine how (or whether) it uses the BUSY signal.
    Then check that your hardware & software correctly handles this.

    Also, check what actually happens on the printer in this situation - preferably with an oscilloscope.
    Again, check that your hardware & software correctly handles this.

    If you can connect the printer to a PC, you could also try seeing what happens in that case...

Reply
  • "i want to know the printer interfacing with 8051"

    What printer?
    What 8051?

    What type of interface does the printer have - USB? Centronics? Serial? Or what?

    "i have interfaced it and it is working fine"

    Is it?

    "but when paper is not put properly that time my machine hangs"

    So it is not fine - it has a bug!

    "can u guide me what to do in such case"

    You need to debug it!

    For a strart, you need to determine exactly what is happening when it "hangs"

    "is it related to BUSY signal?"

    Who knows?!
    You've given absolutely no details whatsoever of the printer, its interface, your circuit, or your software - so how can anyone possibly make any informed suggestions?!

    Your question really is just like, "my car won't work - what is wrong with it?" !

    For a start, you need to read the printer Manual to determine how (or whether) it uses the BUSY signal.
    Then check that your hardware & software correctly handles this.

    Also, check what actually happens on the printer in this situation - preferably with an oscilloscope.
    Again, check that your hardware & software correctly handles this.

    If you can connect the printer to a PC, you could also try seeing what happens in that case...

Children
  • 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...

  • 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?