We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
p6.6,50,*RXD2,"Debug, SerialPort, DSPortAdapter",Can configure as native I/O
p6.7,49,*TXD2,"Debug, SerialPort, DSPortAdapter",Can configure as native I/O
How can I change them to general I/O
Which register control them?
Anyone know the answer?
Thank you.
"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...
See: http://www.keil.com/forum/docs/thread10609.asp
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?
80451 is the microcontroller and printer interfacing is centronics i have resolved the problem as it was stuck in the while loop which i was using for 'print complete' screen now i have removed the screen and while statement and now it is fine. i hav just added 'sent to print' screen. it is related to paper out signal but we are not using this signal now.
thanx for ur help and suggetion and next time i will give details because i was accessing this site for first time thanx
If you are going to send text to a Centroncs-connected printer, you really have to care about this signal. You may loose your printout if the printer is off-line. Also laser printers or ink-jet printers may run out of paper, or the user may manually have set the printer off-line and forgotten about it.