Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 13:51 28 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2 No keyboard function on different keyboards that support PS/2

     Page 3 of 4    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 10:16pm 09 Jul 2020
Copy link to clipboard 
Print this post

Koryo,
Assuming you have control via the PC terminal,
What do you get with:
print MM.INFO$(KEYBOARD)

Try both with the USB keyboard plugged in and again without the KB plugged in.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 10:30pm 09 Jul 2020
Copy link to clipboard 
Print this post

Daniel,
If it was my system, I would try a couple of hacks with the power supplying the keyboard.

It does require modifying the main-board or cutting a USB extension cable.

Test 1.
Supply the keyboard directly from the 5V in so that it has power already when the CMM2 is switched on.
This might eliminate any switch on power surges.

Test2.

Leave the keyboard un-powered and only apply power a second or so after turning the CMM2 on.
This should be similar to plugging in after power up.

I don't think the problem is with your Waveshare module.


Are you using the DE option for your keyboard?
I can't see how that would matter but it is worth asking.

I tested a few different keyboards during the development stages.
I will go through my collection again today and see if I can find one that has your issues.
I am using a Y revision Waveshare board.

Jim
VK7JH
MMedit   MMBasic Help
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 11:42pm 09 Jul 2020
Copy link to clipboard 
Print this post

@ Jim & Rob

thank you both for helping me.

Rob, I will try your suggestion as soon as I am awake (in Germany it is now 1:24 in the morning)

Jim, altering the PCB is no problem at all I ordered a few of them if anything bad happens :)

Your Suggestion for Test 1: I had the same idea - I will try it.

Test 2: "Leave the keyboard un-powered and only apply power a second or so after turning the CMM2 on.
This should be similar to plugging in after power up"."

Yes, I can tell that this is exactly the same as plugging it in after the Maximite
booted up. So, yes this will work.

What I don't get / or don't fits in my mind is, that there is practically no significant current draw by plugging the keyboard in. My first idea was kind of: "no problem, it is obvious, that the keyboard draws too much current, problem solved". It is not that easy...

But I will try especially Rob's idea with the delay and after this your "Test 1" idea.

I would like to choose the "DE" but the keyboard doesn't recognize my keystroke :D
Only by resetting the Waveshareboard the "initial setup" with keyboard layout , date and time  etc. is kind of "bypassed" and the keyboard works normaly. The reason why I am every time confronted with this "initial setup procedere" is, because the battery-coin-holder isn't yet arrived from china. But this shouln't be a problem, I think. The sd-card-holder isn't soldered, too (same reason). But I wanted to check the function so far and figured out that the keyboard does not work (only after pressing reset on the Waveshare board or re-plugging the kb)...

Now I should get some sleep and try your suggestions tomorrow.

@ Koryo

Does your keyboard work if you re-plug it? Or does it work by resetting the Waveshare by pressing the button? I tried how "deep" below 5V I can go with my bench top power supply to check ecactly when the keyboard cuts off. My keyboards work till 4.8Volts below that the Maximite works well but the keyboard is out of function! So my suggestion for you: check your voltage @ Waveshareboard label "5Vin" with respect to Ground. It must be above 5 Volts!

Greetings
Daniel
 
Koryo
Newbie

Joined: 05/07/2020
Location: United States
Posts: 6
Posted: 12:37am 10 Jul 2020
Copy link to clipboard 
Print this post

@Daniel

This implementation of the CMM2 has the processor directly soldered to the PCB and is surface mount throughout. I'm a novice with the CMM but it appears this configuration is different. Also, the external 5V socket is unpopulated. Plugged in, not plugged in, late plugged in... I have never had a keystroke register.

@Jim

I will try the PC terminal.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 12:51am 10 Jul 2020
Copy link to clipboard 
Print this post

Koryo,
How do you update the firmware.
Do you use a male-male USB cable attached to the keyboard port or using the serial port method.

If you can, try the male-male USB cable method as a means of testing the keyboard port connections.

Jim
VK7JH
MMedit   MMBasic Help
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 02:32am 10 Jul 2020
Copy link to clipboard 
Print this post

Hi Amnesie,


I had a thought and I see that Rob has posted it already, but before heating up the solder gun try this procedure as it will be similar.

Press AND HOLD the reset button and power up. Keep holding the reset for 1 or 2 seconds. Then let go of the reset.

I am wondering if the waveshare is trying to communicate with your keyboard before your keyboard is ready to talk so it misses the 2-way communication initialisation.

If the above procedure works then I would try what Rob suggested.

It is a pity you are on the other side of the world, I would offer to test it for you or at least test your keyboard on my CMM2 (mine is the Ver 1.5 which has the CPU and RAM on the main board and no plug in waveshare)


Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 02:39am 10 Jul 2020
Copy link to clipboard 
Print this post

Hi Koryo, All,

You just made me think when you said all your kb are backlit..

I have a backlit kb on my PC so I plugged it into my CMM2 and it is the first kb that WILL NOT work no matter whether I reset or re-plug the kb..

This is the first kb I have found that wont work with my CMM2..

I will now go and try to test all my keyboards out (I have about 10 around here)

Can you find a kb to try that is NOT back-lit?

Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 03:17am 10 Jul 2020
Copy link to clipboard 
Print this post

Most of my keyboard collection are PS2 only but the USB and USB/PS2 ones I do have all work.
I think Mick has confirmed Koryo's problem but that still leaves Amnesie.

Daniel,
Before attacking the motherboard, can you try loading an earlier version of the firmware.

This one should do:

CMM2V5.05.02.zip

It has different timing during boot and if my next 'thought bubble' is correct, it might work. It doesn't have the DE keyboard choice but that's not the issue I want to test.

Mick,
You could try it too, but I don't think it will help Koryo.
At least it will give you something to do while you are stuck at home.

Jim

If you are going to buy a new KB, the Logitech K270 wireless one works well and doesn't take up too much space on the desk.
VK7JH
MMedit   MMBasic Help
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 04:38am 10 Jul 2020
Copy link to clipboard 
Print this post

Hi Amnesie, Koryo, All,

I have tested all of my keyboards that I had on hand, here is my testing list.

   Working        
  HP sk2885          
  Cherry              
  Microsoft 600
  no-name slim white
  HP ku0316
  no name mini ds3000
  no name mini R260


Not Working
  No Name k670 backlit
  Dell sk815

So out of 9 keyboards 2 didn't work and 7 did.

Those that did work ALWAYS worked, irregardless of power up or Reset or unplug/re-plug keyboard.

Those that didn't work NEVER worked. Power up, reset unplug/re-plug I could not get them to respond.

All I can say is that if one keyboard doesn't work then try another..

Maybe if timings changed from one version to another that might be something Peter can address.

Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 07:11am 10 Jul 2020
Copy link to clipboard 
Print this post

This thread is getting hard to follow as to what is tried and what not BUT

The CMM2 is designed to work with a battery in place. If you don't have a battery then the VBAT link MUST be installed on the Waveshare. There isn't a link on the all-in-one motherboard so you MUST have a battery

This may not be the issue for Koryo or Amnesie but testing without a battery or link is not useful
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 10:11am 10 Jul 2020
Copy link to clipboard 
Print this post

Hi matherp

I have got no battery installed, BUT I used the jumper on the Waveshare board!
You are right that it is hard to follow what is tried and what not, as soon as I testet Rob, Johns and Jims suggestions I will update my very first post with a table.

@ Mick

sadly your idea doesn't work... tried many times (up to 10 seconds) to hold the reset-sw. on the waveshare but every time the same - kb not recognized. Only after re-plugging it.

But one final thought:

my cheap black asus keyboard (draws only 50mA) which worked every time with the firmware 5.05.03 (http://geoffg.net/maximite.html), doesn't work with the 05.05.04! This is not coincidence since I can reproduce it, by swichting between the firmwares... There is some reaction to possibly made changes.

But as I said, this post is only for an quick answer, as soon as I testet ALL you suggestions I will made a table with the actual state as matherp suggested.

Thank you all,
Daniel
Edited 2020-07-10 20:20 by Amnesie
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 11:21am 10 Jul 2020
Copy link to clipboard 
Print this post

Daniel

Please try this version. It fixes a specific bug I'd put in 5.05.04 which explains the difference to 5.05.03. In addition it changes the startup sequence somewhat.


CMM2V1.5.zip


Please test as follows:

Flash the firmware.
Remove the VBAT link and the battery
Power Off
Wait a few seconds or short GND to VCC
Power On

You should get the first time dialogue. If the SD light comes on it means the keyboard has enumerated - try and enter the keyboard type, time and date.

If that works install the battery or the link and press reset.

Check if it still works

With a battery installed power off and then back on

Check if it still works
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 01:24pm 10 Jul 2020
Copy link to clipboard 
Print this post

Good news!

You were right. There was a bug in the firmware. With your latest firmware from your post it works like on the firmware 5.05.03!

My cheap black Asus keyboard now (again) works all the time, no matter what I am doing.

BUT: all my other three Cherry Keyboards (with all support both PS/2 and USB) don't work all the time only after re-plugging OR resetting the waveshare.

Anyway, I am happy that the new firmware works and now at least one keyboard (sadly my cheapest) work without one single problem! Great!

Another question: Won't it be possible to support PS/2, too? Just a question :) I think it would be great... Maybe it goes hand in hand with a much more confusing set of problems?

I will update my initial post, so everyone don't have to reed though this whole topic.

Much thanks for the new firmware!

Daniel
Edited 2020-07-10 23:24 by Amnesie
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 01:49pm 10 Jul 2020
Copy link to clipboard 
Print this post

Damn it. In This forum it is not possible to edit the first or a post (much) later on...

Should I open a new topic? I don't know... if anyone has got the same problem he has to read through the whole topic. But I will sum up in this post what I've done and what works.

Let's go:

Problem:now three keyboards only work after re-plugging them or by pushing the "reset-button" right on the Waveshare board.


Is the problem reproducible? Yes, perfectly.

What keyboards I tried?

- Cherry G84-4100 (four of them!) -- Work after reset/replug (support PS/2 & USB)
- Cherry G80-MX1800               -- Work after reset/replug (support PS/2 & USB)
- No Name                         -- don't work at all       (support PS/2 & USB)
- Asus PR1101U                    -- Works all the time!   (only support USB)

Might there some problem with connection / cable?
Absolutely no way! I even tried different kinds of power supplys and cables, also
soldered a thick cables to the board itself. Cleaned the whole board with 99,9% alcohol.
If it would be some bad connection, the whole failure would no be perfectly reproducible.

Could there be too much current draw and therefore a voltage drop which cuts out the USB? This was my first idea, because it seems obvious. But no! I meassured it many time with my amperemeter / multimeter and built in meter in two
different powersupplys.

Has it anything to do with the MC2221 IC? Definitly not, I even unplugged the IC for testing. I even powered the board directly with soldered cables to the usb-type-b connector - no laptop or computer acting as PSU involved.

Does the serial connection work? Yes, without any problems!

Whats about the print mm.info$(keyboard) ? Every time the keyboard works it says "connected", if it not works, it says "not connected".


What is about the different "delay" circuits Jim, John and Rob suggested?
Don't work either. Even Micks suggestion, to hold the reset-button does not
solve the problem.


What is your Vcc ? I tried everything (with the bench top power supply) from 4,8Volts to 5,2 Volts and noticed my keyboards mostly cutting off @ 4,8Volts. Which could be interesting if there _would_ be any voltage drop caused by much current draw - but there istn't any problem!  

What happens if you power up the keyboard before booting up
the maximite?

I tried this with a special circuit on breadboard and a few connectors! Don't work
either. My setup is as follows: I am powering the keyboard through my bench top powersupply the datalines (d+ & d-) are fixed / soldered to the usb HOST on the maximite, now I manually powering the maximite via it's 5Vin Pin, so the keyboard had its time to "boot up". But this solves not the problem. I have to completly re-plug the keyboard, then it works. See Image! And yes, this tiny cables are perfectly sufficiant for this current. Before this test configuration I soldered thick wires onto the board! (I should mention to, that of course the whole circuit shares the same GND! So keyboard and maximite is all the same "power-line").




Greetings
Daniel
Edited 2020-07-11 00:30 by Amnesie
 
Poppy

Guru

Joined: 25/07/2019
Location: Germany
Posts: 486
Posted: 02:50pm 10 Jul 2020
Copy link to clipboard 
Print this post

  Amnesie said  

Has it anything to do with the MC2221 IC? Definitly not, I even unplugged the IC for testing. I even powered the board directly with soldered cables to the usb-type-b connector - no laptop or computer acting as PSU involved.



I still don´t get this point.

Without the IC the keyboard might be powered up but won´t work at all, will it?

The whole issue sounds like a timing problem to me, firing up the MC must recognize the IC inside the keyboard and probably the one is faster than the other to get connected.

Any clue about this or was it already considered?

Those long issues are hard to follow up precisely.

Parallelly including a PS/2 access is a great idea.
Andre ... such a GURU?
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 03:05pm 10 Jul 2020
Copy link to clipboard 
Print this post

  Poppy said  
  Amnesie said  

Has it anything to do with the MC2221 IC? Definitly not, I even unplugged the IC for testing. I even powered the board directly with soldered cables to the usb-type-b connector - no laptop or computer acting as PSU involved.



I still don´t get this point.

Without the IC the keyboard might be powered up but won´t work at all, will it?

The whole issue sounds like a timing problem to me, firing up the MC must recognize the IC inside the keyboard and probably the one is faster than the other to get connected.

Any clue about this or was it already considered?

Those long issues are hard to follow up precisely.

Parallelly including a PS/2 access is a great idea.



Hi Andre!

No no no! The IC MC2221 has nothing to do with the keyboard! This IC manages only the serial communication. Previous posts suggested, that this IC only may be the reason for a higher demand of current and therefore causes a voltage drop which is cutting of the usb-keyboard.But again, this applies only if I would power the maximite via laptop or computer, which I don't. I only used this USB-B-type connector as "power outlet for my bench top power supply. If you take a look at the schematic, things will be much clearer. But again this IC is not necessary to operate the Maximite (unless you want to use the serial communication). The HOST-Keybaord connector is not connected to the usb-type-b connector or the MC2221 chip! Maybe this leads to your confusion? You can simply pull this IC out :)

And yes, good old PS/2 function would be great!But I think it would go hand in hand with other problems - but I really don't know... It should be selectable what protocoll we want to use. As first reading that the new CMM2 only supports USB, I was a bit dissapointed - but I understand the reason for that, many people maybe don't have PS/2... In my personal case I have only PS/2 or at least keyboards that support both. Never had problems with the old Maximite and PS/2 ... but with the USB thing... yeah... you see not every keybord works with it. That is not good....
Edited 2020-07-11 01:16 by Amnesie
 
Koryo
Newbie

Joined: 05/07/2020
Location: United States
Posts: 6
Posted: 03:30pm 10 Jul 2020
Copy link to clipboard 
Print this post

@Jim

It came with the firmware already flashed, date set, and I assume keyboard region.
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 03:45pm 10 Jul 2020
Copy link to clipboard 
Print this post

@ Koryo

what Firmware does run on your maximite? You can see it below the Maximite Logo when powering on.

Matherp fixed an important bug in the firmware, most of my keyboards work, with the exception that some of them _must_ be re-plugged after power up.

Have you tried different keyboards? It would be important to meassure your supply voltage. Must be at least 5V!

Also try to connect via Serial (TeraTerm, Arduino IDE, PUTTY etc) and type:

"print mm.info$(keyboard)"

what happens? Together we will solve this problem :)

Greetings!
Daniel
 
Koryo
Newbie

Joined: 05/07/2020
Location: United States
Posts: 6
Posted: 05:16pm 10 Jul 2020
Copy link to clipboard 
Print this post

@Daniel

5.05.03
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 05:32pm 10 Jul 2020
Copy link to clipboard 
Print this post

@ Koryo

this version works with my keyboards when I re-plug them, as well as the new uploaded firmware (see matherp's post above ^ he fixed a bug, now the new firmware works again like your version)

but you have still to answer the other questions... Otherwise it is hard to help...

Greetings
Daniel
 
     Page 3 of 4    
Print this page
© JAQ Software 2024