Shop OBEX P1 Docs P2 Docs Learn Events
Using ROM with the propeller — Parallax Forums

Using ROM with the propeller

beazleybubbeazleybub Posts: 102
edited 2009-06-09 19:28 in Propeller 1
I would like to use·a·prop to playback .WAV files using the WAV player in the object exchange.
http://obex.parallax.com/objects/324/

I would like the·.WAV files·to be on a permanent media. Can a ROM be used?

Thanks!


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-09 15:55
    ROM usually refers to masked ROM where the data is specified when the chip is manufactured. That's probably not what you mean.

    The simplest solution would be something like an EEPROM or other flash memory depending on how much memory you need. These usually have a WP (write protect) pin that prevents writing to the memory and you can wire that to a jumper on your board so that the jumper has to be in place to write to the device (to initialize it).

    The "best" solution depends a lot on how much WAV data you want to have around. If it's less than 128K, then an Atmel 24C1024B EEPROM would be the simplest solution. You could even wire it to the same I/O pins as the boot EEPROM. Up to 2M, a Winbond SPI flash memory chip (W25X16BV) would work well. There are other flash memory chips on the market, but this one is simple to use and comes in a PDIP8 package.

    You can always use an SD card. Rokicki's routines don't check the write protect switch in the card socket, but you can remove or disable the write routines in his SD card library so that someone would have to deliberately try to delete or overwrite the WAV files by downloading a program into the Propeller to do that. Your program wouldn't be able to accidentally modify the SD card.
  • RaymanRayman Posts: 14,833
    edited 2009-06-09 16:02
    I think SD cards all have a write protect switch on them...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-09 16:21
    SD cards have a little plastic tab on them that's labelled "write protect". This triggers a switch in the card socket which may or may not be connected to anything. In the case of the Propeller, it's not normally connected. Any of the existing SD card routines will happily write to a "write protected" card.
  • beazleybubbeazleybub Posts: 102
    edited 2009-06-09 16:25
    Mike you are right, I just meant I wanted to be able to write the WAV file·to an external memory source and keep it from being easily erased or intentionally changed·by another person.

    I did not want to go with SD because it can be removed from the device.

    I have used FM24C04A·FRAM·in the past and with good results. I completely forgot about the write protection features!

    Thank you. [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    How can there be·nothing? Nothing is something!
  • RaymanRayman Posts: 14,833
    edited 2009-06-09 16:27
    I didn't know that! I'm kinda surprised... Well, now I'm glad that I've implement a write-protect circuit in my PSM design... I didn't think it really had any value until now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • dMajodMajo Posts: 855
    edited 2009-06-09 16:40
    @Mike

    Are you sure?

    I thought that SD because of built-in "intelligence" (eg. anti-wearing algorithms, communication protocol) have at least a simple state machine and will prevent writing if write protection is enabled. I thought that the switch on the SD holder is only to signal to the external world (the host) that write protection is active.
  • mparkmpark Posts: 1,305
    edited 2009-06-09 19:28
    Mike is correct. I've written to a supposedly write-protected SD card.
Sign In or Register to comment.