• Please review our updated Terms and Rules here

Dragon 32 parallel port memory address?

Drayson

Member
Joined
Jun 29, 2024
Messages
28
Location
Oklahoma
A couple of days ago, I got a Dragon 32, and now I'm trying to control the parallel printer port to use it like a microcontroller. I've done this before with the Commodore 64 and IBM 5155, but I'm struggling to figure out how to do it with this machine.

IMG_0886.jpeg
Here I've wired up each data pin to a segment on this 7-segment display, and I'm trying to make it display something. I tried looking for a memory address to poke, but can't seem to find any that work. I tried researching and going through the I/O addresses FF00-FF5F as well, but I had no luck. Some segments on the display flash when I press a key, so I know I have it wired up fine. Is there a different address I have to set first to enable it or does it work entirely differently?

If anyone knows how to get it to work, please let me know.
 
The problem with the Dragon is that the parallel printer port is shared with the keyboard.

$FF02 (IC26 Port B) drives both the keyboard and the parallel printer data outputs.

$FF20 PA1 (IC33) contains the printer strobe bit.

You have to output the desired data to $FF02 then 'pulse' the strobe bit in $FF20 PA1.

Because of this sharing/multiplexing you will require an external latch controlled by the strobe pin (or a 7-segment device containing a latch of some description).

To complicate matters, if you are running your user program in BASIC (or machine code with the interrupts enabled) then the keyboard subroutine code will be running in the background and could be invoked whilst you are trying to drive the data to your displays (thus corrupting the display).

Perhaps not as easy as you first thought?

Not impossible of course, just more reading required...

Dave
 
The problem with the Dragon is that the parallel printer port is shared with the keyboard.

$FF02 (IC26 Port B) drives both the keyboard and the parallel printer data outputs.

$FF20 PA1 (IC33) contains the printer strobe bit.

You have to output the desired data to $FF02 then 'pulse' the strobe bit in $FF20 PA1.

Because of this sharing/multiplexing you will require an external latch controlled by the strobe pin (or a 7-segment device containing a latch of some description).

To complicate matters, if you are running your user program in BASIC (or machine code with the interrupts enabled) then the keyboard subroutine code will be running in the background and could be invoked whilst you are trying to drive the data to your displays (thus corrupting the display).

Perhaps not as easy as you first thought?

Not impossible of course, just more reading required...

Dave
Thank you, I probably would've never figured this out myself.
 
If my memory is correct (this goes way back) there were a few good books on programming for the Dragon 32.

Just looked one up - Dragon 32 Programmers Reference Guide. There is an online PDF if you don't want to shell out for the real book.

I think what you can also do is to use BASIC to PRINT characters to the printer. Try the following program:

10 PRINT "TESTING"
20 PRINT#-2,"HELLO PRINTER"
30 GOTO 10

And see what happens with nothing connected to the printer port. If all is well, the program should continue to run and you should observe a load of activity on the printer port 'STROBE' signal. This will be good.

The worst thing that will happen is that the program will "jam" expecting a handshake back from a non-existent printer.

But we can sort that out if it occurs!

You appear to be quite proficient at wiring things up on breadboard...

Dave
 
Back
Top