Re: 9100 keyboard wedge (udpate 2)

From: Rodger Boots <rlboots_at_cedar-rapids.net>
Date: Wed Jun 04 2003 - 02:04:34 EDT

<x-html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
David Shoemaker wrote:<br>
<blockquote type="cite" cite="mid001201c32a5a$03b9d740$7f00a8c0@obie">
  <pre wrap="">Only problem is that the UART is only going to be used to feed the fluke.
And the 9100 is a single wire interface so no handshake. The question will
be just how accurate I can keep the timing on the output in software, and
how sensitive the receiver in the 9100 is to timing. With Chris's help I
found an app note on Atmels site about writing a software UART, it disables
interrupts while transmitting, so no keyboard input can come in while it is
sending a character.

Going to have to figure out if that is going to cause too much trouble.
  </pre>
</blockquote>
<br>
Don't see why that would be a problem, a PC keyboard has a processor, it
should just store the next character until you get ready to fetch it (keep
in mind we're only talking about 10 milliseconds or so for you to send the
character).<br>
<br>
The old Commodore VIC20 did the entire UART (both receive AND transmit) in
software and did a fine job of it.<br>
<blockquote type="cite" cite="mid001201c32a5a$03b9d740$7f00a8c0@obie">
  <pre wrap="">
Its going to take some playing with I am sure but software is my thing so I
should be able to come up with some adaptation.

Now comes a BIG question. Anyone have a real programmer's keyboard I could
borrow for a bit (figure 1 to 2 months) while I work on this? I imagine it
would be easier to verify I am doing everything right if I could throw a
logic analyzer on the keyboard data stream and compare it to what I am
spitting out.
  </pre>
</blockquote>
<br>
Only Fluke keyboard I have is for a 1720 test equipment controller, don't
know if that would be the same thing or not.<br>
<blockquote type="cite" cite="mid001201c32a5a$03b9d740$7f00a8c0@obie">
  <pre wrap="">
David

----- Original Message -----
From: "Zonn" <a class="moz-txt-link-rfc2396E" href="mailto:zonn@zonn.com">&lt;zonn@zonn.com&gt;</a>
To: <a class="moz-txt-link-rfc2396E" href="mailto:techtoolslist@flippers.com">&lt;techtoolslist@flippers.com&gt;</a>
Sent: Tuesday, June 03, 2003 4:44 PM
Subject: Re: 9100 keyboard wedge (udpate 2)

  </pre>
  <blockquote type="cite">
    <pre wrap="">On Tue, 03 Jun 2003 13:38:58 -0500, Rodger Boots
    </pre>
  </blockquote>
  <pre wrap=""><!----><a class="moz-txt-link-rfc2396E" href="mailto:rlboots@cedar-rapids.net">&lt;rlboots@cedar-rapids.net&gt;</a>
  </pre>
  <blockquote type="cite">
    <pre wrap="">wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">You may want to change your crystal frequency to some handy multiple of
1200 baud. There's a good reason all those old com port boards used a
1.8432 MHz crystal---it divided nicely to common baud rates.
      </pre>
    </blockquote>
    <pre wrap="">And I strongly recommend you go with the 2313 and use the UART in an
    </pre>
  </blockquote>
  <pre wrap=""><!---->interrupt
  </pre>
  <blockquote type="cite">
    <pre wrap="">driven mode. This would allow you to write a software synchronous
    </pre>
  </blockquote>
  <pre wrap=""><!---->routines for
  </pre>
  <blockquote type="cite">
    <pre wrap="">the PC keyboard and run the UART in the background without the loss of
characters. Asynchronous routines (UARTs) are much more complicate to
    </pre>
  </blockquote>
  <pre wrap=""><!---->write
  </pre>
  <blockquote type="cite">
    <pre wrap="">that the Synchronous routine needed by the PC, having written both.
    </pre>
  </blockquote>
  <pre wrap=""><!---->(Though not
  </pre>
  <blockquote type="cite">
    <pre wrap="">for the Atmel series since 99% of their parts have UARTs, I've always
    </pre>
  </blockquote>
  <pre wrap=""><!---->chosen a
  </pre>
  <blockquote type="cite">
    <pre wrap="">part that has one if needed.)

To receive a character in a software UART you must oversample the input
    </pre>
  </blockquote>
  <pre wrap=""><!---->bit by
  </pre>
  <blockquote type="cite">
    <pre wrap="">at *least* four times to somewhat reliably read a character (hardware
    </pre>
  </blockquote>
  <pre wrap=""><!---->UARTs
  </pre>
  <blockquote type="cite">
    <pre wrap="">oversample a minimum of 16 times), this pretty much means a very tight
    </pre>
  </blockquote>
  <pre wrap=""><!---->loop
  </pre>
  <blockquote type="cite">
    <pre wrap="">during which you will miss keys being pressed on the PC's keyboard. UART
transmit routines are a bit simpler, though much stricter timing is
    </pre>
  </blockquote>
  <pre wrap=""><!---->required
  </pre>
  <blockquote type="cite">
    <pre wrap="">than a synchronous port.

On the other hand synchronous routines (where you generate a clock and
    </pre>
  </blockquote>
  <pre wrap=""><!---->data) are
  </pre>
  <blockquote type="cite">
    <pre wrap="">not timing critical, so if a character is received by a hardware UART,
    </pre>
  </blockquote>
  <pre wrap=""><!---->causing
  </pre>
  <blockquote type="cite">
    <pre wrap="">an interrupt to occur in the middle of your software synchronous routine,
    </pre>
  </blockquote>
  <pre wrap=""><!---->the
  </pre>
  <blockquote type="cite">
    <pre wrap="">extra delay won't hurt anything, and no loss of characters will result.

If you're worried about what to do with the extra I/O lines of the 2313,
    </pre>
  </blockquote>
  <pre wrap=""><!---->connect
  </pre>
  <blockquote type="cite">
    <pre wrap="">LEDs to them and blink them as status lights as characters pass through
    </pre>
  </blockquote>
  <pre wrap=""><!---->the
  </pre>
  <blockquote type="cite">
    <pre wrap="">board. *Everybody* likes blinking status lights. ;-)

-Zonn
    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>

</x-html>
Received on Wed Jun 04 07:52:19 2003

This archive was generated by hypermail 2.1.8 : Tue Dec 02 2003 - 18:40:52 EST