I am trying to decode a Chinese caliper serial protocol:
http://www.shumatech.com/support/chinese_scales.htm
There is no clear frame sync condition, it’s timing-based—a new frame begins after the clock is high for an extended time.
I tried to use SPI with 24 bits per frame, but since there’s no limit on the clock cycle time, it fails to sync the subsequent frames with the long clock pulse and ends up decoding the bits across the real frame boundaries.
What would you suggest for decoding this signaling?
Interesting project!
My first thought would be to set the SPI analyzer to 1 bit per word instead, and then write a quick python HLA, which will be able to get the timestamp from each bit. There you could detect the resets, and adjust the synchronization as needed.
You can learn more about them here:
Basically the HLA system allows you to run a bit of python code on each SPI frame, and then decide to produce a new frame or not. You can set the start and stop time points of the frames you produce, allowing you to line them up with the 24 bit traffic you’re trying to decode.
Although I love the HLA feature and have been using it at work a lot. (Thanks a bunch Saleae team!)
You could probably get away without any coding using a hacky method.
Add another channel on the clock line, enable the pulse filter for 100us, and then use that for the enable signal in the decoder.
If you attach a capture of the real data I’d love to have a play around with it.
1 Like
Cool idea!
Do I need to physically connect another channel to the clock pin, or is there a way to ‘copy’ the signal internally?
@przemek.klosowski Unfortunately, we don’t have a way of copying the signal internally. You’ll need to physically connect another channel wire to the clock pin.
Adding the ability to support virtual channels is on our radar though! See idea post below: