Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Byte Shift - Linear RAM Region

Status
Not open for further replies.

Suraj143

Active Member
I want to right shift 200 bytes in a circular manner.
I use PIC16F1508 which has linear RAM access (without banking).

In below code the instruction "movwi " giving me trouble.Any help...!!!

Code:
            cblock        40h
                P1:200
                endc
               
                movlw        .199
                movwf        Cnt
                movlw        P1                ;1st byte
                movwf        FSR0L           
                movlw        b'00100000'        ;point to linear memeory region
                movwf        FSR0H
                ;
                clrw
Shift_CW_Loop    movwi        FSR0++            ;this instruction writes directly to INDF????
                xorwf       INDF0,W
                xorwf       INDF0,F
                xorwf       INDF0,W
                decfsz      Temp,F
                goto        Shift_CW_Loop
                return
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top