Interfacing to a PSX

Started by ReKleSS, September 13, 2008, 10:16:11 PM

Previous topic - Next topic

ReKleSS

A while ago I built a PSX saturn pad, then traded it, then found myself wanting one again. Since I don't want to go through the horrible wiring crap again, I figured it would be easiest to build a converter, since both PSX and Saturn protocols seem fairly simple. I'm using an Atmel AVR, and I've got it talking to a PSX adapter using the USI interface. The thing is, it only talks to one specific converter, a "3 in 1 PC Joy Box". On my other converters and a real PSX, nothing happens - the PSX won't acknowledge it's connected. I've messed with the timing of the ACK signal, but that hasn't helped. All the PSX wires are connected straight to the IO pins of the chip - is there something else I need to add?


Oh, something else that came to mind. According to the various pages on the controller protocol, the lines that the controller uses to send data are meant to be pulled up on the console side. I was poking around with a multimeter and there seemed to be capacitors between those lines and Vcc. Is there a reason for this?

ulao

#1
QuoteOh, something else that came to mind. According to the various pages on the controller protocol, the lines that the controller uses to send data are meant to be pulled up on the console side. I was poking around with a multimeter and there seemed to be capacitors between those lines and Vcc. Is there a reason for this?
- I think this is a Flyback capacitor. And you are correct its prolly a timing issue.

Try to change the mil sec (100 for hold ).

Also good info
Quote
Most of the time, you might wish to have the processor poll the PSOne controller constantly--without having to "call" an on-demand key-reader routine. If your processor supports timer/counter-triggered interrupts, you may be able to accomplish this. The AVR version ran off a 4.00MHz clock source with a divide-by-64 prescale, giving the timer a 16us interval. In other words, the interrupt rate was be controlled by this property:
1 / (CLOCK RATE [Hz] * PRESCALE) = INTERVAL [in seconds]

Polling each 16us is much too rapid, so to increase the interval further , I used a 16-bit timer/counter register (TCCR1) as a time keeper. Next, I loaded a value of 0x0411, or "1041" into the timer-compare register (OCR1A). This allows E-22 to activate it's timer-compare-match interrupt every 16.672ms (16us * (1041+1)).

These timers and counters are explained in more detail in the source code. The main thing to keep in mind is that you probably do not want to sample much faster than 60 times a second.