Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:40 02 Jul 2025 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: Bug reports

     Page 13 of 17    
Author Message
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 08:49am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  What you need to do is remove the resistor, disconnect everything, and measure the resistance between pin 40 and GND. It should be completely open circuit.

Test successfully completed with new b1q version and resistor removed.  All good, as with resistor. Just noting my comment above re. the Busy LED.

With everything disconnected Pin 40 to GND measures ~30M / ~370K depending on test lead polarity.  However note that I get the same readings measuring Pin 40 to 3.3V.
ie. I believe Pin 40 appears to be floating?

  matherp said  Stupid question but you don't have a bare board sitting on a bench with any conductivity - e.g. antistatic surface

Certainly not a silly question, especially if we have floating inputs?

No, the board is certainly not sittng on anything with conductivity! Although it's been raining heavily today so the air is pretty moist, even with the dehumidifier going.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 08:58am 18 Jun 2020
Copy link to clipboard 
Print this post

  Quote  With everything disconnected Pin 40 to GND measures ~30M / ~370K depending on test lead polarity.  However note that I get the same readings measuring Pin 40 to 3.3V.


Your readings could be a meter issue but with a Fluke 87 I get zero in both directions.

One more test. In the attached I've re-instituted the pin 40 test but I've added a 250mSec delay before it to give the internal pullup time to overcome any capacitance/ bleed resistance on the pin.

Please try this without a resistor and see if the fault returns


CMM2V5.05.03b1q.zip
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 08:59am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  GregZone

Please could you do another test.

With the CMM2 running normally

SETPIN 40,DIN,PULLUP
? PIN(40)

Then you may wish to repeat on all the other valid pins

Here ya go...
> ? PIN(40)
Error: Pin is not an input

> SETPIN 40,DIN,PULLUP
> ? PIN(40)                                                                      
1
>

Can you explain the purpose of this test?  The PIN appears to be returned to "not an input" upon a reset.
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 09:01am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  Your readings could be a meter issue but with a Fluke 87 I get zero in both directions.

My readings were with my trusty Fluke 179.  Which I totally trust! :)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 09:02am 18 Jun 2020
Copy link to clipboard 
Print this post

  Quote  Can you explain the purpose of this test?


That is what the firmware does to check for reset, it then does a SETPIN 40,OFF

Our posts crossed, please see my previous post. Thanks for your efforts.

The fact you are seeing some resistance suggests to me that there is some contamination of the PCB which is probably the route cause of the issue
Edited 2020-06-18 19:04 by matherp
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 09:12am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  One more test. In the attached I've re-instituted the pin 40 test but I've added a 250mSec delay before it to give the internal pullup time to overcome any capacitance/ bleed resistance on the pin.

The issue returns with this firmware version. ie. That's a test fail.

  matherp said  The fact you are seeing some resistance suggests to me that there is some contamination of the PCB which is probably the route cause of the issue

Well, I could throw my board into my Ultrasonic PCB cleaner, but I think this is not really the answer.  

Especially noting that CircuitGizmos is reporting the exact same issue with his new JLC assembled PCB's.

So does this mean that for your pin 40 function, a PCB revision is necessary to add an external Pin 40 pull-up resistor?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 09:24am 18 Jun 2020
Copy link to clipboard 
Print this post

  Quote  So does this mean that for your pin 40 function, a PCB revision is necessary to add an external Pin 40 pull-up resistor?


It hasn't been necessary for

8 machines I've built
A number of machines Grogster has built
A number of machines WW has built
6 machines distributed to the original development group
Machines hand crafted by KeepIs and SWA-Guy

There is an issue with CGs versions that needs understanding and fixing otherwise other issues such as the possible impairment of SDcard operation may be there and impacting users
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 09:43am 18 Jun 2020
Copy link to clipboard 
Print this post

GregZone

One last try please without resistor


CMM2V5.05.03b1q.zip

let me know what happens. Thanks
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 09:49am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  So does this mean that for your pin 40 function, a PCB revision is necessary to add an external Pin 40 pull-up resistor?


It hasn't been necessary for

8 machines I've built
A number of machines Grogster has built
A number of machines WW has built
6 machines distributed to the original development group
Machines hand crafted by KeepIs and SWA-Guy

There is an issue with CGs versions that needs understanding and fixing otherwise other issues such as the possible impairment of SDcard operation may be there and impacting users

Agree. CircuitGizmos does appear to be the common factor with this issue.

However, understanding that you are setting the pin as an input with internal pull-up, and then testing for it being pulled low, then this seems perfectly reasonable...

So... silly question... Are you 100% sure your test code change did correctly implement a 250ms delay before reading the input value?  Just checking, as a 250ms delay would seem quite reasonable to allow the pin to stabilise, and clearly the internal pull-up is effective.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6266
Posted: 09:54am 18 Jun 2020
Copy link to clipboard 
Print this post

I have been running with a relatively long 40 way cable and a breadboard attached with no problems with random rests which is why I didn't think to consider it as a possibility.

It was only when I deliberately forced a reset while monitoring the backup ram that I experienced exactly your fault.

The rest was easy.

I agree with Peter that finding the route cause of the problem is important for continued reliability.

Prevention is always better than cure.

Jim

GregZone, can you measure the resistance to ground with the Waveshare module removed.
Edited 2020-06-18 19:56 by TassyJim
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 09:59am 18 Jun 2020
Copy link to clipboard 
Print this post

  Quote  So... silly question... Are you 100% sure your test code change did correctly implement a 250ms delay before reading the input value?  Just checking, as a 250ms delay would seem quite reasonable to allow the pin to stabilise, and clearly the internal pull-up is effective.


In the latest version I check the pin 3 times at 100mSec intervals and only if all three read low do I reset
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1864
Posted: 10:15am 18 Jun 2020
Copy link to clipboard 
Print this post

Just for reference to something mentioned by Peter:

  Quote  other issues such as the possible impairment of SDcard operation may be there and impacting users


Full size SD Card reader on flying leads, 8, 16, 32 and 64 GB Micro SanDisk (via adaptor) all perfect, and I've been hammering the SD, cheap Jaycar adaptor with resistors for Level shift and all, this one would not work on the ARM-H7 CMM2 loves it.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 10:26am 18 Jun 2020
Copy link to clipboard 
Print this post

  TassyJim said  GregZone, can you measure the resistance to ground with the Waveshare module removed.

As you suspected, my resistance measurements were with the Waveshare in place. The high resistance values I measured would have been due to the SoC connected pin.
However, the values measured would not have impacted the correct pull-up with the internal pull-up resistance (as shown by the PIN(40) tests).
Given the potential for impairment of the 80pin header sockets, I'm reluctant to remove the Waveshare board again simply to verify a higher restnace value / open circuit.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 10:30am 18 Jun 2020
Copy link to clipboard 
Print this post

Have you tried the software I posted at 9:43?
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 10:36am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  In the latest version I check the pin 3 times at 100mSec intervals and only if all three read low do I reset

YES!  We have success.  Nice work.

So, I think this just leaves:

1. After reset the Red LED remains constantly ON, until the SD Card is first accessed (eg. a LS command). Then it reverts to correctly lit only during access.

2. Throughout I have still seen occasional unexpected key repeats.
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 10:37am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  Have you tried the software I posted at 9:43?

We just cross-posted (see prior post). Sorry for the delay, it's getting quite late here so I'm about to sign-off for the night.

Thanks for your excellant work on this issue!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 10:40am 18 Jun 2020
Copy link to clipboard 
Print this post

  Quote  1. After reset the Red LED remains constantly ON, until the SD Card is first accessed (eg. a LS command). Then it reverts to correctly lit only during access.


This is correct, it indicates a USB keyboard has been enumerated. Try without the keyboard and then plug it in. See the user manual page 11

  Quote  2. Throughout I have still seen occasional unexpected key repeats.

This suggests the keyboard isn't playing nicely and the S/W is missing the key up events. Have you tried different keyboards?

  Quote  YES!  We have success.  Nice work.


Not so fast - I've just coded round an underlying H/W problem - not a good solution
Edited 2020-06-18 20:45 by matherp
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 11:00am 18 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  Not so fast - I've just coded round an underlying H/W problem - not a good solution

I'd suggest that slow settling time of the applied internal pull-ups is more likely related to PCB trace capacitance / inductance.

I've left my workroom for the night, so I haven't inspected the PCB routing associated with pin 40, but is it possible that this is a longer trace perhaps running alongside a ground trace or copper fill?
(Just thinking out loud with some end of day tired thoughts).

ps. Hopefully CircuitGizmos can replicate the last test successfully with his boards as well.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4300
Posted: 11:54am 18 Jun 2020
Copy link to clipboard 
Print this post

Hi Peter,

Just updated to 5.05.03b1q and I am now seeing the issue where an edit made to a .bas file is being ignored when the file is being Run.

I can't reproduce this with a simple example, nor with Z-MIM R1, but it is happening consistently with my Z-MIM development version.

Do you want to take a look? How do you want the files?

Regards,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10181
Posted: 01:27pm 18 Jun 2020
Copy link to clipboard 
Print this post

  Quote  Do you want to take a look?


Certainly need to get to the bottom of it.

Please try the following test version and let me know if the issue still occurs


CMM2V5.05.03b1r.zip
 
     Page 13 of 17    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025