;****************************************************************** ;Ping-pong data move ;This program moves push button switch values from Port A to the ;leds on Port B. Uses electronic pingpong hardware. ;TJW 21.2.05 Tested 22.2.05 Tested 22.2.05 ;****************************************************************** ; ;Configuration Word: WDT off, power-up timer on, ; code protect off, RC oscillator ; ;specify SFRs status equ 03 porta equ 05 trisa equ 05 portb equ 06 trisb equ 06 ; org 00 ;Initialise start bsf status,5 ;select memory bank 1 movlw B'00011000' movwf trisa ;port A according to above pattern movlw 00 movwf trisb ;all port B bits output bcf status,5 ;select bank 0 ; ;The “main” program starts here movlw 00 ;clear all bits in ports A and B movwf porta movwf portb loop movf porta,0 ;move port A to W register movwf portb ;move W register to port B goto loop end