On Sun, Apr 07, 2002 at 04:43:57AM -0400, Lindsay Pallickal wrote: > Hi All, > > I've been lurking around on this list for a couple years and am finally > about to embark on my first serious PIC project. It is a university project. > A group of aeronautical engineering students and I want to build a tiny > black box for a model airplane, to aquire 8-12 channels of analog data. > Before I ask my questions, here is what I have planned to use so far: > > 16F877 for 8 channels, 10 bits > 24FC256 serial eeprom - 256k of data storage > PICALL Programmer > > This should provide at least 10 min of storage at 30 samples/sec, using > 3 bytes for every 2 samples. My main concern is that we may need more > channels, up to 10 or 12. I see at least one 16 and some 17 and 18 series > PICs that are up for the job. I have two concerns about these alternate > chips though, these parts aren't the flash type - I noticed they use the 'C' > denotation instead of the 'F' in their names - does this mean for every code > revision I will need a new chip? Not exactly. The EPROM based controllers always come in two packages. The JW part is windowed and can be erased. The OTP part con only be progrmmed once. > > Also, for the 17 and 18 series chips it seems I will need a different > programmer. Is there a cheap programmer for the 17 and 18 series chips that > I should go with from the start? Not sure about the 18's. The 17's have the original parallel programming algorithm IIRC. Between that and the fact that they're simply not very popular, you're going to have a hard time finding a useful inexpensive programmer for them. Also you'll have to expand your toolset. > > I was also considering using a pin on the 16F877 to switch between two > sets of 8 analog inputs, using eight 2x1 muliplexers. I would read 8 > channels into RAM, switch with the muxes, read the second 8 channels to RAM, > and then output to the eeprom. Would that work? Well you'll have some issues. The first you have right on the mark below. > I've never heard of > multiplexers switching analog inputs, so I am a little concerned there. And rightly so. The second thing is to ensure that your multiplexer doesn't affect the reading. > > I'm hoping you guys will point out anything obviously mistaken and maybe > offer some ideas. Sorry if I sound like a total newbie by asking so many > questions, I am one - most of my experience is in computer science and I've > only been reading the EE related stuff, though I have been doing so for a > while. Thanks in advance. Actually this is a pretty good first crack at the nut. However you missed the patently simple and obvious solution: Why not simply add a second 16F87X part to the mix? For example the 28 pin package adds 5 more analog inputs to the mix. It can easily be attached to the 16F877 using a high speed serial interface, or in fact could write to it's own data EEPROM if you like. But you get the same programmer, no need to switch chips, and it'll cost just about as much space as the multiplexer solution you proposed (3 pins per multiplexer + power + select is 27 pins, round up to 28) It'll only get you to 13 analog inputs, but that exceeds your original specification. You can even use another 40 pin 16F87X part and get 16 analog inputs. Hope this helps, BAJ -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads