??? 07/24/08 13:07 Read: times |
#157021 - re:again question Responding to: ???'s previous message |
Hi Milan,
Maybe i did not understand You post, but ... Use Timer 2 only for display,keyboard(debouncing) and maybe for incrementing some timeout variables. Timer 0 is enough to measure capacitor. I'm not sure why You plane simultaneously charging from more than one source transistor Q5..Q9. You start measuring first trough strongest source Q5 . If You -A) do not receive Ready0 flag in 1..2 seconds - a) If P3.2 is HIGH - You have too big capacitor . - b) If P3.2 is still low (after discharging) - You have no capacitor connected -B) receive Ready0 (measurement made) flag in 1..2 seconds after charging is started - this is good result to be displayed. -C) receive Ready0 (measurement made) flag in 0,1...0,2 seconds after charging is started - this is "too fast" result. You can display , and re-measure with next source transistor. So Your target can be - finding source transistor with wich result is ready in 1..2 seconds, starting from strongest source. And note - this time variable , mentioned above , is incremented in Timer2 interrupt, checked in mainloop. Precisious results are better to get trough precisious parts: 1% resistors or better , better comparator . I'm not sure how stable will be Your current sources. Maybe MOSFETs are better for Q5..Q9. regars |
Topic | Author | Date |
Measure time of signal! | 01/01/70 00:00 | |
Starting | 01/01/70 00:00 | |
To Steve | 01/01/70 00:00 | |
wrong window comparator | 01/01/70 00:00 | |
Again question! | 01/01/70 00:00 | |
re:again question | 01/01/70 00:00 | |
Why not test middle range first? | 01/01/70 00:00 | |
You are right.![]() | 01/01/70 00:00 | |
Wrong window comparator | 01/01/70 00:00 | |
in every mode interrupt is on transition to 0x000 | 01/01/70 00:00 |