ALDL

Wade T. Braden wbraden at ryker.itech.cup.edu
Tue Apr 15 22:41:13 GMT 1997


        I sent this code for the HC11 to get the data stream for the 160
baud to the list a while ago and I was wounding if anyone was able to get it
to work.
  

>
>         This is how I got the data stream:  I use a MC68HC11A8 ( what the
> ECM is based on ) and basicaly I triggered off of the only falling edge in
> the stream, waited 1.4msec. and sampled.  Then to sink with the data pack, I
> looked for the 9 zeros and took the next 8 bits, skip one and take the next
> 8.  Now my data stream comes off of the service engine light, so it is 12v
> and inverted.
>         I used a 4050 CMOS->TTL driver chip to handle the 12V->5v and read
> it in the port C MSB.
>         here is my progam: ---it may not be pretty but it works---
> 
> PORTC   EQU     $1003   ;RETRIEVES PORT C
> DDRC    EQU     $1007   ;SETS DDRC
> PORTB   EQU     $1004   ;OUTPUTS TO PORT B
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; MAIN LOOP
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>         ORG     $C000
>         LDAA    #$00
>         STAA    DDRC
>         LDX     #$D000
> 
> START   CLR     ONECTR
> LOOP    JSR     READBIT
>         BCC     ZEROBIT
>         INC     ONECTR
>         BRA     LOOP
> ZEROBIT LDAA    ONECTR
>         CMPA    #9
>         BLO     START
> 
> READF   LDAB    #$08
>         STAB    MEM
> READFRAME       JSR     READBIT
>         ROLA
>         DEC     MEM
>         BNE     READFRAME
>         STAA    0,X
>         INX
>         JSR     READBIT
>         BCC     READF
>         SWI
> 
> READBIT TST     PORTC
>         BPL     READBIT
> HERE    TST     PORTC
>         BMI     HERE
>         LDY     #$01D7
>         JSR     DELAY
>         LDAB    PORTC
>         EORB    #$80
>         ROLB
>         RTS
> 
> DELAY DEY
>         BNE   DELAY
>       RTS
> 
> MEM     RMB     1
> ONECTR RMB      1
>         END

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	Wade T. Braden       Email:  wbraden at ryker.itech.cup.edu
        408 Burton Ave.      Web:  http://www.itech.cup.edu/~wbraden/      
      Washington, PA 15301   Major:  Electrical Engineering Tecnology	   
        (412)222-8964    	      at California University of PA
-=-=-=-=-=--=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




More information about the Diy_efi mailing list