> > Second, the config is all saved in the mplab project. In the > > configure menu, and the config bits part. I prefer to use this than > > specify it in the code, because it's much clearer. > > Not for us. Sorry. I learned to do it that way, and don't have a clue how to do it in the source. > I don't rely understand what's you problem here. > And I have never heard a resonable reason to *not* use the > INC files included in MPLAB. What if you have made an error in > your own defines of the SFR symbols ? Well, what I meant is that my own custom include file, does actually include the MPLAB include file, so it does end up in the final file. My include file adds friendlier names, like LED1, LED2, etc. which I find makes code clearer (well, for me anyway) > > > > About the PICdem 4 osc, it has some sort of real time clock stuff on > > it, and I'm not absolutely sure what it does, which is one reason I'm > > so worried about the baud rate. It says it has an RC osc, about 2MHz, > > and a 32Khz on timer1. I am using the external RC osc, because my > > ICD2 says I have to,... > > I know nothing about the IDC2, but I *do* know that an RC-osc > will have a hard time to give you any relailable serial communication. > You need *some* crystal (or maybe resonator) based osc to be able > to use the UASRT (or maybe the prec internal osc block on newer devices). > > > although I think it might be possible to set it > > up with an internal osc. I'm not sure what internal osc the 16F87 has > > either. > > Doesn't the data sheet tell you that ? > My copy does... > > This is fairly modern device with nanoWatt and the 8Mhz > internal osc block, so it should have all options you need. > So, if I setup the config bits to use internal osc, and output it so the ICD2 can use it, that should work? Also, I am very unsure about setting up the baud rate - in the 16F87 datasheet, it does have a lot of tables and forulae to work out what number to use, but this totally baffled me. I looked at the tables, and used the high speeed baud rate mode, for the INTRC 8MHz table, and it said to use 51 for 9600. So I used 51 in spbrg, and set the osc in the config bits to INTRC, clock out on osc2, and now nothing happens at all. The hyperterm display stays blank. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist