MykeLawson
Experienced Member
- Joined
- Mar 21, 2014
- Messages
- 397
First a little back story... I bought the CPUville Z-80 CPU card and it works great and I'm running CP/M 2.2. It has a 40 pin expansion port that I have interfaced with an STD Bus card cage. As my first real project with this, besides the bus interface, is to add a Centronics printer port. Several of you helped me rewrite the CP/M DUMP program to use as a base for a program to send data to my printer port. I know I have some hardware design work to finalize, but I wanted to post what my plan is for how I will integrate the device driver code into the re-written DUMP program; which I aptly renamed PRINT.COM. Anyway, here is the device driver program flow I plan to use as a starting point:
1. Bits 2 & 3 of Port 15h wil be set low to both /INITIALIZE the printer and select it /SELECT.
2. Test Bits 2 & 3 of Port 15h to confirm the PAPER OUT & ONLINE inputs are still low.
3. Printer output data is first clocked into the 74LS374 (Port 14h) to be placed on the Parallel Port pins 2 to 9.
4. Bit 0 of Output Port 15h is set which causes a 555 bistable timer low pulse of 1ms to be sent to the /STROBE input of the printer.
5. The software will monitor the returning Busy signal Bit 1 on Port 15h from the printer. Once that bit returns to a low state, the process will restart at step 2 for the next character.
1. Bits 2 & 3 of Port 15h wil be set low to both /INITIALIZE the printer and select it /SELECT.
2. Test Bits 2 & 3 of Port 15h to confirm the PAPER OUT & ONLINE inputs are still low.
3. Printer output data is first clocked into the 74LS374 (Port 14h) to be placed on the Parallel Port pins 2 to 9.
4. Bit 0 of Output Port 15h is set which causes a 555 bistable timer low pulse of 1ms to be sent to the /STROBE input of the printer.
5. The software will monitor the returning Busy signal Bit 1 on Port 15h from the printer. Once that bit returns to a low state, the process will restart at step 2 for the next character.