It depends on the protocol. If the protocol uses pulse width (or space width) modulation, PulsIn will work but some protocols are a bit more difficult. Sampling the pulsetrain every 25µS (or less) will work for almost all protocols, especially if you know the carrier frequency which will let you refine the numbers by using the nearest integral number of carrier cycles to match the sampled widths. What are you trying to accomplish?




Bookmarks