74xx138 decoder. I also really like that chip I use two of them to map two data lines to 16. The cool thing is that after I select one of the 8 possible addresses, I can toggle the two pins (or make on an input and toggle the other) with out having to reload an entire shift register or whatever. This means that the data lines on the other 7 address sets are held steady so you can twiddle this over here, then leave it and twiddle that over there without that disturbing this or this disturbing that or... confused? Anyway, it seems like the bulk of what I do needs two pins to twiddle really fast at the same time. I2C, (SDA, SLC are fast) SPI (SCK, SIO (combined in and out) are fast and nCS is slow on another address or port pin ) External BUS type devices like memory or parallel ports need an 8 bit register on a bus and then the 138 provides EN and clock, etc... James Newton, PICList Admin #3 mailto:jamesnewton@piclist.com 1-619-652-0593 phone http://www.piclist.com ----- Original Message ----- From: Bob Ammerman To: Sent: Sunday, February 11, 2001 11:13 Subject: Re: [PIC]: PIC16F84/16F877 ISR SERVO CONTROL ----- Original Message ----- From: David VanHorn To: Sent: Sunday, February 11, 2001 2:36 PM Subject: Re: [PIC]: PIC16F84/16F877 ISR SERVO CONTROL > > > >I didn't realise that you could drive 2 servos with a 16F84, so do you need > >to add say 2 > >hardware timers etc.? > > > >Could you kindly provide some sample code snippets and schematics for a > >newbie? > > One timer. > > You update each servo in turn. You're out of servos when you're out of pins :) > (And you can get clever about that) An easy way to get 8 servos out of 4 pins: 74xx138 decoder. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads