Hi,
Well, if you say so.... If you could explain what it is you're trying to do it may be easier for me or anyone else to suggest a solution. If you don't use TMR0 for anything you CAN use that AND TMR3, both as counters. If you ARE using TMR0 for something ELSE than a counter, perhaps you can shift that work to TMR3 thus making TMR0 and TMR1 available as counters - it all depends....Ok,my doubt is cleared.Seems like i got to use an interrrupt pin and a counter.
I'm a bit confused...I thought we were talking about the 18F4550 here, the 18F4431 doesn't even have a TMR3.....And 1 more thing,the selection of QEI in PIC18F4431.
Regarding the QEI, if you don't want to use the Index channel you can either just let the position register overflow or use the position counter reset on period match. In the later case you set MAXCNT to the value at which you want the postion counter to reset to zero, 1500 for example.... You can NOT use just one channel from the encoder. The QEI module needs two channels, 90 degrees phase shifted with respec to each other. Otherwise it can't tell which way the motor is turning.
No problem at all. That's what the forum is here for.I am sorry if i am bothering you alot,but this things is new to me and locally nobody had tried this kind of stuff due to the price of these electronics and availibility.
/Henrik Olsson.
Bookmarks