Shop OBEX P1 Docs P2 Docs Learn Events
Memory Access — Parallax Forums

Memory Access

Hi,
I am working on a new application for the Propeller that will write to and read from an external memory.

Testing will be performed on the Propeller Activity board using the removable memory chip.

I cannot locate "C" code for writing to and reading from the memory. Can you supply a reference to some working code?

My application uses COG 4 to calculate a long file of numbers then stores this file in the Activity Board memory.

COG 5 and COG 6 use a synchronized clock to read numbers from the memory and send digital data from OUTPUT 10 and OUTPUT 11 using COG 5 and digital data from OUTPUT 12 and OUTPUT 13 using COG 6.

How do I use "C" code to write to and read from the Activity Board external memory?

Sincerely,

Discovery

Comments

  • One clarification is needed. My application will use two memories each written to by COG 4. COG 5 will access memory A while COG 6 will access memory B.

    Discovery
  • What kind of memory (part numbers please) and exactly how is it to be connected?
  • If you are talking about using a SD card there is a tutorial that can be a starting point at this link.

    learn.parallax.com/tutorials/language/propeller-c/propeller-c-simple-devices/sd-card-data

    Tom
  • My plan is to use the same memory as that on the Propeller Activity Board which is a SanDisk 8GB Micro SD HC memory.

    This way, when I checkout the code on the Activity Board I am assured that it will operate properly on my PC board...when it is made.

    I will checkout the link..thank you.

    Just a thought...how much memory space is available in each COG? There might be a chance that the memory in each COG may do the job.

    I figure to use about 1 GB per memory.

    Sincerely,

    Discovery
  • kwinnkwinn Posts: 8,697
    Discovery wrote: »
    My plan is to use the same memory as that on the Propeller Activity Board which is a SanDisk 8GB Micro SD HC memory.

    .........

    Just a thought...how much memory space is available in each COG? There might be a chance that the memory in each COG may do the job.

    I figure to use about 1 GB per memory.

    Sincerely,

    Discovery

    Nowhere near that much memory in the whole propeller. A cog has 512 x 32 bits (2K), of which 496 x 32 can be used.
  • Okay...I have the tutorial. Now for some testing.

    Thank you,

    Discovery
  • Hi twm47099,

    I performed the lesson and it worked fine.

    However, in the first paragraph it states "Later, we'll look at... code that can run from an SD card".

    That portion of the lesson is missing.

    Do you know where it is?

    I would like to write a small amount of code that resides in the SD card, reads the data stored in the SD card, then drives propeller outputs from the SD card.

    Discovery
  • Mike GreenMike Green Posts: 23,101
    edited 2017-01-05 18:21
    There are several "operating systems" for a Propeller and an SD card available in these forums and in the Propeller Object Exchange. Cluso99 has one and FemtoBasic will act as a simple one. Both can be used to load and run Spin programs from an SD card. Kwabena W. Agyeman's SD card library has a subroutine that loads and runs a Spin program from the SD card. You write and compile the small program, then copy the binary (*.bin) to an SD card file.
  • Cluso99Cluso99 Posts: 18,069
    Here is the link to my OS. It uses the serial terminal but that can be changed simply - I have used the 1pin keyboard and 1pin copisite monochrome video too.

    https://forums.parallax.com/discussion/138251/cluso-s-propeller-os-v1-14-now-with-spin-pasm-compiler-eeprom-read-write/p1
Sign In or Register to comment.