Subject:
|
Interrupt for serial data
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Fri, 13 Feb 1998 14:28:53 GMT
|
Original-From:
|
Jan-Sipke van der Veen <VEENJS@CS.UTWENTE.avoidspamNL>
|
Viewed:
|
1382 times
|
| |
| |
I've decided to write an interrupt routine for the handling of serial data on
the Handy Board. An example of an interrupt routine is given in the Handy Board
technical reference. This works like a charm. I've modified it to use the SCI
interrupt. The code is listed below.
No interrupts seem te occur. The test is like this:
* Start IC
* load myfile.icb
* load myfile.c (* in main : *)
poke (0x3c, 1);
printf ("%d", foo);
int_init (0);
start_press ();
printf ("%d", foo);
* Exit IC
* reset Handy Board
* it prints: 55
* send a character to the Handy Board (in Borland Pascal)
* press Start button
* it prints: 55
Can anyone see the mistake here?
Hope I'm not too annoying with all my questions.
Jan Sipke van der Veen
#include "include\6811regs.asm"
subroutine_int_init:
#include "include\findx.asm"
LDD SCIINT,X
STD interrupt_code_exit+1
LDD #interrupt_code_start
STD SCIINT,X
* Receive Enable (bit 2) +
* Transmit Enable (bit 3) +
* Receive Interrupt Enable (bit 5) = $2C
LDAA #$2C
STAA SCCR2,X
RTS
variable_foo:
FDB 55
interrupt_code_start:
LDD #42
STD variable_foo
interrupt_code_exit:
JMP $0000
|
|
Message has 1 Reply: | | Re: Interrupt for serial data
|
| Jan-Sipke, You're really pretty far away from having this work. It's not just a matter of redirecting the serial interrupt; when you get there, you have to: * store incoming character in a buffer * advance the buffer pointer * check the buffer for (...) (27 years ago, 13-Feb-98, to lugnet.robotics.handyboard)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|