SX28 continuous time-stamping counter

Hi all,

this is my first post here and i would like to ask you help for a little project using the SX28 since this is the first time that i program with this platform.
The goal of this easy project would be to have an SX doing :

Take a signal (ex: 10 MHz) from a pin to clock the chip
Take another input signal (from DC to x MHz)
output a timestamps on a rising edge of the input signal with a RS232 output 9600 bouds.
..

wich accuracy can then be achieved? (micro,ns ec..? )

any idea where can i start with?

Thanks

Comments

  • User NameUser Name Posts: 1,451
    edited 2016-03-17 - 00:40:14
    The most common way to use the SX is to exploit its fast and deterministic interrupt. You set the counter to interrupt at a rate that just barely ensures the ISR will always complete. Then, in the ISR you poll the input you are measuring and also output the timed transitions of the RS232 port.

    The resolution you could obtain this way would depend on two things:
    * The worst case timing of your ISR. This controls fast you can set the interrupt timer.
    * The frequency at which you clock the SX. It can go as high as 75MHz. This would get you a resolution (just guessing) of somewhere around 200ns and perhaps better, depending on the coding cleverness (of the ISR).

    You could achieve a faster sampling rate by sampling continuously in the main code and use the ISR only for the asynchronous serial interface, but your sampling would then have some uncertainty because of the occasional ISR delay.

    HTH :)


    Platåberget
Sign In or Register to comment.