In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: John, dealing with an "old", or "classical" Centronics parallel port is not really difficult. It has the following pins: 1 - O - STROBE* 2 - O - D0 3 - O - D1 4 - O - D2 5 - O - D3 6 - O - D4 7 - O - D5 8 - O - D6 9 - O - D7 10 - I - ACK* 11 - I - BUSY 12 - I - PE 13 - SEL 14 - O - AUTOFD* 15 - I - ERROR* 16 -O - INIT* 17 - O - SELIN* 18...25 GND Where "O" means output, and "I" means input (when you "look" into the PC's parallel port). An asterisk (*) marks negative logic. So, here is a rough scheme for a simple parallel to serial conversion in kinda BASIC dialect: WaitForNextChar: Let BUSY = low WaitForStrobeLow: If STROBE* = high then goto WaitForStrobeLow Read D0...D7 from the port into a byte variable Let BUSY = high Pass byte variable to a serial transmitter VP to send it to the serial printer WaitForTxDone: If SerialTransmit <> Done then goto WaitForTxDone WaitForStrobeHigh: If STROBE* = low then goto WaitForStrobeHigh Goto WaitForNextChar: It depends on the serial printer, if there is a handshake required on the serial side. So you might check what kind of handshake the serial printer can handle. Many printers make use of the RTS/CTS lines which is pretty easy to implement. Others use an XON/XOFF protocol which requires some more tricks. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149567#m149811 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)