TOP PCAT Printer Parallel Port Serial Programming

Base Address

-d 40:8
0040:0000                          BC 03 78 03 78 02 80 9F

Generic TextOnly

Vender: Genericにある
Property 詳細設定TABでスプールをはずす。さらに標準設定ボタンを押して用紙品質TABで、給紙方法で連続給紙、改ページなしを選択


NameI/OD25 pin
BUSYI11GND
PERRORI12GND
SELECTI13NC(P.U.)
/STROBEO1loopback
/ACKI10

sequence for a print job is as follows:

begin a print jobStartDocPrinterctor
begin each page,StartPagePrinterRepeat for as many pages as necessary
EndPage will sed data to printer
write data to a pageWritePrinter
end each pageEndPagePrinter
end the print jobEndDocPrinterdtor

ReadPrinterはGenericは双方向サポートのチェックボックスがEnableにならないので、たぶんできない。

MFC

WritePrinter/ReadPrinter

ポートとチョイス
How to programmatically print to a non-default printer in MFC
実際のシステムで定義された既定のプリンター以外に、Microsoft Foundation クラス (MFC) アプリケーションの「既定」のプリンターを変更する方法
  • Whether you need to use the non-default printer on a permanent basis or for only one print job, you need the DEVMODE and DEVNAMES structure to create the printer DC.
  • The PRINTER_INFO_2 structure from GetPrinter() contains all the information needed to fill the DEVMODE and DEVNAMES structures.
  • setup Vender:Generic Printer:TextOnly at LPT1
GetPrinter()
DEVNAMES
DEVMODE
OpenPrinter
CWinApp::SelectPrinter
CPrintInfo 構造体
WritePrinter
ReadPrinter
The ReadPrinter function call is always preceded by a call to the StartDocPrinter call. If you set the dwMode member of the DOC_INFO_2 structure to DI_READ_SPOOL_JOB before making the StartDocPrinter function call, the subsequent ReadPrinter function call will read the spool file identified in the pOutput member of the DOC_INFO_2 structure instead of reading status information from the bidirectional printer your print processor is associated with.

.NET


.NET
Graphics^ g;
g->PageUnit = GraphicsUnit::Millimeter;

IEEE 1284

プロトコル・モード

コンパチブルモードSPPセントロニクス,標準単方向
ニブルモードBitronics(HP)単方向データ通信にステータスラインを用い、デバイスに4ビットデータ送信,拡張プリンタステータス取得
バイトモードデータラインを使って8bit送信
Enhanced Prallel PortEPP半二重双方向
Extended Capability PortECP半二重双方向RLE圧縮

Port Pin Layout

PinNameDirDescription
1/STROBEOStrobe
2D0OData Bit 0
3D1OData Bit 1
4D2OData Bit 2
5D3OData Bit 3
6D4OData Bit 4
7D5OData Bit 5
8D6OData Bit 6
9D7OData Bit 7
10/ACKIAcknowledge
11BUSYIBusy
12PEIPaper End
13SELISelect
14/AUTOFDOAutofeed
15/ERRORIError
16/INITOInitialize
17/SELINOSelect In
18-25GNDSignal Ground
+-----------------------------------------+
\ 13 12 11 10  9  8  7  6  5  4  3  2  1 /
 \  25 24 23 22 21 20 19 18 17 16 15 14 /
  +------------------------------------+

Bit assignment

AddressMSBLSB
Bit:76543210
Base (Data port)Pin:98765432
Base+1 (Status port)~1110121315
Base+2 (Control port)~1716~14~1

管理人/副管理人のみ編集できます