bigjosh / TSL

CW&T Time Since Launch
https://cwandt.com/products/time-since-launch
Other
13 stars 6 forks source link

Use virtual ports on the FOUT pin to reduce power #54

Closed bigjosh closed 5 years ago

bigjosh commented 5 years ago

Since adding the filter/interlock in 50d4bf2053dc9b10c7b7abd4c559f003d6d92636, we now read the FOUT pin on each interrupt to check to make sure it really changed as a filter. We also now do this twice per second since we interrupt on both rising and falling edges so we can interlock on the changes.

We can reduce the cost of the this access by 50% by assigning that port to a virtual port. We do not currently use any of the virtual ports, so there is no cost to this optimization except writing the code.

bigjosh commented 5 years ago

VPORT now on trigger pin, FOUT pin, and diganostics pins ports.