Shop OBEX P1 Docs P2 Docs Learn Events
Accurate external timing — Parallax Forums

Accurate external timing

mtbphil1mtbphil1 Posts: 6
edited 2008-05-09 20:32 in BASIC Stamp
I'm interested in creating a lap counter timing circuit down to 1/100s resolution for bike racing.· I'd like use and external timing chip, but the typical DS1302 is only good to seconds resolution.· I have a number of sensors and displays hooked up to the stamp, so its already overburdened.· I've also dabbled with 555 chips like in previous posts, but its a hassle and sometimes inaccurate.· I had difficulty finding a chip down to millisecond resolution in a DIP package with serial programing.· Can the basic stamp be easiliy interfaced with the following chip (PCF8593 CLOCK / CALENDAR) that uses I2C-BUS PROTOCOL?· If not, what is the best substitute for external timing down to 1/100s?· Thanks

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=568-1089-5-ND
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-01 19:55
    All of the Basic Stamps can be used with I2C protocol chips. The BS2p/pe/px versions have built-in statements to make it very easy to do this. The other BS2 versions have to use subroutines to handle the protocol (www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv85.pdf).

    It's possible to do timing with a Stamp (see www.emesystems.com). It's easier with the higher speed versions of the Stamp. You primarily use the PAUSE statement for a millisecond interval and calibrate the particular code you want to use by executing it in a loop some large number of times, timing with a stopwatch, and dividing by the loop count.
  • Scott FergusonScott Ferguson Posts: 2
    edited 2008-05-08 21:25
    I am just starting working with the DS1302, but, by changing the speed of the oscillating crystal it should be possible to change the accuracy of the chip. What you need is a crystal that operates at 100 X 32.768Khz. I don't know if something like this is offered, or if the DS1302 would work correctly at this timing interval, but it might be worth looking into.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-08 22:56
    I think you'll find that the DS1302 won't work far from the nominal frequency of 32KHz.· The IC is optimized for this frequency to minimize power consumption and the power requirement should go up roughly with the square of the frequency (if I remember things right).· There will neither be enough energy to make the crystal oscillate nor will the logic switch or count·well at 3MHz.· You'd be much better off making your own oscillator with a hex inverter and feeding that into a 12 or 14 bit ripple counter, then serially transferring that into the Stamp with a pair of 74HC165's.
  • Scott FergusonScott Ferguson Posts: 2
    edited 2008-05-09 20:32
    Like I said, I have just started working with this chip, thanks for your information. --Scott Ferguson
Sign In or Register to comment.