chiark / gitweb /
start scanning with board 1, not 2. trying to debug it still ...
authorian <ian>
Fri, 30 Dec 2005 04:08:00 +0000 (04:08 +0000)
committerian <ian>
Fri, 30 Dec 2005 04:08:00 +0000 (04:08 +0000)
detpic/mascan.asm
detpic/serout.asm

index 0a0978c9d3b757f36e8033976e233dd5835feefa..159650d96ad1d2558b755b0342264a832f94b5b9 100644 (file)
@@ -65,6 +65,7 @@ i2cmu_read_got_byte
                                ; W =           received byte
        mov_wf  b               ; W = b =       received byte
 
+ panic morse_TI4
        mov_lfsr slavetable, 1
        mov_ff  cslot, FSR1L    ; FSR1 ->       slave's flags
 
@@ -220,8 +221,6 @@ nextslave_nowrite
        return  ; do not scan while booster PWM is off while polarising
                ; to avoid all trains disappearing and reappearing
 
- return ; do not scan yet
-
        neg_fw  outmsg_begin
        add_wfw outmsg_end
        and_lw  outbuf_size - 1
@@ -235,6 +234,7 @@ nextslave_nowrite
        mov_lfsr slavetable, 1  ; FSR1H -> slavetable
        mov_ff  cslot, FSR1L    ; FSR1 -> new ste_flags
 
+ panic morse_TI3
        bt_f_if1 POSTDEC1, stf_sentinel ; FSR1 -> ste_slave
        bra     nextslave_looparound
        ; Ok, we have a slave:
@@ -279,8 +279,8 @@ i2c_consider_restartread @
 ; INITIALISATION
 
 mascan_init @
-       mov_lw  (slavetable + ste_flags + ste_size) & 0xff
-                ; start with 1st actual slave
+       mov_lw  (slavetable + ste_flags) & 0xff
+                ; pretend we've just done us, to start with 1st actual slave
        mov_wf  cslot
        clr_f   cbyte
        bs_f    cbyte, cbyte_halted ; serial output of `hello' will start us up
@@ -441,6 +441,7 @@ addmsg_one
 ;  TOS - 4 ->  bt_f_if1 w, b'bbb'
 ;  TOSL                ???bbb00
 ; other conditions on entry and exit as for entry to addmsgs_<kind>, above
+ panic morse_TI5
        rr_fw   TOSL            ; W =           0???bbb0
        rr_w                    ; W =           00???bbb
        ior_wfw 0xf8            ; W =           11111bbb
index 377c5558e76cf4402bfa75937090e581a4dece64..85da2c746b0cafa7ac9875839173de83eaaca37b 100644 (file)
@@ -92,6 +92,9 @@ serialtxfc_init @
 ;======================================================================
 ; ACTUAL TRANSMISSION
 
+boo
+ panic morse_TI1
+
 ;----------------------------------------------------------------------
 serialtx_intrl @
        ; are we ready to transmit ?
@@ -107,6 +110,9 @@ serialtx_intrl @
        xor_wfw outmsg_end
        bra_z   tx_bufempty
 
+ mov_fw        INDF0
+ xor_lw 0x02
+ bra_z boo
        mov_fw  INDF0
        mov_wf  TXREG
        bra_n   tx_justsent_noacknmra