Olympic Timer


Closed Thread
Results 1 to 40 of 48

Thread: Olympic Timer

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358

    Default Olympic Timer

    It's almost Olympics time... so here's a topical program using PBP exclusively (no embedded Assembler) to give you a Stop-Watch with 1/100th Second Timing (yes that's 0.01 of a Second) and gives you REAL-TIME display on your LCD. Now you can do your own timing and challenge the official time...

    The program demonstrates using TMR1 in BACKGROUND (multi-tasking), uses PICBasic Interrupts, and accounts for the fact that PICBasic doesn't respond to those Interrupts immediately. There's also a set-Up CALIBRATION menu item, so you can adjust and calibrate your timer to an accuracy of 360mS per Hour.

    How does it do all that? Better download the PDF and find out...

    Melanie

    PS. Questions and Comments post on this forum/thread. No off-list mail please.
    Attached Images Attached Images

  2. #2
    frederick's Avatar
    frederick Guest


    Did you find this post helpful? Yes | No

    Default

    Could you use a 2x16 lcd with backlight or even a 1x16 with a backlight

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Sure you can.

    The 16F876 which this was originally written for has two PWM ports. One can be used to give you software Contrast adjustment, and the other can be used to give you software Backlight adjustment. Whilst you can get away using just two Resistors for the Contrast, the Backlight will need a Driver (in it's simplest form a Transistor or MOSFET along with a couple of Resistors) as the PIC cannot directly sink the current needed for most Backlights.

    You can then add the Contrast and Backlight Menu Set-Up's into the built-in Menu structure of the Olympic Timer.

    If you have any problems integrating those features, let me know and I'll post the code and hardware circuits.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Hey, anyone else going to Athens Olympics opening night party? See you there...

  5. #5
    frederick's Avatar
    frederick Guest


    Did you find this post helpful? Yes | No

    Default opto-isolators

    What would work. I was looking into a photo resistor.

    This what I am going to use your design. I complete in Olympic style weightlfting. I want to measure the time it take to reach the top of my pull (desired hight) and when I reach the top of the pull the timer will stop and also give me audio alarm.

    The unit will start/stop the timer by the bar breaking a beam.
    This is will be use for a training aid.

    Any help would be appreciated.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Do you start timing the instant the weights are lifted off the ground, or after the lift has reached a certain height?

    How do you plan to account for the fact that one weightlifter stands 1m50, and his buddy stands 1m90, and a third guy is waving the weights around over his head like a tree in a Florida hurricane?

  7. #7
    frederick's Avatar
    frederick Guest


    Did you find this post helpful? Yes | No

    Default

    The timer would start as soon as you lift the bar off the ground and stop at a certain height.

  8. #8
    frederick's Avatar
    frederick Guest


    Did you find this post helpful? Yes | No

    Default what LCD Controller did you use

    I am looking for an 1x16 LCD and If you can recomend a brand.

  9. #9
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I use PowerTip big-time... consuming thousands of pieces a month. Never any problems interfacing to PICs or using with PBP. PC1602F (which is actually a 16 x 2) is very price competitive and perhaps the one to consider.

    When I was in China a few weeks ago, I visited Tri-T, who claim to offer a direct compatible unit to PowerTip (TMBC16265SP) but with Backlight at the same price as PowerTips standard reflective unit. The sample I walked away with was excellent. The first batch of 200 is clearing customs at the moment and I'll let you know if they're all as good as that original sample by the end of the week.

    Moving back to the weights...

    I see no problem detecting the weights being lifted, as you can have a photosensor on the floor with the weights covering it. At the lift end, I'd use a IR emitter/detector (of the sort found in TV remotes). Modulate it at it's working frequency (usually around 38kHz) and detect that. It should make it pretty much immune to extraneous light, flash-photography etc.

    You may want to change the Olympic Timer software so that you can only START the clock ONCE following a RESET. As it stands, once it's stopped, you can start again and continue timing from where you left-off.

  10. #10
    Join Date
    Jul 2005
    Location
    The Netherlands
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    Hi,

    For daylight applications, and battery applications I use Winstar (WH1602), the PLED for low current (5V/20mA) and very high bright.

    If you need more info, please let me know,

    Best regards,
    Gerben

  11. #11
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I said I'd report back on the LCD business...

    Tri-T model TMBC16265SP-03 'Cool Blue' (full Part Number TMBC16265SP-SN-LED05-W) has to be one of the sexiest 2 x 16 displays around. Fully PBP compatible, excellent contrast ratio, and super bright white LED for backlighting which requires minimal current consumption...

    Just ordered 5000 pcs (eta 6-weeks)... if anyone is interested, I will get some put aside to offer people on this list with a price tag of US$15.00 which includes shipping worldwide.

    Melanie
    Attached Images Attached Images  

  12. #12
    jessey's Avatar
    jessey Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    I said I'd report back on the LCD business...

    Tri-T model TMBC16265SP-03 'Cool Blue' (full Part Number TMBC16265SP-SN-LED05-W) has to be one of the sexiest 2 x 16 displays around. Fully PBP compatible, excellent contrast ratio, and super bright white LED for backlighting which requires minimal current consumption...

    Just ordered 5000 pcs (eta 6-weeks)... if anyone is interested, I will get some put aside to offer people on this list with a price tag of US$15.00 which includes shipping worldwide.

    Melanie
    Hi Melanie,

    Do you have any of those Lcd's left? I realize it's been over a year since you posted the offer but I thought I'd ask anyway as they look pretty cool and seem like such a good deal.

    Thanks
    jessey

  13. #13
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Jessey, as you live in Canada, may i suggest you
    www.crystalfontz.com
    www.norgay.com

    Both offer great prices even on low quantity
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  14. #14
    jessey's Avatar
    jessey Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    Jessey, as you live in Canada, may i suggest you
    www.crystalfontz.com
    www.norgay.com

    Both offer great prices even on low quantity
    Hi Steve,

    I'll be sure to check them out.

    Thanks
    jessey

  15. #15
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Yes we still use those 'Cool Blue' LCD's - several thousand a month....

  16. #16
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Melanie,

    Whats the current drain on these puppies?

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  17. #17
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I assume you mean the Backlight Current since the LCD module itself is less than 1mA... I run them between about 5mA (what I consider the minimum acceptable Backlight level) and 40mA (what I consider seriously bright). The example jpeg I posted is running at 22mA.

    There is a spin-off here if you're clever... that super-white LED throws out a considerable amount of collateral light at the right-hand edge of the LCD module. I tend to put my control push-buttons at that right-hand edge. If you specify the correct material for your panel overlay and get your artwork right, you end up backlighting your control buttons for free. See appended jpeg...
    Attached Images Attached Images  

  18. #18
    DelBoy's Avatar
    DelBoy Guest


    Did you find this post helpful? Yes | No

    Smile Blue LCD's

    Do you have any of these Blue LCD's, but in 20X2.....

  19. #19
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Only just returned from China today... sorry for my delay in replying.

    No, only 16 x 2 at this time.

    Melanie

  20. #20
    badrad's Avatar
    badrad Guest


    Did you find this post helpful? Yes | No

    Default Have you ever used any of the graphic lcds?

    I checked out the website, and the pc1602-L looks like a direct replacement (other than the background colour) for the Optrex displays I am currently using. Unfortunately Optrex has obsoleted some of their character displays so the order of the day is to locate alternate replacements for my design.

    I am considering to redesign using one of the graphic displays instead. have you worked with any of the powertip graphic displays, and if so, any tips or suggestions?

  21. #21
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I've never had time (or the requirement) to play with Graphic LCDs... I'm already struggling with a 30-hour day and I'm looking to buy a good condition Time Machine the instant one appears on eBay.

    I can however recommend these Guys...

    http://www.compsys1.com/workbench/

    Ranjit's been playing with PBP and LCD graphics for a long time, and has posted routines and goodies in the MeLabs email forum over the years which you can extract from the Archives...

    http://list.picbasic.com/cgi-bin/board-search.cgi

  22. #22
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    Hi Melanie,
    Is there any chance you could post a direct link to the LCd you have pictured?
    A Google search for Powertip yeilds many results, and I can't find that part
    number under any of them..
    Cheers, Art.

  23. #23
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Hi Art

    If you looked halfway up the thread you'd notice I said "Tri-T model TMBC16265SP-03 'Cool Blue' (full Part Number TMBC16265SP-SN-LED05-W)"

    These are manufactured by Tri-T which is why you can't see them on the PowerTip site. Tri-T won't even acknowledge you unless you start talking thousands of pieces, so I do keep a surplus over what we consume just for folks on this list.

    Melanie

  24. #24
    wilfrieds's Avatar
    wilfrieds Guest


    Did you find this post helpful? Yes | No

    Default lcd

    Hello Mel

    I am designing a LCD dashboard for Earthmoving/forklift equipment.
    Do you have a 2 x 16 or 4 x lcd LCD that's waterproof.
    Background lighting prefered.

    Wilfried

  25. #25
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I'm holding class today (oooh goody... a whole day of young techies saying "Yes Mistress" - or something similar)... give me a day and I'll edit some pics together and show you a method I use of waterproofing what otherwise isn't...

  26. #26
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Sorry about the delay in responding... had to find the Digicam, allocate time to take pics, then edit-out the client logo's etc etc...

    LCD1. We start off with our Control Panel with our LCD, Buttons, LED's etc all attached. Ribbon Cable plugs into main electronics located elsewhere (in our example here in the base of a IP66 rated enclosure). Yes, you can have your LCD (example in 4-bit Parallel Mode) on the end of a long Ribbon Cable. I've used 350mm without any problems.

    LCD2. That's the Lid from an IP66 rated enclosure. The Lid has been machined to take the LCD, Buttons, LED etc etc. You attach your Control Panel to the back of this Lid. Ribbon Cable plugs into the electronics secured in the base.

    LCD3. A clear, self-adhesive reverse-printed flexy-acetate is overlayed on the Lid. Your silk-screen printer will advise as to the different adhesives available to make this watertight. It is Reverse-Printed so that the markings will not be rubbed-off with use. It's semi-flexible, so that you can push through to access the Buttons. Again your Silk-Screener will advise you as to the range of materials available to you. A medium-duty favourite of mine is 250 micron clear PVC. The electronics you'll note is now in the sealed enclosure with IP56 rated cable glands for entry/exit.

    LCD4. Finally, the addition of a Bezel (in this case a 18swg Steel Plate) makes it Bullet-proof. The Bezel prevents peeling or otherwise tampering with the edges of the acetate panel. The Bezel can additionally have a gasket seal around the inside edge. You can hoze-down the final assembly, stand it out in the rain, or perform whatever watersports you fancy in it's proximity. Rather than a Steel Bezel, I've also used a reverse-printed Plexiglass panel. That's also a good option where there are no Buttons, just Displays and/or LED's.

    Have fun.
    Melanie
    Attached Images Attached Images     

  27. #27
    wilfrieds's Avatar
    wilfrieds Guest


    Did you find this post helpful? Yes | No

    Default waterproofed LCD

    Hi Mel ( mistress??)

    Thanks for the responce

    It will be a bit difficult finding all the materials down here in South Africa( the ass-end of the world) but it will certainly put me on track.

    P.S. Still battling getting the DS1307/16F877/LCD to work.

    Appreciated greetings.
    Wilfried

  28. #28
    lukygrl's Avatar
    lukygrl Guest


    Did you find this post helpful? Yes | No

    Default Instructions set for PC1602F

    Hi, I have been reading the post, and I have a PC1602F but although it came with the electrical specs I can't find an instruction set for it, could someone help me?

    Thanks in advanced.

  29. #29
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Exclamation TMR1 Pause generator

    Mel,

    Your Olympic timer program is a piece of work. Wow. The example has given me a pretty good start with timer operation.

    I was wanting to use the PIC's TMR1 resource to do two things.

    1. Act as "a timer" as in the Olympic Timer Demo to set a FLAG after 5 mins
    2. Simulate a program PAUSE (say 3 seconds)

    I gather from your program description that instructions can NOT take longer thatn 10ms, otherwise my 5 min timer will in (1) will not be accurate. (Hence cant use a simple PAUSE command)

    I have attached code that I think should work (but doesn't) and was wondering if you could help me out.

    This is the main difference:

    DELAY VAR BYTE
    TIME_END VAR BYTE
    TIME_START VAR BYTE

    Begin:

    DELAY = 3 ' CREATE A THREE SECOND DELAY
    TIME_START = SECONDS ' SAVE CURRENT TIME
    GOSUB KILLTIME ' GO WAIT FOR THE DELAY
    TOGGLE PORTB.0 ' DELAY FINISHED NOW TOGGLE LED

    goto begin ' DO IT ALL OVER AGAIN

    DISABLE


    KILLTIME: ' KEEP DOING THIS ROUTINe UNTIL delay time reached
    TIME_END = SECONDS-TIME_START ' MINUS START TIME EQUALS THE CHOSEN DELAY
    IF TIME_END > DELAY THEN RETURN
    GOTO KILLTIME
    Attached Files Attached Files

  30. #30
    Join Date
    Jan 2006
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Spi

    Wouldn't it be nice to display the time in big 7-segment displays like 2" etc.
    My question is what is the probability of using Serial-In Parallel Out IC like CD4094 or 74HC595? The olympic timer code excellently. I'm planning to try it using PIC16F628A. 8 pcs of 7-segment displays with individual SPI drivers communicating through a 3-wire interface (Clock, Data & Latch). I'm planning to change the LCDOUT command with a series of 8 SHIFTOUT command followed by 1 PULSOUT. Which is faster, 1 line LCDOUT or 8 lines of SHIFTOUT? What will happen to Timer's accuracy?

    I'm very much happy to hear something from you.
    Thanks. This forum is the best.
    Last edited by emavil; - 30th October 2006 at 02:48.

  31. #31
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    why 8 lines of shiftout and tons of hardware while you can use a single line of I2CWRITE with a MAX6955 OR a single HSEROUT/SEROUT with built an external 7-segment display driver with a PIC?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  32. #32
    AIAMRE's Avatar
    AIAMRE Guest


    Did you find this post helpful? Yes | No

    Smile Hex

    Hello,

    Is it possible to have the HEX file ?

    Thanks

  33. #33
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Rename the TXT as HEX.

    It's a PBP2.46 compilation of a 4 year old BAS... so usual caveats apply about wasting your life trying to get it to work in time for this years Olympics... it should... but...
    Attached Files Attached Files

  34. #34
    Join Date
    Sep 2008
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Newbie - Dumb Questions

    Hi Melanie,

    Newbie alert with dumb questions!

    Not meaning to drag this topic on (4 years - wow). I am interested in doing the project and would like a to ask a couple of questions.

    Has the PIC16F876 been replaced by anything, as I seem to be having trouble buying them.

    In the photo's you posted showing the casing for the LCD, it only appears to be small, how is the PIC interfaced with the LCD (is it inside the casing) on a carrier board or spacific schematic.

    Do you still ahve any o fthe LCD's for sale - the 'sexy blue' ones.

    Thanks in advance.

  35. #35
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    > Has the PIC16F876 been replaced by anything, as I seem to be having trouble buying them.

    Yes, the 16F876A replaced it.

    Two lines need to be added in the initialisation sequence of the program to disable the Comparators and the Voltage Reference module...

    CMCON=%00000111
    CVRCON=%00000000
    ...and any @ DEVICE statements right at the start need to have an 'A' inserted to indicate it's now a 16F876A and not a straight 16F876.

    You can also migrate to an 18F242, 18F2420 or any of that family as they're all pin compatible but need a litte more code adjustment...

    > In the photo's you posted showing the casing for the LCD, it only appears to be small, how is the PIC interfaced with the LCD (is it inside the casing) on a carrier board or spacific schematic.

    Those LCD pictures and casing digressed from the Olympic Timer topic per se. I do have a PCB and bezel that is more suitable for playing with that I can let you have. Though it wasn't intended for that purpose, with a bit of frigging (techical engineering term) you can use it for the Olympic Timer project. It'll also house an EEPROM and a RTC so it can be used for other things too when you get bored waiting for the next Olympics.

    > Do you still ahve any o fthe LCD's for sale - the 'sexy blue' ones.

    Yes, about 8,000 pcs at the last inventory-check. Contact me off-list.

  36. #36
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    > Has the PIC16F876 been replaced by anything, as I seem to be having trouble buying them.

    Yes, the 16F876A replaced it....
    You can also migrate to an 18F242, 18F2420 or any of that family as they're all pin compatible but need a litte more code adjustment...
    My guess is that the 16F866 is probably going to be the 16F876A replacement--and they are cheaper than either of the older parts. It will possibly require more edits than going to the A part, but not as many as going to the 18F part.

    Note that 18F parts, given the same specs, are like having larger code space. They don't have code pages, and they have almost twice as many asm commands. You can expect a 20% savings right off the top. I also believe the 18F2420's are facing impending obsolescence, as the 18F24K20 (I think that's the new part...) has migration instructions to it. And it's cheaper.

Similar Threads

  1. About olympic timer..
    By Eng4444 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th June 2006, 09:16
  2. Melanie's Olympic Timer
    By nedtron in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 14:41
  3. Olympic Timer MPH readout
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th August 2005, 17:56
  4. Help with scroll text in Melanie Olympic Timer
    By jorge in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th November 2004, 14:52
  5. Melanie Olympic Timer -> Banner....scroll text...
    By jorge in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th November 2004, 22:11

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts