Sign In
New User? Sign Up
tatung_einstein · Tatung Einstein Computer Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
You can search the group for older messages.

Messages

  Messages Help
Advanced
PC/EINEY printer port connection.   Message List  
Reply | Forward Message #282 of 328 |
Re: PC/EINEY printer port connection. Thanks Geoff

Hi Chris,

Further to my tests with the User Port, there's some code here
http://www.alioth.net/Projects/Z80/piotest-intr.asm to use the
interrupts from the PIO chip but for a different computer. Everything
should be accessible in the Einstein. I see no reason for anything to
not be enabled.

In XBasic the command you might need to use is WAIT instead of INP. I
can't find my BBC Basic reference guide at the moment but there should
be a similar command.

The WAIT command is followed by 3 numbers, ie;

20 WAIT J1,J2,J3

J1 is the port number (&32 for User Port)
J2 and J3 are used to compare the data from the port with a user
specified scheme and return a result if there is a match.

1. Get data from port.
2. XOR with J3
3. AND with J2
4. continue if result is non-zero

But I don't think that's really what you intended. If you need to pass
a stream of data from the PC to the Einstein with handshaking in
Basic you need some form of the INPUT# command and set it to read data
from the User port, or do it in assembler.

The code in the page I linked to above can be changed for the Einstein
(including but not limited to);

First, change the port addresses
-----
; Port and function - place one of these on the address bus.
DEFINE PortA_DATA #30
DEFINE PortA_CMD #31
DEFINE PortB_DATA #32
DEFINE PortB_CMD #33
-----
You might also need to change the org, Stack Pointer and VectorTable

Second, set up the port for input instead
-----
SetupPIO
ld a, Input ; Put PIO port A into input mode
-----

Third, re-write "BlinkerLights" and the "PortA_Intr" to read a stream
of data and display it.

I'll leave that bit up to you.

Regards,
Geoff






Sun Apr 6, 2008 11:01 am

id_fugu_is_u...
Offline Offline
Send Email Send Email

Forward
Message #282 of 328 |
Expand Messages Author Sort by Date

Hi, Does anyone have programming examples of using the Einstein user ports in mode 1 (eight bit import) in their Einey Docs. From the Z80 PIO tech doc (can be...
Chris Coxall
bbcchris2000
Offline Send Email
Mar 24, 2008
10:37 am

Hi Chris, Mode 0 Either A or B as 8-bit output (active strobe after output) Mode 1 Either A or B as 8-bit input (triggering interrupt request if enabled) Mode...
Geoff Latham
id_fugu_is_u...
Offline Send Email
Mar 25, 2008
9:28 am

Hi Chris, I think I was was wildly wrong earlier (depending on how things were implemented in the Einstein). Mode 1 should handle the handshaking. I did,...
geoff
id_fugu_is_u...
Offline Send Email
Mar 25, 2008
4:18 pm

Hi Geoff, A bit map of Einey mother board can be downloaded from the web site. http://mysite.wanadoo-members.co.uk/retrocomputer/download.htm ...
Chris Coxall
bbcchris2000
Offline Send Email
Mar 25, 2008
10:25 pm

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...
geoff
id_fugu_is_u...
Offline Send Email
Apr 6, 2008
12:22 am

Hi Chris, Further to my tests with the User Port, there's some code here http://www.alioth.net/Projects/Z80/piotest-intr.asm to use the interrupts from the PIO...
geoff
id_fugu_is_u...
Offline Send Email
Apr 6, 2008
11:01 am
Advanced

Copyright © 2009 Yahoo! UK. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help