Close

Toggling a register bit helps

A project log for Tiny PCB weighing 2.5 grams w/ a few features

2 channel constant current programmable output, IR communications, weight < 3 grams

sophi-kravitzSophi Kravitz 05/20/2020 at 01:331 Comment

The signals image in the last log shows an interrupt on every rising edge, and so whatever I thought I coded wasn't it. 

This image is perfect. The pink signal on the top is the interrupt being triggered every time the IR receiver gets a hit. It's inverse, but it's not a big deal.

Now I need to count the time in between the pulses.

Discussions

Gerben wrote 05/20/2020 at 14:39 point

That's more like it. Make sure you add plenty of margin to the timing values, as the timing for remotes isn't very precise. I had to increase the accepted margin of error in my code multiple times, as it would sometimes not accept an IR signal. Now it's working perfectly.

  Are you sure? yes | no