Also hier grad der "Schaltplan", sofern man dieses einfache Gedöns so nennen kann...
Externes Bild anzeigen
Und dank Stowoda´s Hilfe das Listing, das fast komplett läuft:
Nur RB4 will noch nicht.... RB0 bis RB3 und RB5 bis RB7 machen jetzt, was sie sollen !Code:; Auswahl PIC-Typ LIST P= 16F628A INCLUDE "P16F628A.INC" RADIX DEC ORG 0X5 ; Variablen AUX1_L EQU 0X20 AUX1_H EQU 0X21 AUX2_L EQU 0X22 AUX2_H EQU 0X23 AUX EQU 0X24 S0 EQU 0X25 VAR01 EQU 0X26 ; Init-Einstellungen Init clrf PORTA ;Initialize PORTA by setting output data latches movlw 0x07 ;Turn comparators off and movwf CMCON ;enable pins for I/O functions bsf STATUS, RP0 ;In Block 1 springen movlw B'00000000' ;PortB alle Output movwf TRISB bcf STATUS, RP0 ;In Block 0 zurückspringen ; Hauptprogramm MOVF PORTA, W MOVWF VAR01 MOVF VAR01, W MOVWF PORTB END







Zitieren

Lesezeichen