Shop OBEX P1 Docs P2 Docs Learn Events
Time stamp measurement — Parallax Forums

Time stamp measurement

Andy_ouhscAndy_ouhsc Posts: 17
edited 2011-06-28 08:20 in Propeller 1
Is there a timestamp object which can measure the timer in the millionth of a second?
Is it possible?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-06-28 08:20
    What do you mean by "measure the timer"? With the standard 5MHz crystal, the Propeller's system clock runs at 80MHz. There's a system clock register (CNT) that is readable by your program that continuously accumulates the system clock pulses. There's also a pair of counters (CNTA / CNTB) in each cog that can time external signals using the system clock with a resolution of 12.5ns. Download and read the application note (AN001) on these system counters for details. There are several objects that use these counters, but they're easy to use directly in your program. Look at the PULSIN method in the BS2_Functions object for one example.
Sign In or Register to comment.