> > > 2) How do you change the oscillator type in PicBasic? If you were > > using MPLAB and assembly I'd tell you to check your > flags/options to > > be sure you have selected HS as the oscillator type. > > Oh... always wondered about the oscillator flag. I've always > set it to XT > thinking it meant Crystal based i.e. external decrite > component. I'll try HS... > XT mode won't have enough drive (overdrive) to make the resonator work reliably at 20MHz. You need HS mode. Also, and several other people have already pointed this out, 20MHz is not a guarantee of getting 9600bps to work, especially if you have other code bugs. You get EXACT baud rates by having a crystal frequency that is a multiple of your baud rate according to the tables found in the PIC16F877 data sheet. 20MHz will have some residual error in the baud rate. Rob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist