Re: PS/2 mouse as 1351?

From: john/lori (lgnjh_at_earthlink.net)
Date: 2003-09-17 07:53:22

I know nothing of these matters, but I was curious and had a look at the 
data sheet for the AT90S8515.

so, caveat: I'm just speculating from the documents

I didn't see a description of the characteristics of the interrupt pins
but a couple of thoughts come to mind.

First if the pin(s) driving the POTX/Y are set to output high while the
SID is discharging the cap the SID may well not be able to drag the
interrupt
node low enough. (assuming basically the same circuit as the project on
funet)

I didn't look at how complicated it would be to switch the port pin
functions.
or what happens to the interrupt when you do.

Looks to me like you could use the interrupt pin to signal the SID
leaving it as an input pin with the pull up switched on, except for
a few cycles when you switch it to output high (just long enough to
signal the SID) if that works you might use a much smaller current
limiting resistor (or none at all) for better accuracy.

If using a pin seperate from the interrupt pin for output, you might
get into trouble if you have two pull ups on.

The AVR data sheet gives the pullups as 35K minimum.
The SID data sheet I have doesn't give much meaningful data and it's
been
so long since I've actually messed with it that I don't remember.
The SID data sheet gives the POT sink current as 500ua minimum.
It doesn't give a voltage, but if that's at 5V then we might guesstimate
an on resistance around 10k
The AVR data sheet gives the maximum input lo voltage as .2Vcc
so assuming you're using the 11k current limiting resistors (like the
schematics on funet)and Vcc is 5V, sounds like it should work even in
the worst case with one pullup on. I get an input of about .9V worst
case with those assumptions (and I really think those assumptions
are probably to pessimistic) or 1.25V with two pullups on.

So if you've got both pull ups on try turning one off.
(or you might be able to get by with no pullups, provided
you start by charging the cap and it doesn't leak off
in between, it would only be out of sync with the SID the first time.
that's just a thought, I wouldn't recommend it)

If that's what you're doing, and it's not working, you could tristate
the
pins (turn both pull ups off) and use an external pullup resistor.

Or maybe you could use the analog comparator as the interrupt source. 
 
 

Maciej Witkowiak wrote:
> 
> Hello!
> 
> Last few days I have been trying to put together an interface to emulate 1351
> mouse basing on input from PS/2 mouse. There is similar project on
> ftp.funet.fi but it uses RS232 mouse, a kind that becomes rare.
> 
> I used Amtel AVR 90S8515[1] and so far I have implemented bidirectional PS/2
> protocol using built-in serial port (SPI, not UART) and I have working
> joystick emulation mode. I have also functions which (I think) should transfer
> bytes over POTX/Y to C64 more or less accurately.
> 
> Now, the only thing missing is the detection of when SID starts the measuring
> cycle. In the document from funet the POTX line is connected to uC interrupt
> input so when it changes from high to low there is an interrupt triggered.
> I tried using it in my design, but it failed to work.
> There is also this quote from funet document:
> 
> "Unfortunately, the POTX signal that was enough for the 16C84 to sense an
>  interrupt request, is too off for this Schmitt-trigger input :-(. What you see
>  from this, that you can use the 16F84 as a 16C84 substitute - but the
>  interface won't work in native 1351 mode at all! The same applies, BTW, for
>  the 16CR84 chip."
> 
> While I don't understand what exactly he meant, I guess that this is the
> cause why I don't get any interrupts on my AVR. From its datasheet I
> learned that it has Schmitt-trigger input.
> 
> In such situation the author suggests using unused I/O from MAX232 chip for
> "conditioning the POTX signal to meet the requirements". Obviously I don't
> want to add MAX232 to my simple design just for that.
> 
> Are there any other options?
> 
> ytm
> 
> [1] *8515 for development, finished project should fit on a smaller device
> 
>        Message was sent through the cbm-hackers mailing list

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.