Memory


Closed Thread
Results 1 to 6 of 6

Thread: Memory

  1. #1
    Join Date
    Jan 2008
    Posts
    7

    Default Memory

    hello,
    i am looking to set up a circuit where i will have two (or more) PICs reading from the same memory - how can this be done?
    thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    There are many ways of doing it.

    What kind of "memory" is it?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Jan 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    what i want to do is run a system where i have two pics each with information being inputted - the information from each pic needs to be avaliable to the other pic to read from.

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Cleas,

    Be more specific,

    give details,

    provide drafts, charts, logic flow, concept schematic....

    What kind of information, coming from where?

    Who or what is sending the information?

    ------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cleas001 View Post
    what i want to do is run a system where i have two pics each with information being inputted - the information from each pic needs to be avaliable to the other pic to read from.
    Off the top of my head...
    2 PICs, 1 EEPROM, both connected like they own the thing.
    If one PIC wants it, check the SCL/SDA manually before accessing it.
    Or add a 3rd wire for signalling, pulled high. If the wire is low, one of the PICs is using the EEPROM.

  6. #6


    Did you find this post helpful? Yes | No

    Default Third wire better

    I have many PICs in a peer to peer network and they all swap messages between each other. This requirement is a simple version of that.

    I would use a handshake line that each device checks before reading or writing. You could monitor SDA and SCL but these are dynamic and a snapshot may look like no activity when in fact it is busy.

    I would have four 4k7 from Vcc to the two PIC SDA and SCL lines plus two 4k7 from supply to the contention pins on each PIC. When not wanting access to the memory, the SDA, SCL and the contention pin are set as inputs so they are all pulled high by the resistors. When a device wants memory access it checks that the contention line is high (no activity state) then pulls it low and starts the SDA, SCL memory data exchange. When the message is over the sending PIC returns all lines to inputs and they are pulled high ready for the next data transfer.

    During debugging you can be certain that both PICs will fight and so use series limiting resistors wherever there is a direct PIC to PIC connection. 470 Ohms will do it.

    HTH
    Brian
    Last edited by BrianT; - 30th January 2008 at 10:14. Reason: grammar

Similar Threads

  1. Need the code to write to a memory
    By Hamlet in forum General
    Replies: 0
    Last Post: - 20th August 2007, 00:22
  2. Replies: 4
    Last Post: - 2nd March 2007, 06:12
  3. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 02:37
  4. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 18:38
  5. memory button
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th February 2006, 09:47

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