Shop OBEX P1 Docs P2 Docs Learn Events
Parallel IN to memory quickly... — Parallax Forums

Parallel IN to memory quickly...

MyYz400MyYz400 Posts: 11
edited 2010-03-23 00:13 in General Discussion
If I had a 8 or 12 bit parallel signal coming into the SX on 8 to 12 pins respectfully, is there a nice neat way of reading all inputs and storing this information with as little clock cycles as possibly? I would like to create a simple quick data acquisition system that reads the parallel information in, stores it, then I can waste my time later on reading it out of the memory. Any one able to give me some pointers?

Comments

  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2010-03-19 18:42
    do you mean external memory, or the SX memory? If SX memory then...

    Connect low order 8 bits to port b1-7 and high 4 remaning bits to port c0-3 then.

    mov var1,rb
    mov var2,rc

    4 cycles.
  • MyYz400MyYz400 Posts: 11
    edited 2010-03-19 18:54
    Well after looking at it some more, I will just stick with 8-bit (easier that way). I guess to keep things simple I could use the onboard RAM, but thats only 136 bytes... it's not much. I dont know much about microcontrollers (even tho I own the SX project kit). I assume ram is easy to put the data in, but the EE/FLASH memory is mostly for the programing. But with a max clock cycle of 75MIPS, that only leave 7.5 instruction cycles per sample, which really isnt enough. Am I thinking in the wrong way? How do these big time digital storage oscilloscope guys do it?
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2010-03-19 19:13
    I don't know how the storage scopes do it. The SX's flash memory is NOT writable by the program and it has no EEPROM, so you would definitely need an external memory of some sort, probably SRAM would be the only thing fast enough. If you have 8 bit's in to the SX and 8bits out to the SRAM, then you're probably going to need an SX48 for the address lines to the SRAM. That's going to take at least the other 16 pins, and then you'd only be able to address 64k in theory, not including control lines. Serial memory won't be fast enough for 7.5 cycles. It might be doable, but it'll be a squeeze.

    Post Edited (Shmoopy) : 3/23/2010 12:16:36 AM GMT
  • ZootZoot Posts: 2,227
    edited 2010-03-22 21:38
    Shmoopy said...
    The SX's flash memory is writable by the program

    This is incorrect. The "flash" memory is program/data space and is only writable by an SX-Key or similar programmer. Essentially, this space is "burned" with the program from a host PC; once the chip is running, the flash can't be changed.

    Any location in flash may be read by the program. There is no internal EEPROM as Shmoopy noted. If you actually need to save all the incoming data, and say, a 32 word buffer is not big enough, you may want to consider a Propeller which has more internal RAM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2010-03-23 00:13
    It was a typo, I meant to write "is not". Thanks for the catch.
Sign In or Register to comment.