Re: serial bus timing (was: C64 Kernal disassembly question)

From: Jim Brain (brain_at_jbrain.com)
Date: 2004-05-13 18:59:22

> True, but the timeouts in the protocol allow a software-based response.
> Womo measured that my C2N232 solution has a delay of a few microseconds,
> even though it responds to ATN with an interrupt.

> Why?  A microcontroller can easily do this with polling.  At 38400 bps,
> RS-232 receive interrupts can arrive every 260 µs.  I've disabled the
> RS-232 receive interrupts in some places in my serial bus code.

Mine will come in every 21 uS (If I did the math right for 460Kbps), which
is about 310 clocks on the CPU (roughly 310 instructions...)  IP traffic
on the controller could come in as well.  I just don't want to poll, as
there are such low latency IRQs available for me.

>
>> For more details (and source code) for this, have a look at the
>> cbm4linux [1]
>> project. That's the reason why a XE1541 cannot be used with cbm4linux,
>> but a new XM1541 was introduced.
>
> On a multitasking computer, it's a completely different matter, as you
> can't
> tie the processor for long periods of time.  There, it's better to use
> interrupts (or delegate the serial bus handling to an external
> microcontroller,
> like the C2N232 with the serial bus modification).

Yes, I agree.  If I was working with NT or MacOS or Linux, it would be one
story, but I already am biting the bullet to provide more adaptable
interface HW.

Right now, I am checking to see if the SPI interface in the AVR can be
tweaked to do all of the bit-banging for me.

Jim



       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.