dvltav410 wrote:
Hello - I hope someone can help me out.
I have 6850 UART connected per Grant's schematics. It all works, but now I'd like to trigger an interrupt when a character is received.
http://searle.x10host.com/6502/6502SbcS ... %201.1.gifI have a logic probe connected to the IRQ pin, and and another one to the RDX pin. I see the levels changing on the RDX pin as expected. The IRQ pin is consistently low.
Here is the init code:
LDA #$3 ;master reset
STA ACIA_6850_Control
LDA #$95 ; Set ACIA_6850 baud rate, word size and Rx interrupt (to control RTS)
STA ACIA_6850_Control
$95 = %1001 0101 = The seventh bit is the IRQ receive enable bit.
Any other initialization I need to perform?
If your schematic is still per Grant's system, then it's not going to work. Look more closely... the IRQ line of the CPU is pulled to +5V. You need to disconnect the IRQ and use a 3.3K resistor to pull it to +5V. Then re-route the IRQ line of the 6850 to the CPU IRQ line. You'll also need to manage the RTS/CTS signals as well. Once that's done, you'll need to write an interrupt handler to service the IRQ when generated by the 6850.
You can reference an older book (can be found online as a PDF) called "6502 Assembly Language Subroutines" by Lance Leventhal and Winthrop Saville. Page 464 shows a decent set of routines to init, send and receive using the 6850. You can certainly streamline the code once you get it working.