Share MCU Pin between enc28j60 and mcp3202


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2010
    Location
    brazil
    Posts
    7

    Default Share MCU Pin between enc28j60 and mcp3202

    Hi,

    How can I share pins used with mcp3202 and enc28j60 ?

    The CS must be diferent pin ??
    Can I use SI and SO in the same MCU port with enc28j60 with AND GATE (up to 5v the signal) on ENC output ? I do it using mcp3202
    CLK pin may be the same for both chips ?

    My mcu is pic18f4550

    Thanks a lot

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Share MCU Pin between enc28j60 and mcp3202

    Typical SPI design allows the CLK, SOUT, and SIN signals to be shared between multiple devices. This is because the CS pin is used to determine which part is active on the bus. So the CS pin of each device needs to be a dedicated I/O pin.
    Tim Barr

  3. #3
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Cool Re: Share MCU Pin between enc28j60 and mcp3202

    another option depending on your other SPI devices can be a daisy chain

    Name:  spi daisy.jpg
Views: 1509
Size:  34.0 KB

    but often this is the standard way

    Name:  spi std.jpg
Views: 1451
Size:  39.9 KB

    check with the registers and setup of the chip doco , but it looks like it conforms to standard SPI bus interface

  4. #4
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Share MCU Pin between enc28j60 and mcp3202

    Please take note that timing of the spi bus needs to be considered for the slowest device , and when not using the chips built in spi pins and registers , then you can use the PBP shiftin , shiftout command set , but dual direction spi communication is not available.

  5. #5
    Join Date
    Oct 2010
    Location
    brazil
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: Share MCU Pin between enc28j60 and mcp3202

    Hi,

    Thanks for reply

    Enc28j60 can receive 5v signal but the out pin send 3.3v ttl. What will I need to convert ?

  6. #6
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Share MCU Pin between enc28j60 and mcp3202

    one way is to run the pic at 3.3v and other spi devices at 3.3v but if thats not desirable , then use a level converter on the 3.3v device on the spi interface , mainly the data out on the spi bus of the 3.3v device , do a search on here for level converters , should find more than few posts

  7. #7
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Share MCU Pin between enc28j60 and mcp3202

    also dont enable week pullups on the spi bus when the pic is at 5v when the other device is at 3.3v ,as it can increase the current draw , its should be noted that the data out of the 3.3v device may still work ok on the spi bus depending on the speed of the spi bus and what level the logic 1 is accepted by the PIC , but level converters resolves this issue

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