Shop OBEX P1 Docs P2 Docs Learn Events
possible useful memory trick — Parallax Forums

possible useful memory trick

Graham StablerGraham Stabler Posts: 2,510
edited 2007-11-14 20:09 in Propeller 1
This seemed quite interesting:

elm-chan.org/docs/avr/avrdma_e.html

Graham

Comments

  • Mike HuseltonMike Huselton Posts: 746
    edited 2007-11-13 19:40
    I found this pseudo DMA technique intriguing. Maybe this can go in the Prop bag of tricks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • deSilvadeSilva Posts: 2,967
    edited 2007-11-14 00:27
    Assume we use I/O 8..23 as address register, and some other I/Os 0...7 as (masks!) MEMRD and DMAWR

       MOV rep, #blcksize
       MOV addr, startaddr
       SHL addr, #8
       OR addr, #<MEMRD
    loop
       ANDN OUTA, addrRdWrMask  ' $FFFF03  e.g.
       OR OUTA, addr
       ADD addr, #256 
       OR OUTA, #|<DMAWR         ' give 100 ns to read memory
       DJNZ rep, #loop                 ' give 100 ns to send it
    
    


    Will be 250 ns = 4 MByte/s
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-11-14 13:24
    Wow....I have all kinds of lightbulbs going on in my head! smile.gif Perhaps using an external SRAM for a graphics controller!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • hippyhippy Posts: 1,981
    edited 2007-11-14 20:09
    It's a useful trick; I had a 32KB SRAM scheme using 2-bits to generate a video stream before the Propeller made that redundant.

    If one wants to minimise I/O usage, RAM addressing can be done through an external counter, read via an 8-to-1 multiplexor and output via a 1-to-8 bit settable latch. That slows down access to RAM but the raw DMA can run just as quickly. With a bit of logic on the clocking line ( another counter and some gates ), it should be possible to blat the data across at very high speed by using the internal CTRA/CTRB. Even closer to DMA with the Propeller just providing the clock rate.
Sign In or Register to comment.