Right you are, Olin. I had already decided to do that when I make this set of changes. With the usual 20:20 hindsight I should have put all kinds of things in there as defined constants, and let the Assembler insert the correct values when something changes. However I didn't anticipate needing to fiddle with the baud rate timing. This, of course, makes one wonder what else I didn't think of think is waiting to bite me in the . RJG > ----- Original Message ----- > From: "Olin Lathrop" > To: "Microcontroller discussion list - Public." > Sent: Monday, June 27, 2005 2:57 PM > Subject: Re: [PIC]: Is 632 a "magic number" for PICs ? > > > > Roy J. Gromlich wrote: > > > Of course I will have to change all of my time delays, > > > > Not if the code is written right. If not, now is a good time to get it in > > shape. Put the oscillator frequency as a single constant in an include > > file. When you need a delay, baud rate, or whatever, put that in the > > include file too and derive everything from those numbers automatically. > > > > My PIC development environment enforces part of this by requiring the > > FREQ_OSC constant to be defined. For an automatic way of calculating the > > UART setup, see the UART_xxx macro in STD.INS.ASPIC at > > http://www.embedinc.com/pic. You specify the baud rate, and it uses > > FREQ_OSC to derive the setup. > > > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist