Thanks for your reply, But still I have question : Actually I need 64 reg for working and 64 reg for backup purpose. Now the problem is how can I simply backup working reg (bank0) into backup registers (bank 1). Please give me a short example for moving working reginster into backup registers. Kashif ali Byron A Jeff wrote: > On Fri, Jun 08, 2001 at 11:57:56AM -0700, Kashif Ali wrote: > > Hi all, > > > > I need more then 100 reg but 16f874 has only 96 reg in its first bank and I > > don't know how to utilize next bank reg. > > > > Please give an example of utilizing both bank 0 & 1 in one routine. > > > > Kashif ali > > Kashif, > > You need a copy of the datasheet. It describes exactly how to change banks. > It's section 2.2 of the 16F87X datasheet. Page 12. More detail can be found > in the 16F family midrange manual in section 6.3.3 on page 6-8. Also > in both manuals take a read of the indirect addressing feature using FSR > and INDF. They can be utilized for the task also. > > I know this may seem unfair, but I'm not going to answer your question, and > I hope that no one else will answer it either. This is information is that > is clearly documented. Frankly you would have saved a ton of time if you had > taken the time to look it up yourself. > > You can't program microcontrollers without the documentation. You also must > read it. Get a copy of the documents above from the Microchip website, and > take a read of the sections. Then try it. Then come back if necessary and post > the relevant code and the results. In this way you will get a clearer > understanding of the process instead of simply asking and getting back a > code snippet. > > I will give you one hint: bank switching for general purpose registers is > exactly the same process as setting the TRIS registers for the I/O ports for > ports D, and E (which are on an 16F874). Did you use ports D or E? If so then > how did you change the TRIS registers? It's the same process for general > purpose. > > Good luck, and let us know how it comes out.... > > BAJ > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.