Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Found unknown device id [solved]
#4
Thanks. In the code you have both DEN=1 and TXEN=1 what are those?

Running at 1MHz each instruction takes 4us to execute. There are three NOPs in the firmware after the tx enable pin is set high, that equals 12us which should be enough according to your code. You could however insert one or more NOPs just to rule that out.

Also insert a NOP or two after the byte has been sent. See below.

If possible, try a lower baud rate and/or higher frequency.

In ds30loader.asm
Code:
;------------------------------------------------------------------------------
; Send()
;------------------------------------------------------------------------------        
Send    ; Enable tx
        ifdef USE_TXENABLE
            banksel    PORTR_TXE
            bsf    PORTR_TXE, PORTB_TXE
            nop        ;needed?
            nop
            nop
-----------insert 1 more NOP here-------------------
        endif        
        ;Send byte
        banksel    TXREG_
        movwf     TXREG_            ;bank 0/3
        ; Wait for transmit shift register to get empty
        banksel    TXSTA_    
txwait    btfss    TXSTA_, TRMT    ;bank 1/3
        goto    txwait
        ; Disable tx
        ifdef USE_TXENABLE

-----------insert 1-3 NOPs here-------------------
            banksel    PORTR_TXE
            bcf    PORTR_TXE, PORTB_TXE    ;bank ?
        endif
        ; Send complete
        return
Reply


Messages In This Thread
Found unknown device id [solved] - by Rigor69 - 2011-12-26, 00:54:54
RE: Found unknown device id - by Rigor69 - 2011-12-26, 22:48:07
RE: Found unknown device id - by Mikael Gustavsson - 2011-12-28, 02:59:30
RE: Found unknown device id - by Rigor69 - 2011-12-30, 13:02:25
RE: Found unknown device id - by Rigor69 - 2011-12-31, 15:07:00
RE: Found unknown device id - by Rigor69 - 2012-01-01, 18:47:59

Forum Jump:


Users browsing this thread: 2 Guest(s)