Searching \ for 'initializing ram' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=initializing+ram
Search entire site for: 'initializing ram'.

Truncated match.
PICList Thread
'initializing ram'
1998\02\13@103709 by Najemy, Daniel

flavicon
face
Does anyone out there have a handy routine available to initialize ram
in a 16c63 on power up?

Daniel Najemy -  Data General Corporation, Numaliine Power Systems

1998\02\13@122306 by Andrew Warren

face
flavicon
face
Najemy, Daniel <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:

> Does anyone out there have a handy routine available to initialize
> ram in a 16c63 on power up?

Sure, Daniel... This one isn't the fastest possible, but it works:

       CLRF    PCLATH      ;POINT AT PROGRAM SEGMENT 0.

       MOVLW   FRSTGP0     ;PREPARE TO ZERO ALL GENERAL-
       MOVWF   FSR         ;PURPOSE REGISTERS.

   CLRRAM:

       MOVLW   LASTGP0+1   ;ARE WE POINTING PAST THE
       XORWF   FSR,W       ;FINAL PAGE-0 REGISTER?

       SKPNZ               ;IF NOT, SKIP AHEAD.

       BSF     FSR,5       ;OTHERWISE, ADJUST FSR TO SKIP
                           ;OVER THE PAGE-1 SPECIAL-PURPOSE
                           ;REGISTERS.

       CLRF    USEFSR      ;ZERO THE REGISTER AT WHICH WE'RE
                           ;POINTING.

       INCFSZ  FSR         ;HAVE WE DONE THEM ALL?
       GOTO    CLRRAM      ;IF NOT, LOOP BACK AND ZERO ANOTHER.

You have to define FRSTGP0 and LASTGP0 to the addresses of the first
and last Page-0 general-purpose registers, of course... And "USEFSR"
is my name for the register that Microchip calls "INDF".

-Andy

=== Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1998\02\13@180809 by Najemy, Daniel

flavicon
face
Thanks! I also found a very similar solution to this (a little tighter)
in the data book - took for ever to find it! (page 9-46 96/97 PIC data
book).

> {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...