Difference: MassStorage (11 vs. 12)

Revision 122019-02-01 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 307 to 307
 

Added:
>
>
Mini Boot Loader

Mini Boot Loader

        ; MSB first

        LDI     xyz          ; EEPROM read command
        PLO     R9
        LDI     0
        PLO     R7           ; set page pointer
        PHI     R8           ; set EEPROM address
        PLO     R8 
        LDI     0x80
        PHI     R7           ; set block pointer
BLOCKLOOP:

        GLO     R9           ; write read command to the EEPROM
        PLO     R5
        CALL    WRITEBYTE
        LDI     0            ; address bit 17 to 24
        PLO     R5
        CALL    WRITEBYTE
        GHI     R8           ; address bit 8 to 16
        PLO     R5
        CALL    WRITEBYTE
        GLO     R8           ; address bit 8 to 16
        PLO     R5

PAGELOOP:
        LDI     0            ; init read byte
        PLO     R5 
        LDI     0xFF         ; for the carry bits
        PHI     R6          
        LDI     0xFF - 8     ; counting up 8 times
        PLO     R6           ; bit counter
        SEX     R6           ; dummy Rx for OUT
RDBITLOOP:
        OUT2                 ; CLK for SPI, INC Rx
        GHI     R6           ; set CARRY
        SHRC
        GLO     R5
        B2      SETBIT       ; branch if bit set
        SHL                  ; bit not set
        BR      SAVEBIT      
SETBIT:
        SHLC
SAVEBIT:
        PLO     R5
        GLO     R6
        BNZ     BITLOOP
        GLO     R5           ; get byte


WRITEBYTE:
        LDI     0            
        PHI     R6
        LDI     8
        PLO     R6
        SEX     R0
WRBITLOOP:
        GLO     R5           ; get the next bit
        SHLC                 , next bit is in the carry
        PLO     R5
        LSNF
        OUT2,0b00000000      ; CLK for SPI with data bit cleared
        LSDF
        OUT2,0b00000001      ; CLK for SPI with data bit set 
        DEC     R6
        GLO     R6
        BNZ     BITLOOP



 
Kermit/ZModem

Kermit/ZModem

What about using KERMIT or ZMODEM protocol for the file transfer and use
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback