The keyboard is connected to the KL25Z via two ribbon cables. The "J1" socket (the lower one in the photo) needs a 14-way ribbon cable, and the "J9" socket a 12 way cable. Both of these cables should be placed in the left-most 14 or 12 spaces in the 16-way socket (as shown in the photos). IDC sockets can most easily be assembled by gently squeezing them onto the cables in a bench vice.

Note:if the sockets have a 'polarising' bump, so they only fit in the 16-way headers one way round, make sure you get them on the right way round! Refer to the photos for details.

Once the sockets are on, separate the individual wires at the other ends, strip them and tin them so they will go through the holes on the keyboard PCB. Wiring these up is mostly straightforward...

We'll call the left-most wire in each ribbon cable "wire 1", so we have "J1 wire 1" to "J1 wire 14", and "J9 wire 1" to "J9 wire 12".

We'll number the holes in the keyboard PCB from 1 to 22, with 1 being nearest the edge (at the left in the above photo).

The ribbon cable wires then go into the keyboard PCB holes as follows:

1. J9 wire 1 (PTE5)

2. J9 wire 3 (PTE4)

3. J9 wire 4 (GND)

4. J9 wire 10 (P3V3)

5. J9 wire 5 (PTE3)

6. J9 wire 7 (PTE2)

7. J9 wire 9 (PTB11)

8. J9 wire 11 (PTB10)

9. J1 wire 1 (PTA1)

10. J1 wire 2 (PTC7)

11. J1 wire 3 (PTA2)

12. J1 wire 4 (PTC0)

13. J1 wire 5 (PTD4)

14. J1 wire 6 (PTC3)

15. J1 wire 7 (PTA12)

16. J1 wire 8 (PTC4)

17. J1 wire 9 (PTA4)

18. J1 wire 10 (PTC5)

19. J1 wire 11 (PTA5)

20. J1 wire 12 (PTC6)

21. J1 wire 13 (PTC8)

22. J1 wire 14 (PTC10)

Note that four of the signals on the J9 cable are not used. The signal names (PTE5 .. PTC10) are shown on the Quick Reference card which accompanies the KL25Z board - you can use this for fault-finding if the keyboard doesn't quite work as planned.

If you've got this far: well done, the hardest part is now over! Time to put the kettle on and fire up that PC.