|
Re: Robostix: Quadrature Encoder Counters: msg#00189linux.distributions.gumstix.general
Hi Brendan, > Does anyone know if the Atmega128 has up/down counters in it? > I'm thinking of attaching some quadrature encoder devices that outputs > up/down pulses (or clk/dir signals) to it, but that depends on whether > the device has internal up/down counters . Whay kind of frequency are you going to be dealing with? There's some really good code over here: Appendix A: Quadrature Decoding State Machine It's in assembler and should work for any of the ATMega series. With the right code, you should be able to deal with quadrature encoded signals up in the 100 kHz range at least. There's 4K of SRAM, so you can store lots of up/down counters :) > If not, then I can interface an quadrature encoder counter that has a > cpu interface. Unfortunately this is a bigger device and would also > require the appropriate addr/data gating due to the multiplexed > addr/data bus. Also I don't believe the Atmega has chipselects like > other microcontrollers so I would also have to decode the address bus. You could do this to. You could use pretty much any old pin as a chip select. Just remember to set it before accessng the device, and clear it afterwards. It doesn't HAVE to be completely automatic you know :) > All this is not drastically difficult, it is just that I am prototyping > with standard dip components (not SMD) on a very small piece of vero > board. Just trying to save space and time :) If you're just dealing with wheel encoders for motors on a robot, then you shouldn't need to resort to external hardware (except for the sensors). > Also, are the 8 pads on the bottom of the board the 8 bit addr/data lines ?? Those are the Port A pins. There wasn't enough space to make all of the I/O have it's own pins, so pads were put on the bottom for the signsls that didn't have pins. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Robostix: Quadrature Encoder Counters: 00189, Richard T. Stofer |
|---|---|
| Next by Date: | Re: SD Card Support: 00189, Darren Gibbs |
| Previous by Thread: | RE: Robostix: Quadrature Encoder Countersi: 00189, Richard T. Stofer |
| Next by Thread: | Re: SD Card Support: 00189, Darren Gibbs |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |