Shop OBEX P1 Docs P2 Docs Learn Events
Write/Read bits — Parallax Forums

Write/Read bits

gambrinogambrino Posts: 28
edited 2008-12-13 21:48 in Propeller 1
Hello Forum,
i would like to ask if someone can guide me to write a program which can write 128x64 = 8192 bits to the memory and to read those bits 128 bits after another 128 and ect... 64 times .Is in the library something maybe similar?

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2008-12-13 21:48
    Hello Gambrino,

    which memory ?

    HUB-RAM or EEPROM ?

    128 bits is 4 longs

    so read/write 4 longs and repeat this 64 times

    As the propeller is a 32bit-CPU the only way to do this is to
    make 128 Bits / 32Bits = 4 parts out of the 128 bits
    storing each part in a long

    VAR
      LongArray[noparse][[/noparse] 4]
    
    repeat 64
      longArray[noparse][[/noparse] 0] := bits_00_031
      longArray[noparse][[/noparse] 1] := bits_32_063
      longArray[noparse][[/noparse] 2] := bits_64_095
      longArray[noparse][[/noparse] 3] := bits_96_128
    
    
    
    



    could you write in DETAIL what you're trying to do with the whole project ?

    I like to have an overview and with an overview I often find better solutions than just knowing one detail

    Where and how are the bits coming in/out?

    best regards

    Stefan
Sign In or Register to comment.