M200 interfacing continues...

From: Vintage Computer Festival <vcf_at_siconic.com>
Date: Thu Jan 2 05:59:00 2003

Ok, I'm almost there. I've got everything wired up and most of the driver
software done.

The main problem I'm having is reading the control lines of the 6522.
According to the spec sheet, CB1, CB2 and CA2 are all supposed to be TTL
level outputs when programmed for such. So they are, but I'm having
trouble reading CB2 reliably. I put a pull-down resistor on it but that
doesn't help. The signal to it is spotty for some reason.

I've got the PICK CHECK signal from the reader going into CB2. I have a
1K resistor going from CB2 to ground.

READER SIGNAL----+----/\/\/\-------GND
                 |
                 |
             6522 CB2

If there's an error (misfeed for instance) CB2 should get a logical TRUE.
This works sometimes, but not always. And it's the same whether I have
the pull-down resistor or not. I'm using CB1 reliable without the need
of a pull-down resistor.

I don't know if it's sloppy code or a bug, but the Apple doesn't seem fast
enough to read and process the data character by character. I would think
that it should be fast enough to do so but I'll have to check the timing
on the loop and see if it falls within the specs of each column read from
the reader. For now I've switched to buffering the data and then
processing it after each card read, controlling the picker with the
software to control the flow of cards.

I'm figuring out the code for the last piece which decodes the row pin
into a decimal number. What's the best way to do an nth root operation in
6502 assembly? :)

Crummy way:

      LDY #00
LOOP INY
      LSR
      BCC LOOP

This assumes only 1 bit is set in the accumulator. It loops until the bit
falls off from the LSR operation. Assuming the accumulator has #80 to
begin with, the Y-register result should be 8.

-- 
Sellam Ismail                                        Vintage Computer Festival
------------------------------------------------------------------------------
International Man of Intrigue and Danger                http://www.vintage.org
 * Old computing resources for business and academia at www.VintageTech.com *
Received on Thu Jan 02 2003 - 05:59:00 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:58 BST