Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:28 02 Aug 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 : weird loss of program issue

     Page 4 of 8    
Author Message
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 04:43am 01 Sep 2015
Copy link to clipboard 
Print this post

Thank you two fingers, I will give this a whirl when i get home from work. I will also try the cap and resistor. I already have a 10k from mcld to vcc, can I use a .1uf for the cap or would it be a 10uf?Edited by viscomjim 2015-09-02
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 04:54am 01 Sep 2015
Copy link to clipboard 
Print this post

10uf to give c100msec delay
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 09:23am 01 Sep 2015
Copy link to clipboard 
Print this post

It seems sure that what has been postulated is the failure mechanism. One way to easily be certain is change the console baud rate from the default of 38,400 to some higher value then cause the problem. If it is the cause of the failure then the baud rate will be set back to 38,400. The screen will show junk. If this is not feasible then changing some of the other defaults and testing for them will show it.
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:03am 01 Sep 2015
Copy link to clipboard 
Print this post

GREAT NEWS!!!!!!! I think....

So with 4.7 loaded, I loaded my program, disconnect and reconnected power using the barrel connector and the program was gone in about 7 tries.

Loaded 4.5E, made some changes like end if to endif and a few math operations that used shift left, etc and what do you know, I can abuse the s$#@ out of the power connector and the program does NOT fail at all!!! I mean, I made the connection so badly, so many time and yet the program lives. I am SO HAPPY!!!!!!!
And trust me, I really tried to make it fail.

I did this test 4 times in a row, reloading the firmware, making it fail, reloading old firmware, can't make it fail.

So now what, is the big question... can we get 4.7 to behave the same way?
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 11:15am 01 Sep 2015
Copy link to clipboard 
Print this post

Congratulation!

That's what I expected! I think we now can say it is a software issue.
Maybe Geoff can fix it!?

EDIT:
  Quote  Loaded 4.5E, made some changes ...

4.5D? Edited by twofingers 2015-09-02
causality ≠ correlation ≠ coincidence
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:27am 01 Sep 2015
Copy link to clipboard 
Print this post

when i start up it says 4.5E
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 11:31am 01 Sep 2015
Copy link to clipboard 
Print this post

  viscomjim said   when i start up it says 4.5E


Cool! Even better! Good to know!

Edit:
And you are sure to use the hex-file from Micromite V4.5D.zip?Edited by twofingers 2015-09-02
causality ≠ correlation ≠ coincidence
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:43am 01 Sep 2015
Copy link to clipboard 
Print this post

I used the firmware on the bottom of THIS page. almost all the way at the bottom. "Original Micromite Firmware 4.5E for the PIC32MX150F128 chip" but I am running it on a 170.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 11:59am 01 Sep 2015
Copy link to clipboard 
Print this post

  viscomjim said   I used the firmware on the bottom of THIS page. almost all the way at the bottom. "Original Micromite Firmware 4.5E for the PIC32MX150F128 chip" but I am running it on a 170.

And it works? Amazing!
causality ≠ correlation ≠ coincidence
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 12:01pm 01 Sep 2015
Copy link to clipboard 
Print this post

I am just as amazed!!!! Just tried some more ways to make it fall over, and it won't. This just saved my hide (200 boards made)!!!! I hope we can get 4.7 to work this way.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 12:15pm 01 Sep 2015
Copy link to clipboard 
Print this post

As it is a software problem, i think Geoff will not be that happy.
But then again finding a bug and know where it hides makes it easier to solve.
As long as there is some code that writes to the flash at startup the risk exists.

Microblocks. Build with logic.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 12:16pm 01 Sep 2015
Copy link to clipboard 
Print this post

I'd most likely expect some problems with MX150 firmware on an MX170!
Be careful!

How much memory is displayed?
Maybe the 4.5D for MX170 is the better solution.
causality ≠ correlation ≠ coincidence
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 12:19pm 01 Sep 2015
Copy link to clipboard 
Print this post

I am hoping that Geoff will be happy that a potential problem was found during a beta version. This could have been a really big problem for a lot of users. Keeping fingers crossed that 4.7 can be fixed to work like 4.5E.
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 12:19pm 01 Sep 2015
Copy link to clipboard 
Print this post

In the short time I have been a member of the forum this is the best thread I have taken part in. It was like playing a game of CLUE and racing against the clock.

Jim can get his product out and we all learnt something along the way. In my case a lot :)

The use of Supervisor chips (I now have some on order), fault-finding techniques, coding tips, the list goes on but the most important lesson was what a resourceful, helpful and unselfish bunch of people we have in this community that spans country's and time zones around the globe.

I joined for the Micromite information, I stay now for the spirit of comradery that this thread has shown.

And Jim, I am glad you have a solution, even if it is just a workaround for now, to get your product out.

Cheers
Chris

http://caroper.blogspot.com/
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 12:27pm 01 Sep 2015
Copy link to clipboard 
Print this post

@Chris Roper, you couldn't be more correct. This forum rocks!

@twofingers

My project uses I2C and from the change log for 4.5D to 4.5E it says...

"Change log for Micromite MMBasic Ver 4.5E"
"• Fixed an issue with the I2C slave receive buffer not being cleared when the I2C slave was restarted after previous activity."
"See: http://www.thebackshed.com/forum/forum_posts.asp?TID=6599&PN=1"
"and http://www.thebackshed.com/forum/forum_posts.asp?TID=6527&PN=1&TPN=2 Note that CTRL-C does not close a communications channel because CONTINUE might be used to resume running the program. When RUN or NEW is used all communications and I2C activity will be stopped."
"• Before starting I2C communications the I2C OPEN command will first check for a stuck slave and will try to clear it by pulsing the clock line."
"• Fixed a bug in the KEYPAD command which prevented the editor from being run after the KEYPAD command reported an invalid pin error."
"• Fixed a bug which caused the PWM command to not correctly configure the relevant PWM pins as outputs."
"• Fixed a bug in the PIN() function which caused an invalid value to be returned when reading from a digital input pin. This bug was triggered by reading an analogue voltage from another I/O pin."
"Change log for Micromite"

So I need the I2C to work correctly.

I am doing some more testing and will report back. Right now I need plastic surgery to remove the smile from my face. My wife thinks I've been drinking...
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 12:30pm 01 Sep 2015
Copy link to clipboard 
Print this post

@twofingers...

Micromite MMBasic Ver 4.5E
Copyright 2011-2015 Geoff Graham

> MEMORY
Flash:
19K (93% of 20K) Program (723 lines)
0b ( 0% of 1536b) 0 Saved Variables

RAM:
20K (87%) 58 Variables
1K ( 3%) General
1K (10%) Free
>

on the 170
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 12:35pm 01 Sep 2015
Copy link to clipboard 
Print this post

  viscomjim said   @Chris Roper, you couldn't be more correct. This forum rocks


I agree!


  viscomjim said   I am doing some more testing and will report back. Right now I need plastic surgery to remove the smile from my face. My wife thinks I've been drinking...



I'm going to bed now!
causality ≠ correlation ≠ coincidence
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 04:11pm 01 Sep 2015
Copy link to clipboard 
Print this post

A great result gents and as Chris said, congratulations to all of you who were involved in this - I've been following, but it's been a bit out of my league. I'm sure Geoff will be pleased too, even though it means more work for him.

Greg
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 04:45pm 01 Sep 2015
Copy link to clipboard 
Print this post

Excellent news, and an extremely interesting thread. I was reading to see if you guys could come up with a fix for the issue, WITHOUT using the suggested supervisory chip(although, I still think they are cheap insurance, personally).

It is always useful to have more then one method of attack.
Smoke makes things work. When the smoke gets out, it stops!
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 02:10am 02 Sep 2015
Copy link to clipboard 
Print this post

Well, after quite a bit of trying to make this thing fail, I must say that I am very impressed with the stability. I am literally just touching power and removing it very rapidly (the startup banner doesn't even have a chance to finish sometimes) and this will just NOT FAIL. It starts up properly every single time without a loss of program. I didn't even change any caps or add a por or supervisory circuit. IT JUST WORKS! Very impressed!
 
     Page 4 of 8    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025