damn the computer crashed and I have to re-type.
Einey running in X5 (XTAL Basic V5)
10 OUT &33,&4F
20 A=INP(&32)
30 PRINT A
40 GOTO 20
I made a 16 way IDC lead with a PC floppy lead, a hacksaw and some
superglue. It works well.
I connected all the data lines of the user port together (looking into
the user port from the back D7, 5v, D6, 0v, D5, STB, D4, 0v, D3, 0v,
D2, RDY, D1, 0v, D0, 5v ) and stripped back the 5v, 0v and STB
(strobe) lines.
NOTE; the program streams data from the user port regardless of
whether the input has been updated or not.
The program streams 255, 255, 255, etc.
I connected all the date lines to 0v and tapped the STB to 0v.
The program streams 0, 0, 0, etc.
I connected all the data lines to 5v and tapped the STB to 0v
The program streams 255, 255, 255, etc.
I believe the RDY line goes high after the data has been read once (or
many times) but I can't test that at this time on night after this
amount of Gin.
Your previous program in BBC Basic should be fine
10 PUT &33,&4F
20 N=GET(&32)
30 PRINT N
40 GOTO 20
..but your assumption that pulling STB high would stop the stream was
incorrect. As you can test from the above example the handshaking
works as you can spend time setting the bits high and low as you
desire (try "High, High, High, High, Low, Low, Low, Low") and only
register the changes when you pulse the STB line low.
I'll look into setting the port to cause an interrupt when data is
received, but not after this amount of Gin :)
Hope this helps.
Regards
Geoff