Dwayne Reid wrote: > I have a code framework for both 12 bit and 14 bit core devices - this > framework allows simultaneous 9600 baud serial data receive and transmit, > bit banged SPI, and 1 PWM output. The framework does nothing by itself - > but implements a mickey mouse context switcher that passes control to the > user app for 20 cycles out of every 105 cycles. The SPI is optimized for 4 > bytes of output only - changing to 2 bytes input and 2 bytes output > requires giving up the PWM output. > > I've used this in several projects now - the current project is a hand held > control pendant that contains a 2x16 LCD display, up to 16 buttons, 11 > LEDs. All this using a 12c671 running at 4 MHz. The serial receive > routine is somewhat tolerant of baud rate variations (one version can > accommodate plus or minus 0.7 bit time error at the stop bit) and probably > could use the internal RC oscillator but the serial TX usually talks to > something that will not tolerate that much error so all projects to date > have used a 4 MHz resonator as a clock source. > > Continuous sampling serial receive works well when the task it is a part of > does not require fast response. In other words, my framework would not > work well as a RC servo controller - not enough clock cycles available to > provide smooth, jitter free output. But to build boxes with 'blinky > lights' or to generate slow stepper pulses - no problem. The SPI transmits > a packet in about 4 mSec and that would determine the granularity of the > stepper pulse rate - OK for slow steppers. > > Bottom line - it can be done. I tend to use a LOT of 8 pin PICs these days > - its amazing what you can do with 3 or 4 i/o lines! > > dwayne Dwayne, Just a couple of questions. In the little hand held controller you mentioned, were you driving the lcd with spi or off of one of the ports on the pic? Also, do you have code that I might be able to look at? Thanks in advance, Josh Koffman joshy@mb.sympatico.ca