Difference: McForth (12 vs. 13)

Revision 132019-01-19 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 227 to 227
 
  • BCM 8 (SPI0 CS0) IN7
  • BCM 7 (SPI0 CS1) O0
Added:
>
>

Read Byte


CS0     EQU     0b1101111
CS1     EQU     0b0010000
CLK0    EQU     0b1011111
CLK1    EQU     0b0100000
DATA0   EQU     0b0111111
DATA1   EQU     0b1000000

        ; MSB first

        LDI     0
        PLO     R5
        LDI     0xFF
        PHI     R6
        LDI     0xFF - 8
        PLO     R6
        SEX     R0
BITLOOP:
        OUT4,0b01000000      ; CLK for SPI 
        OUT4,0b00000000
        INC     R6
        GHI     R6           ; set CARRY
        SHRC
        GLO     R5
        B4      SETBIT       ; branch if bit set
        SHR                  ; bit not set
        BR      SAVEBIT      
SETBIT:
        SHRC
SAVEBIT:
        PLO     R5
        GLO     R6
        BNZ     BITLOOP

about 230 cycles for one byte -> 1 ms -> 1 KiB takes about 1 s @ 1.79 MHz

 

Serial EEPROM patched on MC PCB

Line: 243 to 283
 
  J2.14 WAIT/ 7 /HOLD direct
    4 GND GND
Added:
>
>

Read Byte

        ; MSB first

        LDI     0
        PLO     R5
        LDI     0xFF
        PHI     R6
        LDI     0xFF - 8
        PLO     R6
        SEX     R6
BITLOOP:
        OUT2                 ; CLK for SPI, INC Rx
        GHI     R6           ; set CARRY
        SHRC
        GLO     R5
        B2      SETBIT       ; branch if bit set
        SHR                  ; bit not set
        BR      SAVEBIT      
SETBIT:
        SHRC
SAVEBIT:
        PLO     R5
        GLO     R6
        BNZ     BITLOOP

about 200 cycles for one byte -> 1 ms -> 1 KiB takes about 1 s

Write Byte

 

Kermit/ZModem

Line: 258 to 330
 

Spare Time Gizmo’s ELF2K ROM for RaspiElf

Changed:
<
<
http://www.retrotechnology.com/memship/elf2k_mship.html
>
>
Herb Johnson's ELF 2K ROM for 1802 Membership Card

v88.hex from the Spare Time Gizmos web site.

 
pi@cosmac:~/elf/elf2k $ cp v88.hex v88.hex.org

 
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