Welcome, Guest. Please login or register.

Author Topic: PS2 Keyboard Adapter  (Read 1704 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline DrDekkerTopic starter

  • Sr. Member
  • ****
  • Join Date: Mar 2006
  • Posts: 325
    • Show only replies by DrDekker
PS2 Keyboard Adapter
« on: May 12, 2006, 01:30:11 PM »
Has anyone successfully built their own PS2 keyboard adapter for their A1200?

I've had a go myself, but so far without any success. :-(

Thanks.
A1200, M-Tec 1230 @28MHz, FPU, MMU, 8Mb fast ram, SCSI card, 512Mb HD, Power CDROM drive, PS2 optical mouse
 

Offline Oliver

  • Hero Member
  • *****
  • Join Date: Sep 2005
  • Posts: 803
    • Show only replies by Oliver
Re: PS2 Keyboard Adapter
« Reply #1 on: May 12, 2006, 03:36:02 PM »
I haven't built that project, but maybe you could describe what you have done, and what the problems are.  I believe people have had success with such diy adapters before.
Good good study, day day up!
 

Offline Louis Dias

Re: PS2 Keyboard Adapter
« Reply #2 on: May 12, 2006, 03:51:04 PM »
I can't remember which adapter was built-in on my SX-1 (CD32) be it AT or PS/2 but it worked great.
 

Offline DrDekkerTopic starter

  • Sr. Member
  • ****
  • Join Date: Mar 2006
  • Posts: 325
    • Show only replies by DrDekker
Re: PS2 Keyboard Adapter
« Reply #3 on: May 13, 2006, 12:46:20 AM »
@Oliver - I've built an adapter based on the 'IBMkey25' design.  However, I've had to use a PIC16F84 instead of the PIC16C84 originally specified.  Although the 16F' replaces the 16C', there are a few differences.

Unfortunately, I'm no programming whizz and although I've hacked the code a bit to make it more compatible with the 16F' and MPASM, the adapter causes the Amiga to not boot and display a blank blue, green, red, or yellow screen.  I've checked all the wiring, connections, etc., many times and all looks good.  It might just be the hacked PIC definitions file that's causing the problem.  Perhaps I'll have to try out another design, or maybe buy a ready made adapter (not as much fun though).  
A1200, M-Tec 1230 @28MHz, FPU, MMU, 8Mb fast ram, SCSI card, 512Mb HD, Power CDROM drive, PS2 optical mouse
 

Offline Oliver

  • Hero Member
  • *****
  • Join Date: Sep 2005
  • Posts: 803
    • Show only replies by Oliver
Re: PS2 Keyboard Adapter
« Reply #4 on: May 13, 2006, 06:05:39 AM »
Hi Dr. Dekker,

I've done chip swaps before, but it was some time ago.  I've forgotten exactly what was involved, but it was more than just changing the 'list' and '#include' lines.  I think it's most likely a problem with the chip programming (assuming your PCB is good).  I had just a quick look at those chips, and it seems they are very similar, right?  You are using the f84, and not the f84A, right?

Have you carefully checked all the config bits?  Also, are you using the lastest MPASM version, and a good programmer?  Does your programmer software correctly support the f84?

I've had problems with some DIY programmer schematics online, which failed to provide reliable programming voltages, and serial communication.  Also, at least one version of MPASM (or MPLAB, forget which is which) had a bug which would always change to low voltage programming, regardless of your chip type selected, or previously edited settings.  In both these cases, the software would report correctly verified programming, but the chip wouldn't function as expected when placed in a circuit.

Have you got a bread board which you could use to verify the proramming reliability with some simple code?

Have you tried the line-by-line debugger provided by Microchip?  I can't remember what it's called, but it's pretty handy for examining your registers.  I think you can step through the lines, and change your inputs as you go.  You could try doing this with both the original code simulating a c84, and your modified code simulating an f84 to compare them.  This is time consuming, and tedious, but can be very enlightenning.  I assume you have a good understanding of the register functions.

Looking at the IBMKEY25.ASM, it seems the author hasn't specified the config bits.  I have only had a quick look at the project though.  Did the author mention that these should be specified at some point, such as in the programmer control software?  I generally think the config bits should be specified.

The author also mentioned that some motherboards will need to be hacked to work with this adapter.  Have you done anything with regards to this?

Also, you're definitely using the hex file generated from your modified code, right?

-Oliver
Good good study, day day up!