Is it possible to daisy chain several PICs via serin/serout statements?


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2013
    Posts
    1,117

    Default Is it possible to daisy chain several PICs via serin/serout statements?

    Hello.

    I have a device which controls specific led module, it is based on PIC16F722 and is driven via 1 wire serial interface.
    So is it possible to connect these modules in series, to control with single pin?
    Each module receives 8 bytes of data from host.
    So say I want to connect in series 8 of such modules, this means that first module should receive first 8 bytes and so something with them as needed, and forward next incoming bytes to the next module and so on. But how to do this?

    I understand this as there is an array with 64 byte size. The first module receives that 64 byte "packet" and then outputs 64-8=56 bytes to the next module, which receives it, does whatever needed and then forwards 56-8=48 bytes to the output and so on.

    Technically, I can "hard code" such modules, and that will work, but is there a possibility to do this in an infinite way? like serial connection of 74HC595 shift registers?

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default Re: Is it possible to daisy chain several PICs via serin/serout statements?

    Typically you would do something like this using RS485 for control systems or DMX for lighting.

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,065


    Did you find this post helpful? Yes | No

    Default Re: Is it possible to daisy chain several PICs via serin/serout statements?

    What you describe is something like what addressable led strips use, like WS2812B and APA102 to name a couple of these.

    This, as you said can be made with arrays. It is the responsibility of the host device to send the appropriate number of bytes to the slave devices.

    If the bytes are less the further devices will not get the data they need. If bytes are more, some will just get lost.

    The downside as I see it, is the small speed you will obtain.

    So, as Jerson noted, a protocol like RS485 is always better solution and more robust. Plus faster.

    In any case if you want it simple, use Hserin/Hserout.

    Ioannis

Similar Threads

  1. Serout -->>> serin
    By larzazral in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th February 2010, 04:46
  2. serin and serout
    By yeelooi in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th December 2007, 09:35
  3. Retrieving infos from multiple PICs on a bus/chain
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th October 2007, 05:42
  4. serin,serout
    By andrewwaack in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th July 2006, 20:21
  5. serin/serout
    By simonr in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th September 2003, 19:45

Members who have read this thread : 9

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