On Wed, 11 Dec 2002 11:44:39 -0500, Matt Parker wrote: >I'm looking for a software serial port I can run on the 16F87x which will >allow me to change baud rates on the fly (well, not necessarily on the >fly, though that would be nice, but if nothing else, at startup without >recompiling). The plan is to configure the baud rate (as well as parity >and # of stop bits) by reading a set of dip switches on startup. > >I've read AN-555 (Microchip's application note on a software serial port), >but it seems to depend on using the SET statement at compile-time for all >of these options. Does anyone know of existing code that allows the comm >parameters to be set in variables? > I'd suggest putting your BRGH settings in a table of RETLWs and indexing into the table with the DIP switch value. Read the switches, get the appropriate BRGH value and write that value to the register. Regards, Bob -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body