; Max Heise, 19.02.2002, 1450, - Angelegt als Beispielprogramm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Beschreibung: ; Programm hat RB0 als Ausgang und RA2 als Eingang. Ist Eingang RA2 HIGH ; wird Ausgang RB0 auch HIGH gesetzt. Ist RA2 Low wird RB0 auch LOW gesetzt. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Config fuer IDE und Assembler LIST P=16F84, R=DEC __CONFIG H'3FF1' ; XT,WDOG OFF __IDLOCS H'F055' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Include include "p16f84.inc" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Codebeginn org 0x00 goto Init org 0x04 Isr retfie Init bsf STATUS, RP0 ; sel bank 1 bcf TRISB, 0 ; RB0 is output bcf STATUS, RP0 ; sel bank 0 goto Loop LElse bcf PORTB, 0 goto Loop Loop btfsc PORTA, 2 goto LElse bsf PORTB, 0 goto Loop end