how to buffer serial data on pic?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    With that much data, you may want to consider an EEPROM chip as your buffer.

    For example, the Microchip 24FC512 can store 65536 bytes so it could only just fit one of your packets.

    They are pretty easy to use with the I2CREAD and I2CWRITE PBP commands.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    I would be inclined to use an SRAM chip and use an entire 8 bit port to write the data to it. EEPROM would be a lot slower and unless there is a need to retain the info permanently then static ram would be the fastest way to do it IMHO
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    970


    Did you find this post helpful? Yes | No

    Default

    Serial or even Parallel eeprom is definitely slowww. SRAM is definitely the way to do this. The modem transfer part is bound to be intermittent and anything short of buffering the entire image before sending will cause trouble. One moment I was hoping I could suggest a MiniSD card storage; however, that too is flash memory and is slow.

    If you can start and stop the camera data transfer via some protocol on your PIC device, maybe like a simple xon/xoff handshake too might help to slow down the camera side transfer to what your PIC can manage and then stream out the data on the fly.

  4. #4
    Join Date
    Jan 2009
    Location
    LECCE - ITALY
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Thankyou for reply at all,
    I think to transfer the data byte to byte at 115200 baud (or 57600 baud) to external memory ram, eeprom or sd card is too slowly operation in data stream. Time to write is too long betwen bytes
    The camera sends the packet after a comand and I can't stop it (use tx and rx only)



    Quote Originally Posted by Jerson View Post
    Serial or even Parallel eeprom is definitely slowww. SRAM is definitely the way to do this. The modem transfer part is bound to be intermittent and anything short of buffering the entire image before sending will cause trouble. One moment I was hoping I could suggest a MiniSD card storage; however, that too is flash memory and is slow.
    If you can start and stop the camera data transfer via some protocol on your PIC device, maybe like a simple xon/xoff handshake too might help to slow down the camera side transfer to what your PIC can manage and then stream out the data on the fly.

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Writing to external RAM (static) will be plenty fast. You have 87uSec betwen bytes. That is over 400 processor cycles.

    But the problem you will have with a simple parallel device is you probably don't have enough pins to do the addressing directly. If you had 3.5 free ports, you could use two for the address, one for the data, and 2 or 3 bits for the handshaking. An address latch scheme would allow you do do everything with 14 bits or so, but that would take some '374s (or equiv).

    Or you could set up the address with a shift register.
    Charles Linquist

  6. #6
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Look for FRAM or serial SRAM

    Best option is to do a quick search for serial RAM. Few days back something pretty similar was discussed. Look at the following post: http://www.picbasic.co.uk/forum/showthread.php?t=12766

    With an FRAM IC or a serial SRAM IC you can have your cake and eat it too. Need a PIC with HW SPI (4 lines), which the pic18f2620 does, and you are in business. At 14,400_bytes-sec input rate (115200bps), you could be buffering the data into RAM at a rate close to 625_bytes-sec (yes this is 5Mbit-sec). If this is not enough I do not know what is. Key in all this is the SPI bus capability in both the memory and the PIC.

    FRAM is specific to RAMTRON, but is non-volatile (a bit expensive). Serial SRAM can be found from OnSemi, Microchip, and others...

  7. #7
    Join Date
    Jan 2009
    Location
    LECCE - ITALY
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    I think the solutin of the serial ram is possible on spi or I2c.
    What chip can I try? I need 64 Kbytes
    AT24C1024 is eeprom, I hope it's too slowly also at 57600 baud from camera
    thanks for reply




    [QUOTE = languer; 86.812] opzione migliore è quella di fare una rapida ricerca per [I] [RAM di serie / I]. Pochi giorni indietro qualcosa di molto simile è stato discusso. Guardate il post seguente: [url] http://www.picbasic.co.uk/forum/showthread.php?t=12766 [/ url]

    Con un IC FRAM o una serie di IC SRAM si può avere la botte piena e moglie ubriaca. Bisogno di un PIC con HW SPI (4 linee), che il pic18f2620 fa, e si è in affari. A 14.400 tasso di ingresso _bytes-sec (115200 bps), lei potrebbe essere il buffering dei dati in RAM ad un tasso vicino al 625_bytes-sec (sì questa è 5Mbit-sec). Se questo non è sufficiente io non so cosa sia. Chiave in tutto questo è la capacità bus SPI sia la memoria e il PIC.

    FRAM è specifico per RAMTRON, ma è non volatile (un po 'costoso). SRAM seriale può essere trovato da OnSemi, Microchip, e altri ...[/ QUOTE]

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts