CPCWiki forum

General Category => Technical support - Hardware related => Topic started by: ikonsgr on 00:21, 02 August 22

Title: CPC464 keyboard problem
Post by: ikonsgr on 00:21, 02 August 22
Suddenly i switch on my cpc464 and i get this on screen:



I unplug keyboard and still got the same. So it's not membrane/keybaord problem. This seems like a hole keyb column (7 according to hardware manual (https://www.cpcwiki.eu/forum/index.php?action=dlattach;attach=8028;image)) is permenantly activated, so i desolder the filter of the specific column , but still i got the same problem....
Does this mean there is a problem with AY sound chip, and needs replacement?

Title: Re: CPC464 keyboard problem
Post by: WacKEDmaN on 04:22, 02 August 22
...this is what my CPC did back in the day when i soldered up a joystick while it was pluged into running cpc!...

either the AY or PIO or maybe even the 74LS145 (was the PIO on mine)
Title: Re: CPC464 keyboard problem
Post by: pelrun on 04:44, 02 August 22
I did it as a kid just picking up the joystick after touching the monitor - even though there was no metal contact I'd picked up enough static charge from the screen to zap the port *through* the plastic!
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 09:36, 02 August 22
I didn't know that amstrad cpc had such "sensitive" joy port... :)
Anyway, i've tested the AY pin 10 (which is responsible for activation of the specific keyboard column) and found out that is ~0v=active, so 99% AY needs replacement...  :(
Btw, i've checked for AY-3 8912 chips, and prices seems to be very high, ~30euros for a single chip! I don't recall to be so expensive at least some years ago...  ::)
Title: Re: CPC464 keyboard problem
Post by: pelrun on 11:09, 02 August 22
IC's are sensitive to electrostatic discharge? Why didn't someone tell me earlier? ;D

It actually takes a lot of engineering work to make any device robust against casual ESD events. Cheap home computers from the 80's... have exactly none of that. The CPC's joystick port is especially egregious because it exposes floating CMOS pins directly to the outside world.

If you instead look at something like the Amiga schematic, the joystick port has ESD diodes and current limiting resistors on all the lines. The CPC just uses wires :doh:
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 12:01, 02 August 22
Quote from: pelrun on 11:09, 02 August 22IC's are sensitive to electrostatic discharge? Why didn't someone tell me earlier? ;D

It actually takes a lot of engineering work to make any device robust against casual ESD events. Cheap home computers from the 80's... have exactly none of that. The CPC's joystick port is especially egregious because it exposes floating CMOS pins directly to the outside world.

If you instead look at something like the Amiga schematic, the joystick port has ESD diodes and current limiting resistors on all the lines. The CPC just uses wires :doh:
My friend, if you've seen what i have done with amstrad's joy ports over the many years i make and test various adapters for it, you would probably have a heart attack...  :laugh:
To give you a clue, while amstrad is powered on:
- Plug/unplug millions times "pasive" joysticks and Y joy adapters
- Plug/unplug "Active" adapter like the 5v supply for joy port (http://retroworkbench.blogspot.com/p/5v-power-supply-for-joystick-port-to.html)
- Plug/unplug many other "Active" adapters (for 15pin joysticks, usb mouses, bluetooth wireless port etc) to 5v psu joy adapter
Maybe this made me a bit "over confident" (and careless...  ::)  ), about the robustness of the port. Believe it or not, this is the 1st time something like this happened, but surely from now on i will be more careful with joy port, as with current price trends, next time, they may ask for an arm and a leg for a chip... :D
Title: Re: CPC464 keyboard problem
Post by: Bryce on 13:12, 02 August 22
Most IC's are relatively robust against ESD events. I've done experiments to see how difficult it is to destroy an IC and in some cases I was amazed that the chip still worked after visible sparks had jumped over to the chip. One of the big issues with home computers is/was the fact that they were being used by children in socks on a carpet floor or the computer was actually on the carpet in front of the TV (The cause of death for many many Spectrums). CPC's had less ESD issues purely because they had their own monitor and were more likely to be used on a desk.

Bryce.
Title: Re: CPC464 keyboard problem
Post by: eto on 16:29, 02 August 22
There was this hilarious video at Linus Tech Tips, where an expert(?) tried to show how dangerous ESD is. They used an ESD gun to show how a component can easily be destroyed. Quote: "if you manage to NOT kill a component, with an ESD discharge you got lucky." Well... they pretty much proofed exactly the opposite. 


https://www.youtube.com/watch?v=nXkgbmr3dRA
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 11:02, 03 August 22
Some update: As i have a complete "rebuilded" cpc6128, with all ic's on sockets, i removed the bad AY3 from cpc464, solder a socket, and plug the good AY3 from cpc 6128. The "always active" column problem, seems to resolve, as i dont get any characters on boot. BUT, now i have an even more weird problem: many keys pressed, return 2 characters on screen!  ???
I checked with the keyboard matrix, and found out that, for every key pressed, the one that coresponds to same column and previous line, is also activated and printed on screen! For example, if i press 'R' which is on row 13 ,i also get an 'E' which is on same column, but on row 12! Same thing happens with all keys (except the one that in the 1st row). Does this mean the 74ls145 needs replacement too, or you think it's also PIO chip damaged too?
Title: Re: CPC464 keyboard problem
Post by: Rabs on 14:09, 03 August 22
Quote from: ikonsgr on 11:02, 03 August 22Some update: As i have a complete "rebuilded" cpc6128, with all ic's on sockets, i removed the bad AY3 from cpc464, solder a socket, and plug the good AY3 from cpc 6128. The "always active" column problem, seems to resolve, as i dont get any characters on boot. BUT, now i have an even more weird problem: many keys pressed, return 2 characters on screen!  ???
I checked with the keyboard matrix, and found out that, for every key pressed, the one that coresponds to same column and previous line, is also activated and printed on screen! For example, if i press 'R' which is on row 13 ,i also get an 'E' which is on same column, but on row 12! Same thing happens with all keys (except the one that in the 1st row). Does this mean the 74ls145 needs replacement too, or you think it's also PIO chip damaged too?
Guessing here as new to this but, if you press 'E' do you also get 'R' (other way round to your example)? i.e. is there a short between row 12 and 13 at the 74LS145. Worth a continuity check.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 14:45, 03 August 22
Quote from: Rabs55 on 14:09, 03 August 22Guessing here as new to this but, if you press 'E' do you also get 'R' (other way round to your example)? i.e. is there a short between row 12 and 13 at the 74LS145. Worth a continuity check.

If i press 'e' i also got 'esc', and same goes with any key pressed, i also get on screen the corresponding character of same column and previous row in keyboard matrix (https://www.kernelcrash.com/blog/wp-content/Screen-Shot-2017-01-18-at-12.41.39-PM.png)!If i press 'O' i also get 'U', if i press 'H' i laso get 'G' and same goes with ane key! It's like 74LS145 decoder gives double signal or maybe the the 4bits of portc from 8255 I/O chip gives wrong signals?  ::)
Title: Re: CPC464 keyboard problem
Post by: Rabs on 19:25, 03 August 22
Quote from: ikonsgr on 14:45, 03 August 22
Quote from: Rabs55 on 14:09, 03 August 22Guessing here as new to this but, if you press 'E' do you also get 'R' (other way round to your example)? i.e. is there a short between row 12 and 13 at the 74LS145. Worth a continuity check.

If i press 'e' i also got 'esc', and same goes with any key pressed, i also get on screen the corresponding character of same column and previous row in keyboard matrix (https://www.kernelcrash.com/blog/wp-content/Screen-Shot-2017-01-18-at-12.41.39-PM.png)!If i press 'O' i also get 'U', if i press 'H' i laso get 'G' and same goes with ane key! It's like 74LS145 decoder gives double signal or maybe the the 4bits of portc from 8255 I/O chip gives wrong signals?  ::)
Sorry not sure I have enough experience to help but interested in how you get on. I have fixed two CPC 6128s with odd keyboards issues but in both cases it appears to have been the keyboard and ribbon contacts. At least after cleaning the issues went away. Guess you can check output on the 74LS145 for a given input or if you have a logic tester check with this.
Title: Re: CPC464 keyboard problem
Post by: Animalgril987 on 21:51, 03 August 22
Are any of the inputs to the '145 stuck high ( or low)? Are any of it's outputs stuck high or low?
Title: Re: CPC464 keyboard problem
Post by: Audronic on 01:33, 04 August 22
@ikonsgr 

Is the replacement chip  AY-3 8912   or an    AY-3 8912a

Can you show a photo of the AY-3 8912 chip and the tracks nearby .

Keep Safe

Ray
Title: Re: CPC464 keyboard problem
Post by: Audronic on 01:46, 04 August 22
Some info on AY-3 8912

Keep Safe

Ray




Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 13:45, 04 August 22
Quote from: Audronic on 01:33, 04 August 22@ikonsgr
Is the replacement chip  AY-3 8912   or an    AY-3 8912a
It's the original 8912 without 'A' so it does not need extra pullup resistors  ;)

Ok, further investigation report: Check all i/o pins of 74LS145 with logic probe, all are pulsed, EXCEPT the q0 output which is always gnd=> active.
Also,i discover that if i press continuously a key the character typed on screen is the one on same column previous row! Check this video (https://www.dropbox.com/s/y5furi3jr1nrtl1/keyb_prob.mp4?dl=0) to see what i mean. Key pressed are "r","5" and "u" and as you can see, on continues pressing of key i got 'e','3' and 'r' which are exactly the characters on same column previous row...  ???
I suppose this mean bad 74ls145?
Title: Re: CPC464 keyboard problem
Post by: eto on 14:31, 04 August 22
Does this happen for all rows, or only for some of them? What happens, if you press a key from line 0?

When you press something from line 6 or 2, you get something from the line above, line 7 or 3, right?
What about line 5? Is it the line above, 6, or does the response come from line 4?

(https://i.stack.imgur.com/FSPgb.png)

Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 16:17, 04 August 22
Quote from: eto on 14:31, 04 August 22Does this happen for all rows, or only for some of them? What happens, if you press a key from line 0?
Exactly, with all rows. If i press key from line 0 i also got from line 1, e.g. pressing f9 gives '98'
Quote from: eto on 14:31, 04 August 22When you press something from line 6 or 2, you get something from the line above, line 7 or 3, right?
exactly. For example,any key from line 6 will type also the key for same bit but line 7
Quote from: eto on 14:31, 04 August 22What about line 5? Is it the line above, 6, or does the response come from line 4?
like with all others. I will also get on screen the character for same bit line 6

Btw, i also tried using a keyboard from  cpc6128 which works perfect and i got exactly same behavior. So definetely it's not membrane/keyboard problem...
Title: Re: CPC464 keyboard problem
Post by: eto on 17:47, 04 August 22
Looking at the block diagram of the 74LS145, I think this would happen, if one of the NOT-gates is broken and simply passes through the logic.

Then, always two lines will be active.

However I don't get how q0 can always be active then, and why it does not always press a key on row 0 in addition, if it's active.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 22:03, 04 August 22
Well, defintely something is wrong with either or both chips involved. I'll replace 74LS145 first, and if still have problems, then i'll go for the "Big" one too...  ::)
Title: Re: CPC464 keyboard problem
Post by: Audronic on 01:36, 05 August 22
@ikonsgr 

? do you have a Joystick connected during the tests

Keep Safe

Ray
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 12:16, 05 August 22
Quote from: Audronic on 01:36, 05 August 22@ikonsgr
? do you have a Joystick connected during the tests
Keep Safe
Ray
No.But i've also tried with joystick connected. On boot,i get 'Z' on screen, which i think is normal. Movements seem to work ok, and primary fire (fire2 on pin 6) also give 'X' on screen. Only the 2nd fire, which normally should give 'Z', it gives 'fd'... ::)
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 17:58, 12 August 22
Ok, i've just replaced 74LS145 and 8255 I/O and still i got the same symptom! Any key pressed, will type the character pressed and then the character  on same bit next line (https://i.stack.imgur.com/FSPgb.png)!
Is there a chance that the rom might be damaged too? I really can't think anything else...
Title: Re: CPC464 keyboard problem
Post by: Rabs on 18:04, 12 August 22
Quote from: ikonsgr on 17:58, 12 August 22Ok, i've just replaced 74LS145 and 8255 I/O and still i got the same symptom! Any key pressed, will type the character pressed and then the character on same bit next line (https://i.stack.imgur.com/FSPgb.png)!
Is there a chance that the rom might be damaged too? I really can't think anything else...
Hi on one of the 464s I repaired with an odd keyboard problem, it turned out to be the ribbon connector on the pcb. Give it a good clean and then clean it again. Hope this helps.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 18:11, 12 August 22
Quote from: Rabs on 18:04, 12 August 22Hi on one of the 464s I repaired with an odd keyboard problem, it turned out to be the ribbon connector on the pcb. Give it a good clean and then clean it again. Hope this helps.

 I already done that, but didn't help. I also tried a good cpc 6128 keyboard which gave me the same symptoms! I wonder if a bad LC line filter can cause such a weird behavior...  ::)   
Btw,i have removed a couple of these filters (i'm wating for replacements to solder them back), is there a chance an upsence of a line filter, could cause such weird problem?
Title: Re: CPC464 keyboard problem
Post by: pelrun on 18:37, 12 August 22
The 74LS145 has open-collector outputs, which means it only drives low but requires a pullup to go high. If the pullup is too weak, then a row will stay low for too long after it has been deselected, which is exactly what you're seeing.

That's either because the AY3's pullups are not present or are atypically high resistance, or because the resistance through the keyboard is too high. Have you cleaned the connectors for the keyboard membrane?
Title: Re: CPC464 keyboard problem
Post by: Rabs on 18:43, 12 August 22
Quote from: ikonsgr on 18:11, 12 August 22
Quote from: Rabs on 18:04, 12 August 22Hi on one of the 464s I repaired with an odd keyboard problem, it turned out to be the ribbon connector on the pcb. Give it a good clean and then clean it again. Hope this helps.

 I already done that, but didn't help. I also tried a good cpc 6128 keyboard which gave me the same symptoms! I wonder if a bad LC line filter can cause such a weird behavior...  ::) 
Btw,i have removed a couple of these filters (i'm wating for replacements to solder them back), is there a chance an upsence of a line filter, could cause such weird problem?
Beyond my knowledge, I am afraid. Wish I could help. Looks like you have replaced almost everything except the PIO? Noticed a lot of posts keep going back to the joystick, maybe worth a look at tracing the connections to the connector and looking for a short? But I did follow the recommendations by Bryce in another post and he did reference the capacitors as a possible cause.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 18:51, 12 August 22
Quote from: pelrun on 18:37, 12 August 22The 74LS145 has open-collector outputs, which means it only drives low but requires a pullup to go high. If the pullup is too weak, then a row will stay low for too long after it has been deselected, which is exactly what you're seeing.
That's either because the AY3's pullups are not present or are atypically high resistance, or because the resistance through the keyboard is too high. Have you cleaned the connectors for the keyboard membrane?
Well, i don't know if this is exactly my case... You see, when i press a key, first i will get the corresponding character on screen, but imediately after, the character on same bit next line, will also appear on screen! This means that,for some reason, there is always an abnormal activation of line next to one correctly activated! Perhaps i should try placing network resistor on 74ls145 outputs?  ::)
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 23:30, 12 August 22
Quote from: Rabs on 18:43, 12 August 22But I did follow the recommendations by Bryce in another post and he did reference the capacitors as a possible cause.
Which capacitors you mean? The caramic 100nf on the side of 74ls145 and 8255? Btw, the 8255 I/O is also replaced too  :)
Title: Re: CPC464 keyboard problem
Post by: Rabs on 23:43, 12 August 22
Quote from: ikonsgr on 23:30, 12 August 22
Quote from: Rabs on 18:43, 12 August 22But I did follow the recommendations by Bryce in another post and he did reference the capacitors as a possible cause.
Which capacitors you mean? The caramic 100nf on the side of 74ls145 and 8255? Btw, the 8255 I/O is also replaced too  :)
Below is Bryce's recommendations to fault finding a keyboard problem, which I followed last time 

1 - Check what happens when you turn on the CPC with no keyboard attached.
2 - If the problem still occurs with the keyboard disconnected, swap the AY-3-8912.
3 - Check that there's no loose wire / screw or anything under the PCB that is causing a short circuit.
4 - Check the capacitors associated with the three ICs. These are the small brownish discs at the end of each IC:
     C128 for the 74LS145
     C124 for the AY-3-8912
     C119 for the 8255
     If any of these are chipped, broken or damaged, this could be the problem.
5 - If you still haven't found the problem, swap the 74LS145.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 11:09, 13 August 22
Problem resolved! It was the "good old" input port pull up resistor problem for the AY chip, after all.... ::)
Although i used a AY-3 8912 which supposed to have internal pullups, for some reason it didn't work right on my CPC464. Only problem is that CPC464 board doesn't provide the placement for optional pull-up resistor network (like with CPC6128 board),so i had to solder it at the bottom of the board:



Now, everything works ok! So it seems that replacement of 74LS145 and I/O 8255 chips was not needed, but the good think is that, i placed sockets for any future replacements needed...  :)
Thanks for your interest and help!  :)
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 19:07, 13 August 22
Btw, i'm really pissed with the insane prices of the AY-3 8912 (cheapest price is currently ~25euros/piece!!!), so i'm thinking of creating an adapter to be able to plug the much cheaper ay-3 8910 (i find it on ebay for ~3euros...)
Since this chip is relatively easy to be damaged (because of the direct connection to the joy port), i think it might be a good idea, what do youthink?
Title: Re: CPC464 keyboard problem
Post by: eto on 19:33, 13 August 22
Quote from: ikonsgr on 19:07, 13 August 22Btw, i'm really pissed with the insane prices of the AY-3 8912 (cheapest price is currently ~25euros/piece!!!), so i'm thinking of creating an adapter to be able to plug the much cheaper ay-3 8910 (i find it on ebay for ~3euros...)
Since this chip is relatively easy to be damaged (because of the direct connection to the joy port), i think it might be a good idea, what do youthink?
I thought the same today when I checked for prices. However the mainboards are quite different and we might need more than just a single version of an adapter.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 19:37, 13 August 22
You mean the placement of the adapter board in order to fit under keyboard? I though so, but since this is for replacement only, you don't need to plug a 28pin socket and then plug the adapter board, but instead you can plug the adapter board directly on amstrad board and save height!  ;)  When i will finish it, i will give you a 3d photo of the board to see if it will fit n any cpc464 board
Title: Re: CPC464 keyboard problem
Post by: eto on 19:43, 13 August 22
Quote from: ikonsgr on 19:37, 13 August 22You mean the placement of the adapter board in order to fit under keyboard? I though so, but since this is for replacement only, you don't need to plug a 28pin socket and then plug the adapter board, but instead you can plug the adapter board directly on amstrad board and save height!  ;)  When i will finish it, i will give you a 3d photo of the board to see if it will fit n any cpc464 board
464, 664, 6128 and Plus ;-)
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 19:46, 13 August 22
Ok,this is how it would like:

 

On the 40pin connector will be a socket, and on the 28pin connector, thin round pins like these (https://www.ebay.ie/itm/170850551777) i order to fit on socket or solder them directly on cpc464 board.

I'm also thinking of adding an 8pin connector to access the 2nd I/O port of 8910, and also a pullup resistor for the 1st port, in case it is needed  :)
What do you think?
Title: Re: CPC464 keyboard problem
Post by: Bryce on 20:02, 13 August 22
You just need to wait long enough for a good offer to turn up and grab them all. I got a lot of 20x AY-3 8912 for €6 per chip a few months ago. Unfortunately I fix a lot of stuff (other than CPC too) that use these so I probably only have 1 or 2 left over at this stage.

Bryce.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 20:17, 13 August 22
Ok,i just finished the board!  :P



Dimensions are roughly 5cmX3cm and i used interleave placement in order to save space. If anyone wants to give it a try, i can send him the gerber files!  ;)
Title: Re: CPC464 keyboard problem
Post by: TotO on 20:53, 13 August 22
Quote from: ikonsgr on 19:37, 13 August 22so i'm thinking of creating an adapter to be able to plug the much cheaper ay-3 8910 (i find it on ebay for ~3euros...)
Since this chip is relatively easy to be damaged (because of the direct connection to the joy port), i think it might be a good idea, what do youthink?
Nice idea. ;D
As I know, the pull-up resistors are embedded into the AY-3-8910.
Title: Re: CPC464 keyboard problem
Post by: ikonsgr on 22:11, 13 August 22
Quote from: TotO on 20:53, 13 August 22As I know, the pull-up resistors are embedded into the AY-3-8910.
Well, same is for 8912, but unfortunately it didn't work with my CPC464 (still needed external pull-ups) , so it's better have it that too as an option, don't you think?  :)
Title: Re: CPC464 keyboard problem
Post by: TotO on 22:17, 13 August 22
I think that is not usual to have a faulty or weak RN into the IC, but sure, if you have the room for that...
That cost nothing to have the footprint.
Title: Re: CPC464 keyboard problem
Post by: eto on 22:57, 13 August 22
Quote from: TotO on 20:53, 13 August 22As I know, the pull-up resistors are embedded into the AY-3-8910.
There is also a AY-3-8910A ;-)
Title: Re: CPC464 keyboard problem
Post by: eto on 12:22, 14 August 22

Quote from: eto on 22:57, 13 August 22
Quote from: TotO on 20:53, 13 August 22As I know, the pull-up resistors are embedded into the AY-3-8910.
There is also a AY-3-8910A ;-)
(quoting myself as I can no longer edit)

I tried to find data sheets for the A variant but I could only find them for non-A. But if the 8912A differs from the 8912 in the way, that it no longer has pull-ups, then that's probably also the case for the 8910A. Since we know, that you can order a 8912 and get a 8912a, this might also happen for a 8910, so having the option to easily add a pull-up is great.

btw: I found several forums/boards where people said that you can just swap an A for a non-A chip. Not a single one mentioned that you need the resistors. The only references of a pull-up lead back to the CPCwiki. This makes me think if that's a real thing. Has someone confirmed that there is no pull-up? Or is it just a CPC thing that an additional pull-up is required? 
Title: Re: CPC464 keyboard problem
Post by: Bryce on 12:36, 14 August 22
The pull up resistors are only important in the CPC because the 74LS145 is an open collector chip. If the AY was communicating with a chip with driven outputs the pull up resistors would not be an issue. This is probably the case for most other devices where the AY was used.

Bryce.
Powered by SMFPacks Menu Editor Mod