Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:19 01 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 : AUTORUN

Author Message
romba6

Newbie

Joined: 04/07/2020
Location: United Kingdom
Posts: 37
Posted: 07:59pm 31 Oct 2020
Copy link to clipboard 
Print this post

I have a small program autorun.bas (below) to clear my I2C units.
I have OPTION AUTORUN ON

print "Reset I2C bus"
i2c open 100,1000
i2c write &h20,0,1,255
i2c write &h21,0,1,255
i2c close
print "Finished"

When I power up or hit RESET button, the response is :-

Reset I2C bus
Finished
print "Finished"'|7

If I just run the program on its own it's fine.
Where does the last line come from? What am I doing wrong?

Version = CMM2V5.05.05RC9.bin
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 02:09am 01 Nov 2020
Copy link to clipboard 
Print this post

Hi romba6,

as s first step I would update to the latest firmware update.
RC9 means "Release Candidate 9" the release version is CMM2V5.05.05.
I would this version test: https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=12998&LastEntry=Y#158101#158101.

For me - on the first glance - it looks like a minor old bug.
Without your I2C device I can't fully test your code.

Michael
causality ≠ correlation ≠ coincidence
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:40am 01 Nov 2020
Copy link to clipboard 
Print this post

I don't think it should be needed but it is a good idea to end your program with END

  Quote  PRINT "Finished"
END


It fixed the problem for me.

Jim
Edited 2020-11-01 12:40 by TassyJim
VK7JH
MMedit
 
romba6

Newbie

Joined: 04/07/2020
Location: United Kingdom
Posts: 37
Posted: 10:06am 01 Nov 2020
Copy link to clipboard 
Print this post

  TassyJim said  I don't think it should be needed but it is a good idea to end your program with END

It fixed the problem for me.

Jim


Thank you Jim - it fixed the problem for me too !!!
What threw me was the fact that the program works perfectly when run on its own but not in AUTORUN
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025