> > If A/D-Converter and AnaComp are unused, you can > > use the ADC's input MUX and connect it's output > > with an AC input. The AC can then be used as input > > for InCapt of T1. So you can measure up to 7 lines > > in time slice mode (ICP, ADC0-ADC5). > > Really? > > Interesting.. That would largely solve my problem if true.
Hard-core analog designers have told me that digital is just very poorly designed analog. :-) You still have a latency problem since you need to grab the ICP buffer before the next edge. At 5 uS on a 4 MHz processor, that's a time buffer of 20 CPU cycles - NOT MUCH! A well-crafted ISR can do it, but it's tight. Another option would be to upgrade to an ATmega64 (or ATMega128). That has 2 16-bit counters with ICP. You can slave the counters together so that you end up with synchronized counts from the two edges. Then there's not a latency issue (or nearly as bad a one). I checked, and unfortunately the mega324(P) series has the same timer configuration as your mega32. Best regards, Stu Bell DataPlay (DPHI, Inc.) _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list