Memory


Closed Thread
Results 1 to 6 of 6

Thread: Memory

Hybrid View

  1. #1


    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 11: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, 01:22
  2. Replies: 4
    Last Post: - 2nd March 2007, 07:12
  3. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 03:37
  4. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 19:38
  5. memory button
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th February 2006, 10:47

Members who have read this thread : 0

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