Tom Handley wrote: > Dan, the board looks good but I think you will find that a 40-Pin PIC >really does not have enough I/O if you want to add several sensors. Right >now I'm using separate PICs for functions like the IR sensors, Compass, >Range finder, H-Bridge control, and speech I/O. I'm also looking at adding a >CPLD for extra I/O. One of the Lattice CPLDs I did provides 16 Inputs and >Outputs using an SPI-style interface. It's basically four shift registers in >a single package with some expanded control functions. > Hi Tom, thanks for the comments. As mine is a general use board, I wanted to stay with a single PIC40 chip, like '74 and '77, since these are by far more popular and much cheaper than larger pinout PICs. This also argues against using gate arrays/etc. With my approach, you can still have up to 14 general digital I/O lines [counting the lines to the ULN2803], plus an additional 4 switch closures -[using analog RA3 with an on-board resistor array]. I could always go with a 68HC11 to get more pins, but that's what this project was supposed to be getting away from :). Accessibility for picsters. The Handyboard uses an expansion board to add many of the same things you are doing - and I figure I can stack a 2nd [generic] SBC for expanded features in my situation. Basically a 2-tiered approach - provide enough capability at the lower level to run your basic bot, and/or for general controller apps - so 1 board suffices in many cases. Then add another tier for fancy smanchy bot stuff, like ultrasonics/speech recog/etc. This is where the subsumption architecture stuff comes in that I mentioned earlier. ================ > While I've been focusing on testing sensors and have not finished the >overall architecture, the 16F877 core interface looks like this: > > PortA = 4 A/D channels, +Vref, and Right Tach Input (TMR0). > PortB = Interrupt expansion. Uses an external 74HC30 and RB0/INT to > provide 7 interrupts; 2 bumper switches, 3 IR, and 2 spares > reserved for Rangefinder and Speech Input PICs. > PortC = RS232, 5 SPI chip selects, Left Tach Input (TMR1). > PortD = Dual Motor control for the H-Bridge PIC, 4 spares. > PortE = SPI > > This makes it easy to add custom `smart modules' and frees the main CPU >to concentrate on higher functions. If I wired directly to the 16F877, I >wouldn't have enough pins and CPU resources. > Looks like we have slightly different approaches - [so what else is new? :)]. I'm going for a slightly more general approach with fewer specific subsystems built in - to make the board more "general" like the Handyboard. If the app really needs a lot of "higher functions", then another board can piggy-back -[such as a high-powered Stamp :)]. Got any idea how "large" your board is gonna be? More than 2.6"x4.1"? =============== > I'm looking at how much I can combine in a small CPLD. Things like motor >control, PWM, 40KHz source with three gated outputs for IR and Rangefinder, >interrupt expansion, additional I/O, etc. I'll let you know if it develops >into anything useful. Maybe we can look at another board downstream. > One reason I chose the ULN2803 is because it is spec'ed to switch at less than 1 usec, so I can drive up to 8 hi--current LEDs/etc at 40 khz/whatever. I've found the chips will switch at 2 Mhz. I also figure it should drive ultrasonic transducers directly and whatever else. I fiddled a lot with the layout to the 2803 to get max versatility. A 3x10 pin header allows connections to port B direct or 2803 drivers, plus pullups. There are also 2 different bus voltages on the header, so you can have hi-V +DRV for the 2803, and +SVO [~5v] for driving servos and other lo-V devices. You can mix and match RB pins, servos, LEDs, and other devices on the header simultaneously. best regards, - dan michaels http://www.oricomtech.com/bot40.htm ======================= -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.