On 27/03/2011 20:55, threewheeler6 wrote: > > > Oli Glaser wrote: >> Could do with seeing info on how the switches are mapped to bits in the >> bytes. From what I gather the console sends some request, then the >> controller responds with 2 data bytes (after the initial sequence) Is >> each switch just represented by a bit toggle? >> Maybe your timing or alignment is out, or the data is getting corrupted, >> but can't be sure of anything without some info on the console protocol >> - a link to a relevant page or something. >> >> > Sorry about that, http://www.gamesx.com/controldata/psxcont/psxcont.htm i= s > pretty complete. > > Thank You > -Eric Ah, that makes sense I think. The protocol for byte 4 of the digital=20 controller is : Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 SLCT STRT UP RGHT DOWN LEFT The fact you are seeing up and right for up pressed, and down and left=20 for down pressed seems to suggest you may have the data line timing=20 wrong, and the up/down bit is "eating" into the next (down/left) bit=20 time. This could be due to a problem in your code, or capacitance on the=20 data line, so the voltage falls too slowly. Is the PIC pin directly=20 driving the data line? If you can't find the problem in your code, you=20 could try adding a buffer (or using a shorter cable, or just as a rough=20 test pull the line low a little earlier) I would check the timing with a scope/logic analyser to see if this is=20 what is happening. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .