Content originally posted in LPCWare by jookie on Thu Apr 04 06:21:36 MST 2013
OK, I got another option, this time using 2 pins - MAT0 and MAT1 connected together using OR gate. MAT0 would match on 0 and switch to L, MAT1 would match on 1 and switch to H; this would produce logical 0 on starting the counter and when signal B arrives on CAP pin, it would switch to logical 1.
The problem still remains, because I need to set MAT0 to H and MAT1 to L before starting the timer. Or after each arrival of signal B I could swap their actions and match values so they would swap their roles for the next action, but this doesn't solve the state of MAT0 and MAT1 before first timer run. So still need to set at least MAT0 somehow manually for the 1st time.