chiark / gitweb /
some debugging macros
authorian <ian>
Sun, 27 Apr 2008 12:19:09 +0000 (12:19 +0000)
committerian <ian>
Sun, 27 Apr 2008 12:19:09 +0000 (12:19 +0000)
detpic/nmra-stream.asm
hostside/TODO

index ba5f3991e086dfe5f6f85b5adc5c1ca08e7a0bcc..035f13af28055ff5d5086aeeb7293dff368f805f 100644 (file)
@@ -319,7 +319,7 @@ master_interrupt_high @
        bra     master_interrupt_high_notnmra
        ; timer0 interrupt
 
-       debug   ','     ; write 'j' to serial port
+       debug   ','     ; write ',' to serial port
        bc_fa   INTCON,TMR0IF   ; clear interrupt-set bit
 
        ifdef   SLOW_VERSION
@@ -438,11 +438,11 @@ advance_pointer
 ; currently on bit 7 of the byte, after having read rest of byte to
 ; track; check whether it is 1 or 0
 
-; if set, move to next buffer
+; if clear, move to next buffer
        bt_fa_if0 INDF2,7
        rcall   advance_read_buffer
 
-; if not set, move to next byte of samebuffer (increment totrack)
+; if set, move to next byte of samebuffer (increment totrack)
 ; (will be on bit 7 at this point anyway so no need to change totrackbit)
        bt_fa_if1 INDF2,7
        inc_fa  totrack
index edc3f070b1b9ed43e495e3e76f7e542d138f21e2..f914927afbb33770f0c5e22b7e19cfe3bd0de87f 100644 (file)
@@ -10,6 +10,25 @@ bugs
        multiple motions handling is wrong: deadline miscalculated etc.
                deadline should be start deadline and we should sub length
 
+       had strange thing where polarity command caused pic to send
+               nmra completion messages or other strange messages:
+
+liberator:hostside> ../iwjpictest/hexterm /dev/ttyUSB0
+  0| 28 89 52 89  52 10 90 20  10 90 80 00  01 90 80 00 | (.R. R... .... .... |
+        ~~~~~        ~~        ~~~~~~~~~~~  ^^ ~~~~~~~~
+ 10| 01 90 80 00  01 09 90 80  00 11 98 20  28 10 90 20 | .... .... .... (... |
+     ^^ ~~~~~~~~  ^^|   ~~~~~~~~~~~~           ~~
+ 20| 90 80 00                                           | ..._                |
+
+here ^^ are the unexpected messages, ~~ are things shown in bold
+ie which I typed, and | means we switched to programming mode and
+back (damn! should have dumped!)
+
+               seems to be a pic bug
+
+       in nmra-stream.asm:toggle_output should use LATC not PORTC?
+
+
 want to
        document commands [!]movfeat and speed
        stop all trains command ?