External Interrupt

General discussions related to the Altair 8800 Clone

External Interrupt

Postby Jurgen » August 17th, 2014, 2:28 pm

Hi there,

my name is Jurgen (from Germany). I'm new to this forum and for a week the owner of an Altair 8800 Clone.
I immediately got a question:
How can I generate an interrupt, without the Altair connected to a PC? So I have an external button, I want somewhere to connect to the serial port.

Jurgen
Jurgen
 
Posts: 5
Joined: August 10th, 2014, 1:42 pm

Re: External Interrupt

Postby AltairClone » August 18th, 2014, 1:25 pm

Jurgen,

You can generate an interrupt when a line goes low and/or high using a 2SIO serial port on an Altair (and the Altair Clone). For example, tie DB-25 pin 2 (receive data into the Altair) and pin 4 (CTS into the the Altair) to your signal source. With this configuration you can interrupt on transition high or transition low. Examining the CTS bit of the 6850 in the interrupt routine lets you determine whether to enable transmit or receive interrupts to catch the next transition. Note that the transition of the external signal from low to high causes an immediate interrupt (CTS asserted causes an immediate TDRE interrupt). However, the transition from high to low will be delayed by one character time (RDRF interrupt).

On the Altair Clone, make sure the serial port you're using is configured as a 2SIO port and enable CTS handshaking.

Mike
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: External Interrupt

Postby Jurgen » August 22nd, 2014, 4:34 am

AltairClone wrote:Jurgen,

You can generate an interrupt when a line goes low and/or high using a 2SIO serial port on an Altair (and the Altair Clone). For example, tie DB-25 pin 2 (receive data into the Altair) and pin 4 (CTS into the the Altair) to your signal source. With this configuration you can interrupt on transition high or transition low. Examining the CTS bit of the 6850 in the interrupt routine lets you determine whether to enable transmit or receive interrupts to catch the next transition. Note that the transition of the external signal from low to high causes an immediate interrupt (CTS asserted causes an immediate TDRE interrupt). However, the transition from high to low will be delayed by one character time (RDRF interrupt).

On the Altair Clone, make sure the serial port you're using is configured as a 2SIO port and enable CTS handshaking.

Mike


Thanks for the explanations. But I'm not sure I have understood everything correctly.
Specifically: I want to cause with the right AUX switch an interrupt. To the AUX switch I solder two wires. Both wires do I connect with two contacts on the DB25 port. Only with which contacts?

Can you help me?

Jurgen
Jurgen
 
Posts: 5
Joined: August 10th, 2014, 1:42 pm

Re: External Interrupt

Postby AltairClone » August 22nd, 2014, 1:24 pm

Looks like I was wrong in thinking we could detect both low-to-high and high-to-low signal transitions with an interrupt via the 2SIO serial port. It looks like only the low-to-high transition will generate an interrupt for us.

So I can better suggest a wiring configuration and ISR processing, tell me what your software needs to do when the switch is activated and what it needs to do when the switch is released.

Mike
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: External Interrupt

Postby Jurgen » August 22nd, 2014, 2:03 pm

For example I will run the "Interrupt Acknowledge Cycle Demo" and generate the interrupt with the AUX-Switch. In other words, whenever I activate the right AUX switch, the program jumps to the interrupt service routine (70 octal). Assuming an interrupt is enabled (ei).

Jurgen
Jurgen
 
Posts: 5
Joined: August 10th, 2014, 1:42 pm

Re: External Interrupt

Postby AltairClone » August 22nd, 2014, 2:44 pm

Glad I asked! That makes things much simpler.

The AUX-R switch is normally open. Raising the switch closes the BOTTOM two contacts. Depressing the switch closes the TOP two contacts. Note there are three holes next to AUX-R switch you can connect to instead of soldering directly to the switch if you'd like.

Let's say you want to "trick" the 2SIO port into receiving a character (and generating an interrupt) when the AUX-R switches is depressed:

1) Connect a wire from +3.3v to the CENTER switch contact on AUX-R (pick up +3.3v from the bottom terminal of the adjacent left AUX-L switch).

2) Connect a wire from the TOP AUX-R terminal to serial port 1, pin 2, on the DB-25 (receive data into the Altair).

When the switch is in the center position (open), the RS-232 receiver treats this as an idle marking state (i.e., no data is coming in). When you depress and release the switch, the RS-232 receiver sees a space condition which starts reception of a character. After 10 bit times, the 2SIO UART will interrupt the 8080 processor with the character it "received." You will most likely have a framing error and a data over-run error when you actually look at the status register bits as you single-step through the demo. However, the demo then reads the character from the data register which clears the error status flags and the interrupt, so the demo should work as you expect!

Mike
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: External Interrupt

Postby Jurgen » August 24th, 2014, 10:19 am

Thanks, I will try this in the next days.

Jurgen
Jurgen
 
Posts: 5
Joined: August 10th, 2014, 1:42 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 14 guests

cron