Re: OT: EPP problems
- From: budgie <me@xxxxxxxxxxx>
- Date: Sun, 05 Feb 2006 20:53:17 +0800
On Sun, 05 Feb 2006 04:05:30 GMT, Robert Baer <robertbaer@xxxxxxxxxxxxx> wrote:
budgie wrote:
I'm a bit lostbas to what this code is trying to do. Do you have a loopbackPlease read what i said:
connection on the port?
<QUOTE>
Granted, nothing is connected to any of the pins, but still, during
"input" time, one should see the equivalent of an LSTTL (or LTTL) input,
and not a heavy pullup (2.4K).
It would seem that the original designers of this scheme did not know
how to do a true or complete tri-state of the output stage - and all
other designers slavishly followed like sheep.
<\quote>
I did read it, and it led me to one conclusion.
Either you're right and eveyone else is wrong, or ......
Also, why are you trying to read back from base address (&H378)+4?
Didn't catch your answer to that.
Why dont you forget turnaround and time delays. Just try the simple test: setI guess you did not read my post.
the post to high-Z and then read and display the bit values, and then
progressively pull them up/down with a low value resistor while watching the
displayed bit values.
I *said* that i tried to make lines an input, AND i said that there
ain't no such thing as "high-Z"; 2.4K internal pullup to +5V is *NOT*
"high-Z"!
I DID tell you what I believed you should try, and report back. You didn't do
that.
If that doesn't work, you don't have a bidi-capable port.All of the documentation, and the BIOS says EPP, *and* (like i said
but you did not read), i tried other boards, including an ISA parallel
board that supports SPP, EPP and ECP.
Please tell us all why you are trying to read back from base address (&H378)+4.
Let us know the result.
And in answer to your question, yes I do conduct serious I/O through the LPT1:
port on this and other PC's without interrupts, and all in QuickBasic.
Well, then would you be so kind as to post the software, and the
hardware interface?
This particular piece of hardware is a custom EPROM programmer for a particular
client. An NDA prevents posting schematics or the substance of the code. As a
result, much of the code has been omitted but enough remains to hopefully convey
what is being done.
The "interface" comprises:
.. the 8 data I/O lines (pins 2-9) directly connected to the data I/O lines on
the EPROM carrier. (no buffers).
.. the STROBE output (pin 1) directly drives 74HC logic.
.. other outputs (pins 14, 16, 17) directly drive 74HC logic.
.. inputs (pins 10, 12, 13, 15) directly driven by 74HC logic.
.. pin 11 is unused.
This hardware has performed flawlessy on a variety of Pentium class machines
with on-board LPT: ports.
The relevant parts of the code - which might seem cumbersome and inefficiently
written - are at the end of this post.
You will note the calls to SETHIZ and SETOUT which control the direction of the
I/O port via C5. I hope this is enough to guide you.
______________________________________________________________
' Define Port Addresses
' Port LPT1: LPT2:
' DATA 378H 278H
' 888d 632d
' STATUS +1 +1
' CONTROL +2 +2
NOTES: ' Port bit assignments
'DATA port = Base Address
'STATUS port = Base+1
'CONTROL port = Base+2
'DATA port - all 8 bits (pins 2-9) for data I/O
'STATUS port & CONTROL port assignments as follows:
'D-PIN BIT BITWEIGHT ROLE
'1 /C0 1 Prog pulse initiate
'10 S6 64 Prog pulse "done"
'11 /S7 128 NC
'12 S5 32 NC
'13 S4 16 NC
'14 /C1 2 Reset (RL31)
'15 S3 8 Full count - "chip done"
'16 C2 4 Clock
'17 /C3 8 Vpp enable (RL32)
'-- C5 32 Data port direction (0 = out, 1 = Hi-Z)
DAT = 888: ' Edit as required
STA = DAT + 1: CONT = DAT + 2
OUT DAT, 0: OUT CONT, 32: ' Initial states - Data Port 0 and hi-Z
LETSGO: N = 0: ' Byte number
IF (INP(CONT) AND 32) <> 32 THEN STOP: 'Make sure we are Hi-Z
NXT: (some snips)
T1: 'first clock high - strobe address from U11 into '574 latches
GOSUB SETCLK
T1.5: 'first clock low - enable U13 output
GOSUB CLRCLK
T2: 'second clock high - strobe U13 output to module latch
GOSUB SETCLK
T2.5: 'second clock low - disable U13 output
GOSUB CLRCLK
T3: 'third clock high - action on write only
GOSUB SETCLK
IF BURN THEN
GOSUB SETOUT: ' Set data port to output
BYTE = A(N)
GOSUB PUSH: ' Put data on I/O port
END IF
T3.5: 'third clock low - enable U12 output to module
GOSUB CLRCLK
IF BURN THEN
GOSUB DELAY: ' Allows address lines to settle
GOSUB PROGNOW
X = 1
DO UNTIL X = 0
GOSUB PULSEDONE: ' Wait for end of prog pulse
LOOP
END IF
GOSUB SETHIZ
T4: 'fourth clock high - set module /OE low to enable reading
GOSUB SETCLK
'Enables module output - data now available
'to read (verify if on a write operation)
FOR I = 1 TO 1000: NEXT: 'Wait for output enable
GOSUB PULL
A(N) = BYTE
T4.5: 'fourth clock low - disable U12 output
GOSUB CLRCLK
' Address lines no longer valid
T5: 'fifth clock high - module /OE high; increment address counter U11
GOSUB SETCLK
T5.5: 'fifth clock low
GOSUB CLRCLK
T6: 'sixth clock high - resets sequence controller U21 to zero
GOSUB SETCLK
T6.5: GOSUB CLRCLK: ' U21 should have reset by now
N = N + 1: IF N < SIZE THEN GOTO NXT: ' Next byte
IF (INP(STA) AND 8) = 0 THEN STOP: 'CHIP DONE should be available now.
IF (INP(CONT) AND 32) <> 32 THEN STOP: 'Should never happen
GOSUB SETHIZ: 'To be sure, to be sure
(rest of in-line processing)
'***************************************************************************
'************** MODULE INTERACTION SUBROUTINES *********************
'***************************************************************************
PUSH: GOSUB DELAY
OUT DAT, BYTE: ' Write a byte to port
GOSUB DELAY
: RETURN
PULL: BYTE = INP(DAT): ' Read a byte from port
: RETURN
SETHIZ: OUT CONT, INP(CONT) OR 32: 'Set Data port to high-Z for Read (or
safety)
GOSUB DELAY
: RETURN
SETOUT: OUT CONT, INP(CONT) AND 223: 'Set Data port to OUT
GOSUB DELAY
: RETURN
RSTON: OUT CONT, INP(CONT) OR 2: 'Set RESET active
GOSUB DELAY2
: RETURN
RSTOFF: OUT CONT, INP(CONT) AND 253: 'Clear RESET
GOSUB DELAY2
: RETURN
SETCLK: OUT CONT, INP(CONT) OR 4: 'Set CLOCK high
GOSUB DELAY
: RETURN
CLRCLK: OUT CONT, INP(CONT) AND 251: 'Set CLOCK low
GOSUB DELAY
: RETURN
DELAY: 'Delay 100uS for clock and port mode
FOR I = 1 TO T100: NEXT
: RETURN
DELAY2: 'Delay for Vpp enable/disable and Reset
FOR I50 = 1 TO 50: GOSUB DELAY: NEXT
: RETURN
PROGNOW: OUT CONT, INP(CONT) OR 1
FOR P = 1 TO T10: NEXT
OUT CONT, INP(CONT) AND 254
: RETURN
PULSEDONE: X = INP(STA) AND 64
: RETURN
______________________________________________________________
..
.
- Follow-Ups:
- Re: OT: EPP problems
- From: Robert Baer
- Re: OT: EPP problems
- References:
- OT: EPP problems
- From: Robert Baer
- Re: OT: EPP problems
- From: budgie
- Re: OT: EPP problems
- From: Robert Baer
- OT: EPP problems
- Prev by Date: Re: What type of SMPS is this? (Harbor Freight Plasma Cutter)
- Next by Date: Re: OT? The latest bare-bones from Fry's, Windows-free
- Previous by thread: Re: OT: EPP problems
- Next by thread: Re: OT: EPP problems
- Index(es):
Loading