Go Down

Topic: Stopwatch with Pause/Lap  6 digit 7 seg LED. HELP! (Read 126393 times) previous topic - next topic

David_Rudla

Oups, I see, that I am so slowly.  ;D
I will try new code from you Robert

Warren Reeve

The snow you get is crazy!! This country comes to a halt with 2 inches.. haha. Best of luck with it Robert and keep safe!  :)

The digits are [size=16]BIG[/size].. but I'd rather they were big than maybe not big enough!? The thing is, they need to be read at fast speeds so I am hoping the size is perfect.

Quote
Warren - the Led's are amazings. Where are you buy it?

Hi David, I got them from http://proto-pic.co.uk/products/7%252dSegment-Red-6.5%22-Display.html in the UK.
They originally come from Sparkfun here: http://www.sparkfun.com/products/8530
For what you get, they are very cheap and surprisingly good quality, I was really pleased.  :)

Robert, I tried your download link again but got a blank page again.
I was just wondering if you still had the old sketch from when it paused perfectly.. so you could compare as to why it's now not working. If you need it I keep copies of all the stages we have been going through.
Warren

Warren Reeve

Just realised that the code is also in this forum ::)..


CrossRoads

Warren,
I put it up now as
http://www.crossroadsfencing.com/stopwatch_22Jan.zip
You should be able to download, unzip, and have a complete set of files now.

David,
I think the new skeleton agress with I ended up with. I just didn't write it as functions.
The main thing we started with was accurate 0.01 second intervals, the button pushes were incidental to that.
If you take the stuff in tabs and copy them all end to end, it looks like what you have.

I found as the programs get bigger, it just gets harder & harder to keep track of what is going on with all the scrolling up & down.

I wonder if the new forum, which we get moved to tomorrow, will allow for bigger code listings?
Seems to me thats its the comments which drive up the message size (limit of 9500 characters), yet without them code is pretty difficult to follow.

Robert
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Warren,
I don't think display speed will be a problem.  Electricity moves fast! And you are only switching 20mA. If you read the datasheet, time is not mentioned anywhere. The 100's will be a blur, you may be able to make out the tenth' as they change at 10 times a second.

What have you ended up with for a power source?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Warren Reeve

Quote
I don't think display speed will be a problem.  Electricity moves fast! And you are only switching 20mA. If you read the datasheet, time is not mentioned anywhere. The 100's will be a blur, you may be able to make out the tenth' as they change at 10 times a second.

Display speed wont be a problem.. when I said "they need to be read at fast speeds" I was referring to the digit size as they will be in pause mode when being read by the rider/driver.

Quote
What have you ended up with for a power source?
I haven't sourced one yet.. I am going to use a power drill battery like you suggested before until I can find a good one. I want something slim so I can place it in the middle of the unit and try to keep everything balanced.  :)
I am going to download your zip now and report back shortly.  :)

Warren Reeve

That link isn't working..?? Taking me to "Page Not Found"??? :-/

David_Rudla

#158
Jan 23, 2011, 07:29 pm Last Edit: Jan 23, 2011, 07:33 pm by David_Rudla Reason: 1
Hello Warren, please use right mouse button and click on Save target as... The file is all right.

Robert, thank you for your support. Idea is clear at this time. I am ready go up with accuracy - I need 0,001 in my aplication.


Repair: after downloading windows spoke to me that archive is either in unknow format or damage, I use for it WinRar, which have not problem with Zip. Robert which program you are used for it? All package has 1 252 bytes.

CrossRoads

David,
http://www.crossroadsfencing.com/stopwatch_22Jan/stopwatch_22Jan.zip

With windows vista, going to this link prompts me to open/save the file. What happens for you?

David,
Should be doable - I use 100uS for my time check intervals:

unsigned long currentMicros = 0;  // start of loop interval timer
unsigned long previousMicros = 0; // end of interval?
unsigned long hundred_uS_interval = 100; // = 0.1mS, use 1000 for 1mS
:
:
 // ********************************************************************************
 // start timing interval
 // ********************************************************************************

 currentMicros = micros();  // sample the time
 if (currentMicros - previousMicros >= hundred_uS_interval) // more than our interval?
 {
   // save the last time we okayed time updates
   previousMicros = currentMicros; // save the current time for next comparison
   toggle = 1-toggle;  // -> 1-1, 1-0, 1-1, 1-0, results in 0 1 0 1 ...

   // do stuff on 0.1mS intervals, 1mS intervals, ets.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

I zipped it with this http://www.7-zip.org/

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Warren Reeve

Hi Robert, I got it with this link;
http://www.crossroadsfencing.com/stopwatch_22Jan/stopwatch_22Jan.zip
but not this one;
http://www.crossroadsfencing.com/stopwatch_22Jan.zip

Quote
Repair: after downloading windows spoke to me that archive is either in unknow format or damage

I have downloaded and extracted the files fine this time using the new link address from Robert.

I will run it now and let you know how it works.
Warren

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

David_Rudla

Thank you Robert. I is running. So I will a little bit change code - output to LCD display and outputs to 485 net. I suppose, that I will not have problem. I suppose, that I will have also next parts for improovements - RTC, temperature.... So thanks again.

Warren Reeve

Robert... have I ever told you..
[glow][size=20]Your A STAR!!![/size][/glow] [smiley=dankk2.gif]
That is working fantastically!!!! brilliant!
As you can imagine, I am over the moon!

The recall of the memory is working great. I will now have to add another button for 'memory_down' and then write something that will clear the memory when both buttons are pressed together.

Go Up