Describe ScottySpectrumAnalyzer/ParallelPort here.

Pinset

Pin No (DB25)

Pin No (36 pin)

Signal name

Direction

Register - bit

Inverted

1

1

nStrobe

Out

Control-0

Yes

2

2

Data0

In/Out

Data-0

No

3

3

Data1

In/Out

Data-1

No

4

4

Data2

In/Out

Data-2

No

5

5

Data3

In/Out

Data-3

No

6

6

Data4

In/Out

Data-4

No

7

7

Data5

In/Out

Data-5

No

8

8

Data6

In/Out

Data-6

No

9

9

Data7

In/Out

Data-7

No

10

10

nAck

In

Status-6

No

11

11

Busy

In

Status-7

Yes

12

12

Paper-Out

In

Status-5

No

13

13

Select

In

Status-4

No

14

14

Linefeed

Out

Control-1

Yes

15

32

nError

In

Status-3

No

16

31

nInitialize

Out

Control-2

No

17

36

nSelect-Printer

Out

Control-3

Yes

18-25

19-30,33,17,16

Ground

-

-

-

Mascaras en PyParallel

PARPORT_CONTROL_STROBE  = 0x1
PARPORT_CONTROL_AUTOFD  = 0x2
PARPORT_CONTROL_INIT    = 0x4
PARPORT_CONTROL_SELECT  = 0x8
PARPORT_STATUS_ERROR    = 8
PARPORT_STATUS_SELECT   = 0x10
PARPORT_STATUS_PAPEROUT = 0x20
PARPORT_STATUS_ACK      = 0x40
PARPORT_STATUS_BUSY     = 0x80

Values in spectrumanalizer.bas

port = hexdec("&H378")    'LPT printer port, data address for most computers
status = hexdec("&H379")  'LPT printer port, status address for most computers
control = hexdec("&H37A") 'LPT printer port, control address for most computers
contclear = 11         'global to take all LPT control lines low
STRB = 10              'global to take LPT-pin 1 high. (Strobe line,STRB)(was fqud) ver111-22
AUTO = 9               'global to take LPT-pin 14 high. (Auto Feed line,AUTO)(was wclk) ver111-22
INIT = 15              'global to take LPT-pin 16 high. (Init Printer line,INIT)(was enat) ver111-22
SELT = 3               'global to take LPT-pin 17 high. (Select In line,SELT)(was enap) ver111-22
INITSELT =  7          'global to take both LPT-pins 16 & 17 high. (INIT,SELT)(was enapt) ver111-22
STRBAUTO = 8           'global to take both 

Bits in Control port

The lines nStrobe, Linefeed and nSelect, equivalenst to bits Control-0, Control-1 and Control-3 use negative logic, this mean that when the bits as set to 1, the line is put in low voltage, and whe the bit is set to 0 the line is put in hight voltages. The line nInitialize use positive logic, as the Data lines, when the bits are set to 1 it is hight voltage and in 0 are low voltage. So the result of the combinations of the bits are like follow:

Variable

Decimal Value

Bits

Signal

contclear

11

1101

0000

INIT

15

1111

0010

SELT

3

1100

0001

OpTrWiki: ScottySpectrumAnalyzer/ParallelPort (last edited 2009-03-03 22:34:17 by localhost)