Data sheet states: "The FSR is a 5-bit wide register." (p. 18). However, FSR<6:5> are bank select bits. On p. 13 is shown, that FSR<7> contains 1 after any kind of reset. Such way, the puzzle can be solved. I allow, it is not very simple (I met also the same pitfall). Imre On Thu, 28 Jun 2001, Roman Black wrote: > Thank you Andy and everyone else who helped! :o) > I did my homework last night and tracked it down. > My actual Vdd rise time is less than 70mS to > reach 95% of Vdd. The datasheet spec is 0.05v/mS > (100mS at 5v supply) so this is fine. I also hold > all pins as outputs and set to low, which reduces > the chance of startup latchup. > > After checking all my hardware I realised there > was a software bug, caused by Microchip's shoddy > documentation (Grrrrr!) > > With the 16c505 the FSR register bit7 CANNOT be > cleared. Unlike other PICs. This is not mentioned > in the datasheet anywhere, I found it with the > simulator. Very nasty, the first thing I do on > startup is clear all ram registers, using the > typical FSR loop, and while I know FSR is only a > 7 bit register (bit7 is unused), but whenever you > read it to see where it is up to bit7 reads > as 1. > > Very nasty, I don't mind software bugs when they > are my fault, but that annoys me a lot... > I have put big red notes on all the > applicable pages in my 16c505 datasheet. :o( > -Roman > > > > > > > Andrew Warren wrote: > > > > I assumed that Microchip knew their stuff and when you set a PIC > > > to internal RC osc and internal MCLR control this would be ok. > > > After all, it's not hard to start up an RC osc is it? > > > > Roman: > > > > The failure of the RC oscillator is just a symptom of your REAL > > problem, which is either that your Vdd rise time is too long or that > > Vdd isn't starting its rise from < 0.7V. > > > > You only characterized your rise time as "less than" 150 ms. I don't > > have a datasheet here, but I recall that Microchip's specified > > Minimum Vdd Rise Rate is 0.05V/ms. > > > > Are you sure that your PIC's power supply is dropping to below 0.7V > > before you switch it on? > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body