- 12V Akku mit 280 Ah bauen         
Ergebnis 1 bis 8 von 8

Thema: Frage an DIE HARD gibt es den Treiber p5driv12.s19 auch als

  1. #1
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    25.11.2003
    Ort
    Schöneiche b. Berlin
    Alter
    68
    Beiträge
    398

    Frage an DIE HARD gibt es den Treiber p5driv12.s19 auch als

    Anzeige

    Powerstation Test
    Hallo DIE HARD!
    Gibt es den Treiber p5driv12.s19 auch als .asm -Datei.(für EMU bzw IDE11)
    Nur mal so als Frage , damit man mal was ändern kann!
    Oder ist der streng Geheim?
    MfG
    janpeter

  2. #2
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    25.11.2003
    Ort
    Schöneiche b. Berlin
    Alter
    68
    Beiträge
    398
    Hallo DIE HARD!
    hat sich schon geklärt, ich habe den Treiber per Hand disassembliert.
    MfG
    janpeter

  3. #3
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    07.01.2004
    Ort
    München
    Alter
    75
    Beiträge
    214
    Kannst Du den Treiber (disassembliert oder asm) bitte in den Download-Bereich stellen? Oder ist der wirklich geheim?

  4. #4
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    07.01.2004
    Ort
    München
    Alter
    75
    Beiträge
    214
    Jetzt war ich doch zu ungeduldig, und deshalb habe ich den P5DRIV auch disassembliert. Ich füge ihn mal hier bei - vielleicht spart sich jemand unnötige Mühen.
    PS: ich bin mir nicht sicher, dass alles stimmt, sieht aber plausibel aus.
    Angehängte Dateien Angehängte Dateien

  5. #5
    Gast
    Er liegt auf C-Robotics.de
    --> http://www.c-robotics.de/ccrp5/CCRP5DOC.zip

  6. #6
    Gast
    Hier ist der Treiber:

    Code:
    *********************************************
    *** CCRP5 C-CONTROL DRIVER (by DIE HARD)  ***
    *********************************************
    * - IR INTERFACE	      Byte 1-3	*****
    * - PLM RATE OVERRIDE		        *****
    * - EXTPORT DRIVER            Byte 1    *****
    *********************************************
    * -     EXTENDED VERSION, LCD DELETED
    * - PA0 =  COMMON DATA
    * - PA1 =  COMM INTERFACE CLOCK
    * - PA2 =  EXTPORT/LCD CLOCK
    * - PA3 =  EXTPORT STROBE
    * - PA5 =  REVERSE LEFT (0=REVERSE)
    * - PA4 =  REVERSE RIGHT (0=REVERSE)
    *********************************************
    
    *------------  TIMING -----------------------
    * EXTPORT WRITE:       115us
    *
    * BASIC BYTES 1 AND 2 ARE OCCUPIED
    * TRANSMIT ENTRY IS
    * PORT B IST BASIC PORT 1-8 
    * PROGRAM USES LABEL  "A"
    
    
    
    *----- SYSTEM I/O -------
    PADDR EQU $0005
    PADAT EQU $0001
    PLMA  EQU $000A
    PLMB  EQU $000B
    MISC  EQU $000C
    *----- COMM INTERFACE MEMORY -----
    BUFFL    EQU $00A1
    BUFFH    EQU $00A2
    SUBCMD   EQU $00A3
    *--- EXTPORT INTERFACE MEMORY ----
    EXTP     EQU $00A4
    *---- SYSTEM STATUS ----------
    SYSSTAT  EQU $00A5
    
    .org $0101
    
    *IIIIIIIIIII REVERSE RIGHT IIIIIIIIIIIIIII
    REVR:    BCLR 4,PADAT
             BSET 3,SYSSTAT
             RTS
    *IIIIIIIIIII REVERSE LEFT IIIIIIIIIIIIIIII
    REVL:    BCLR 5,PADAT
             BSET 4,SYSSTAT
             RTS
    *IIIIIIIIIII FORWARD RIGHT IIIIIIIIIIIIIII
    FWDR:    BSET 4,PADAT
             BCLR 3,SYSSTAT
             RTS
    *IIIIIIIIII FORWARD LEFT IIIIIIIIIIIIIIIII
    FWDL:    BSET 5,PADAT
             BCLR 4,SYSSTAT
             RTS
    *IIIIIIIIII ROTATE RIGHT IIIIIIIIIIIIIIIII
    ROTR:    BSR FWDL
             BRA REVR
    *IIIIIIIIII ROTATE LEFT IIIIIIIIIIIIIIIII
    ROTL:    BSR FWDR
             BRA REVL
    *IIIIIIIII MOVE BACK IIIIIIIIIIIIIIIIIIII
    REV:     BSR REVL
             BRA REVR
    *IIIIIIII MOVE FORWARD IIIIIIIIIIIIIIIIII
    FWD:     BSR FWDL
             BRA FWDR
    *IIIIIIIIIII COMNAV STATUS IIIIIIIIIIIIIII
    CNSTAT:  LDA #$04
             STA SUBCMD
             BSR XX
             LDA SYSSTAT   ; b0,b1,b2
             AND #$F8      ; CLEAR BITS
             ORA BUFFL
             STA SYSSTAT
             RTS
    
    *-------- SPEED RIGHT --------------------
    TXPLMB:   LDA #8
              LDX PLMB
              BRA TXX
    *-------- SPEED LEFT ---------------------
    TXPLMA:  LDA #7        
             LDX PLMA
    TXX:     STX BUFFL
             STA BUFFH
             BRA SENDTLM
    *-------- SYSTEM STATUS ------------------         
    TXSTAT:  CLR BUFFH
             LDA SYSSTAT
             STA BUFFL
    *IIIIIIIIIII  SEND TLM IIIIIIIIIIIIIIIIIII 
    SENDTLM: LDA BUFFL      ;FORMAT
             ROL A
             ROL BUFFH
             ROL A
             ROL BUFFH
             CLR SUBCMD      ;->SEND
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *III   SHIFT COMMAND FRAME OUT         IIII        
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    XX:      SEI		;NO INTERRUPTS
             BSR SRQ	;REQUEST AND ACKNOWLEDGE
    *------- SET LINES TO OUTPUT -------------
    SFTOUT:  BSR SETDOUT
    *------- SOME DELAY ------
              LDX #12	;DELAY AND CLR X
    ADEL:     DEC x
              BNE ADEL
    *------ SEND SUBCOMMAND -------
             LDA SUBCMD
             JSR SOAKKU
    *----- SEND COMMAND HI-BYTE ---
             LDA BUFFH
    	 JSR SOAKKU
    *----- SEND COMMAND LO-BYTE ---
             LDA BUFFL
             JSR SOAKKU
    *-----  SET LINES TO IN -------
             BCLR 0,PADDR	;DATA LINE IN
             BCLR 1,PADDR   ;CLOCK LINE IN
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *III    SHIFT IN 2 BYTE ANSWER          IIII
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
             JSR SIAKKU        ;GET HI-BYTE
             STA BUFFH
             JSR SIAKKU	   ;GET LO-BYTE
             STA BUFFL
    *----- SET LINES TO OUT
             BSR SETDOUT
             CLI
             RTS
    
    *---------------------------
    *--- SHIFT AKKU OUT --------
    *---------------------------
    SOAKKU:  CLRX
    S1BYT:   BCLR 1,PADAT   ;CLOCK OUT L
             LSRA		;b0 FIRST
             BCLR 0,PADAT
             BCC CLKOUT
             BSET 0,PADAT
    CLKOUT:  BSET 1,PADAT   ;CLOCK OUT H
             INC X
             CPX #$8
             BNE S1BYT
             RTS
    *------------------------------
    *---    SET DATA OUT    -------
    *------------------------------
    *SETDOUT: BSET 1,PADDR   ;SET CLOCKLINE OUT
    SETDOUT: BCLR 1,PADAT   ;CLOCK LO
             BSET 1,PADDR   ;SET CLOCKLINE OUT
             BSET 0,PADDR   ;SET DATALINE OUT
             RTS
    *-----------------------------
    *--- SHIFT IN AKKU    --------
    *-----------------------------
    SIAKKU   CLRX
    R1BYT:   BRSET 1,PADAT,R1BYT  ;WAIT CLOCK L
             LSRA
    CLKIN:   BRCLR 1,PADAT,CLKIN  ;WAIT CLOCK H
             BRCLR 0,PADAT,SDT
             ORA #$80
    SDT:     INC X
             CPX #$08
             BNE R1BYT
             RTS  
    *-------------------------------
    *--- REQUEST AND ACKNOWLEDGE ---
    *-------------------------------
    SRQ:     BSR SETDOUT    ;LINES TO OUT 
             BSET 1,PADAT   ;CLOCK HI
    	 LDX #10
    DEL1:    DEX		;HOLD REQUEST 36 us
             BNE DEL1 
    *------ WAIT FOR ACKNOWLEDGE ---
             BCLR 1,PADDR   ;END REQUEST
             LDX #10
    DEL2:    BRSET 1,PADAT,ACKN
             DEX		;WAIT ACKN
             BNE DEL2
             BRA SRQ	;REPEAT AFTER TIMEOUT
    *----- ACKNOWLEDGE RECEIVED ----
    ACKN:    BRSET 1,PADAT,ACKN ;WAIT END ACKN   
             RTS   
    
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *IIIII   PLM SPEED OVERRIDE      IIIIIIII
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    	LDA #$0C
            STA MISC
            RTS
    
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *IIIII     EXT PORT DRIVE          IIIIII
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    * REMAINS PA3=0, PA2=1 
    PDRIVE: LDX #8
    *       BSET 0,PADDR ;DATA LINE IS OUTPUT
    LP2:    ROL EXTP
    	BCLR 0,PADAT ;LO OUT
            BCC LP1
            BSET 0,PADAT ;HI OUT
    LP1:    BCLR 2,PADAT ;CLOCK
            BSET 2,PADAT
            DEX
            BNE LP2
            ROL EXTP     ;
            BSET 3,PADAT ;STROBE
            BCLR 3,PADAT
    *        BCLR 0,PADDR ;DATA LINE IS INPUT
            RTS
    *IIIIIIIIIIII LED 1 ON IIIIIIIIIIIIIIIIIIII
    *LED1ON:  BSET 4,EXTP
    *         BRA PDRIVE
    *LED2ON:  BSET 5,EXTP
    *         BRA PDRIVE
    *LED3ON:  BSET 6,EXTP
    *         BRA PDRIVE
    *LED4ON:  BSET 7,EXTP
    *         BRA PDRIVE
    *LED1OFF: BCLR 4,EXTP
    *         BRA PDRIVE
    *LED2OFF: BCLR 5,EXTP
    *         BRA PDRIVE
    *LED3OFF: BCLR 6,EXTP
    *         BRA PDRIVE
    *LED4OFF: BCLR 7,EXTP
    *         BRA PDRIVE
    
    
    
    ACSLO:   BSR CLRF
             BSET 2,EXTP
             BSET 6,SYSSTAT
             BRA PDRIVE
    ACSHI:   BSR CLRF
             BSET 1,EXTP
             BSET 5,SYSSTAT
             BRA PDRIVE
    ACSMAX:  BSR CLRF
             BRA PDRIVE
            
    
    CLRF:    BCLR 2,EXTP
             BCLR 1,EXTP
             BCLR 6,SYSSTAT
             BCLR 5,SYSSTAT         
             RTS

  7. #7
    Gast
    Und hier noch der p5driv12.asm

    Code:
    *********************************************
    *** CCRP5 C-CONTROL DRIVER (by DIE HARD)  ***
    *********************************************
    * - IR INTERFACE	      Byte 1-3	*****
    * - PLM RATE OVERRIDE		        *****
    * - EXTPORT DRIVER            Byte 1    *****
    *********************************************
    * -     EXTENDED VERSION, LCD DELETED
    * - PA0 =  COMMON DATA
    * - PA1 =  COMM INTERFACE CLOCK
    * - PA2 =  EXTPORT/LCD CLOCK
    * - PA3 =  EXTPORT STROBE
    * - PA5 =  REVERSE LEFT (0=REVERSE)
    * - PA4 =  REVERSE RIGHT (0=REVERSE)
    *********************************************
    
    *------------  TIMING -----------------------
    * EXTPORT WRITE:       115us
    *
    * BASIC BYTES 1 AND 2 ARE OCCUPIED
    * TRANSMIT ENTRY IS
    * PORT B IST BASIC PORT 1-8 
    * PROGRAM USES LABEL  "A"
    
    
    
    *----- SYSTEM I/O -------
    PADDR EQU $0005
    PADAT EQU $0001
    PLMA  EQU $000A
    PLMB  EQU $000B
    MISC  EQU $000C
    
    PBDAT EQU $0002
    PBDDR EQU $0006    ;LCD BYTE PORT
    *----- COMM INTERFACE MEMORY -----
    BUFFL    EQU $00A1
    BUFFH    EQU $00A2
    SUBCMD   EQU $00A3
    *--- EXTPORT INTERFACE MEMORY ----
    EXTP     EQU $00A4
    *--- LED PORT INTERFACE MEMORY ---
    LEDP     EQU $00A6
    *---- SYSTEM STATUS ----------
    SYSSTAT  EQU $00A5
    
    .org $0101
    
    *IIIIIIIIIII REVERSE RIGHT IIIIIIIIIIIIIII
    REVR:    BCLR 4,PADAT
             BSET 3,SYSSTAT
             RTS
    *IIIIIIIIIII REVERSE LEFT IIIIIIIIIIIIIIII
    REVL:    BCLR 5,PADAT
             BSET 4,SYSSTAT
             RTS
    *IIIIIIIIIII FORWARD RIGHT IIIIIIIIIIIIIII
    FWDR:    BSET 4,PADAT
             BCLR 3,SYSSTAT
             RTS
    *IIIIIIIIII FORWARD LEFT IIIIIIIIIIIIIIIII
    FWDL:    BSET 5,PADAT
             BCLR 4,SYSSTAT
             RTS
    *IIIIIIIIII ROTATE RIGHT IIIIIIIIIIIIIIIII
    ROTR:    BSR FWDL
             BRA REVR
    *IIIIIIIIII ROTATE LEFT IIIIIIIIIIIIIIIII
    ROTL:    BSR FWDR
             BRA REVL
    *IIIIIIIII MOVE BACK IIIIIIIIIIIIIIIIIIII
    REV:     BSR REVL
             BRA REVR
    *IIIIIIII MOVE FORWARD IIIIIIIIIIIIIIIIII
    FWD:     BSR FWDL
             BRA FWDR
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *III   SEND COMNAV STATUS             IIII
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    CNSTAT:  LDA #$04
             STA SUBCMD
             BSR XX
             LDA SYSSTAT   ; b0,b1,b2
             AND #$F8      ; CLEAR BITS
             ORA BUFFL
             STA SYSSTAT
             RTS
    
    *-------- SPEED RIGHT --------------------
    *TXPLMB:   LDA #8
    *          LDX PLMB
    *          BRA TXX
    *-------- SPEED LEFT ---------------------
    *TXPLMA:  LDA #7        
    *         LDX PLMA
    *TXX:     STX BUFFL
    *         STA BUFFH
    *         BRA SENDTLM
    *-------- SYSTEM STATUS ------------------         
    TXSTAT:  CLR BUFFH
             LDA SYSSTAT
             STA BUFFL
    *IIIIIIIIIII  SEND TLM IIIIIIIIIIIIIIIIIII 
    SENDTLM: LDA BUFFL      ;FORMAT
             ROL A
             ROL BUFFH
             ROL A
             ROL BUFFH
             CLR SUBCMD      ;->SEND
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *III  SHIFT COMMAND FRAME OUT ( COMNAV ) II        
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    XX:      SEI		;NO INTERRUPTS
             BSR SRQ	;REQUEST AND ACKNOWLEDGE
    *------- SET LINES TO OUTPUT -------------
    SFTOUT:  BSR SETDOUT
    *------- SOME DELAY ------
              LDX #55	;DELAY AND CLR X36=52
    ADEL:     DEC x
              BNE ADEL
    *------ SEND SUBCOMMAND -------
             LDA SUBCMD
             JSR SOAKKU
    *----- SEND COMMAND HI-BYTE ---
             LDA BUFFH
    	 JSR SOAKKU
    *----- SEND COMMAND LO-BYTE ---
             LDA BUFFL
             JSR SOAKKU
    *-----  SET LINES TO IN -------
             BCLR 0,PADDR	;DATA LINE IN
             BCLR 1,PADDR   ;CLOCK LINE IN
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *III    SHIFT IN 2 BYTE ANSWER          IIII
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
             JSR SIAKKU        ;GET HI-BYTE
             STA BUFFH
             JSR SIAKKU	   ;GET LO-BYTE
             STA BUFFL
    *----- SET LINES TO OUT
             BSR SETDOUT
             BSET 7,PBDAT      ;USED FOR NAV EXTENSION
             BCLR 7,PBDAT
    EXXX:    CLI
             RTS
    
    *---------------------------
    *--- SHIFT AKKU OUT --------
    *---------------------------
    SOAKKU:  CLRX
    S1BYT:   BSR D12        ;DELAY 12 Mhz 17cycl
             BSR D12
             BCLR 1,PADAT   ;CLOCK OUT L
             BSR D12
             BSR D12
             LSRA		;b0 FIRST
             BCLR 0,PADAT
             BCC CLKOUT
             BSET 0,PADAT
    CLKOUT:  BSET 1,PADAT   ;CLOCK OUT H
             INC X	        ;3 
             CPX #$8        ;2
             BNE S1BYT      ;3
             BSR D12
             RTS
    *------------------------------
    *---    SET DATA OUT    -------
    *------------------------------
    *SETDOUT: BSET 1,PADDR   ;SET CLOCKLINE OUT
    SETDOUT: BCLR 1,PADAT   ;CLOCK LO
             BSET 1,PADDR   ;SET CLOCKLINE OUT
    D12:     BSET 0,PADDR   ;SET DATALINE OUT
             RTS
    *-----------------------------
    *--- SHIFT IN AKKU    --------
    *-----------------------------
    SIAKKU   CLRX
    R1BYT:   BRSET 1,PADAT,R1BYT  ;WAIT CLOCK L
             LSRA
    CLKIN:   BRCLR 1,PADAT,CLKIN  ;WAIT CLOCK H
             BRCLR 0,PADAT,SDT
             ORA #$80
    SDT:     INC X
             CPX #$08
             BNE R1BYT
             RTS  
    *-------------------------------
    *--- REQUEST AND ACKNOWLEDGE ---
    *-------------------------------
    SRQ:     BSR SETDOUT    ;LINES TO OUT 
             BSET 1,PADAT   ;CLOCK HI
    	 LDX #30
    DEL1:    DEX		;HOLD REQUEST 36 us
             BNE DEL1 
    *------ WAIT FOR ACKNOWLEDGE ---
             BCLR 1,PADDR   ;END REQUEST
             LDX #30
    DEL2:    BRSET 1,PADAT,ACKN
             DEX		;WAIT ACKN
             BNE DEL2
             BRA SRQ	;REPEAT AFTER TIMEOUT
    *----- ACKNOWLEDGE RECEIVED ----
    ACKN:    BRSET 1,PADAT,ACKN ;WAIT END ACKN   
             RTS   
    
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *IIIII   PLM SPEED OVERRIDE      IIIIIIII
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    PLM:	LDA #$0C    ;2
            STA MISC    ;5
            RTS         ;6
    
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    *IIIII     EXT/LED PORT DRIVE        IIII
    *IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    * REMAINS PA3=0, PA2=1 
    PDRIVE: CLR X
            BRA PD
    LDRIVE: LDX #2
    PD:     LDA #8
    *       BSET 0,PADDR ;DATA LINE IS OUTPUT
    LP2:    ROL EXTP,X
    	BCLR 0,PADAT ;LO OUT
            BCC LP1
            BSET 0,PADAT ;HI OUT
    LP1:    BCLR 2,PADAT ;CLOCK
            BSET 2,PADAT
            DEC A
            BNE LP2
            ROL EXTP,X   ;
    *        BSET 3,PADAT ;STROBE
    *        BCLR 3,PADAT
    *        BCLR 0,PADDR ;DATA LINE IS INPUT
            RTS
    
    
    
    
    ACSLO:   BSR CLRF
             BSET 2,EXTP
             BSET 6,SYSSTAT
             BRA PDRIVE
    ACSHI:   BSR CLRF
             BSET 1,EXTP
             BSET 5,SYSSTAT
             BRA PDRIVE
    ACSMAX:  BSR CLRF
             BRA PDRIVE
            
    
    CLRF:    BCLR 2,EXTP
             BCLR 1,EXTP
             BCLR 6,SYSSTAT
             BCLR 5,SYSSTAT         
             RTS

  8. #8
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    07.01.2004
    Ort
    München
    Alter
    75
    Beiträge
    214
    Hallo DIE HARD:
    Danke! Aber schon nächster Wunsch:
    Könntet Ihr auf der c-robotics Seite bitte Änderungen kenntlich machen (z.B. "ZIP vom ..."), oder hier einen Hinweis posten, dass es was neues gibt?

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

LiFePO4 Speicher Test