Nano SocketLAN connection to PIC


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2011
    Posts
    35

    Default Nano SocketLAN connection to PIC

    When connecting a Nano SocketLAN module to a PIC, should I use the hardware UART on the PIC itself, or use other I/O pins so I can use SERIN2/SEROUT2 and invert the signal?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nano SocketLAN connection to PIC

    Depends if you want to use interrupts easily or not.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jul 2011
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: Nano SocketLAN connection to PIC

    What does that mean? Interrupts on a serial connection to a PC via the RS232 port, or interrupts via a serial connection to the SocketLAN? Just say what you mean. The point of my question was the polarity of the serial connection to the SocketLAN, but what are the interrupt considerations?

  4. #4
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Nano SocketLAN connection to PIC

    If you use SERIN, frequent interrupt may cause problem while receiving data. If you use HSERIN you can use interrupt to receive, or interrupt can occur while receiving data, without any problem.
    And when using SERIN if Rx pin is pulled low(eg when module is turned off), timeout will newer expire...

  5. #5
    Join Date
    Jul 2011
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: Nano SocketLAN connection to PIC

    Quote Originally Posted by pedja089 View Post
    If you use SERIN, frequent interrupt may cause problem while receiving data. If you use HSERIN you can use interrupt to receive, or interrupt can occur while receiving data, without any problem.
    And when using SERIN if Rx pin is pulled low(eg when module is turned off), timeout will newer expire...
    My immediate inclination was to try to use the hardware serial port, and use DT_INT RX_INT for the hardware interrupt, but because I don't have the flexibility of inverting the polarity of the in/out with the hardware uart, I was just looking for confirmation that, Yes, I do need inverters on the in and out before feeding the SocketLAN. My brain hadn't gotten around to interrupts yet, but know enough now to think about them right away. Thanks for your reply!

  6. #6
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Nano SocketLAN connection to PIC

    Are you sure that you need inverter?
    Hava look http://www.connectone.com/media/uplo...N_overview.jpg
    It is TTL uart on both sides.
    You need inverter or level converter if you trying to connect TLL and RS232.
    By the way, some pic can invert hardware uart levels.

  7. #7
    Join Date
    Jul 2011
    Posts
    35


    Did you find this post helpful? Yes | No

    Smile Re: Nano SocketLAN connection to PIC

    Well, no, I'm not SURE, but I think so. For example, on the SocketLAN demo board the serial data just comes out of the LAN module, and goes through a MAX232 inverter/level shifter and out to the PC serial connection. The hardware uart on the PIC assumes that you're going through a similar driver IC (I think)... and if you're staying in the TTL world, that would mean an inverter only. I should get my SocketLAN today, so will just wait and set it up on the bench. At least I've decided to use the hardware serial port and the interrupt question has been answered. I'm just going to lay out a small motherboard for the SocketLAN. We'll just answer the inverter question today or tomorrow.

  8. #8
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Nano SocketLAN connection to PIC

    When connecting to a PC it is necessary to both invert the logic and convert the voltage levels but when connecting to an embedded TTL device, there's no need for either as it outputs TTL levels with positive logic. You will need level conversion if your microcontroller is powered by +5V but that's far simpler than a MAX232.

  9. #9
    Join Date
    Jul 2011
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: Nano SocketLAN connection to PIC

    OK! The voice of authority! As long as the polarity of the PIC's hardware uart is right for the SocketLAN, life is good. I DO need level conversion from 5V to 3.3V and will use the SN74LVC2G07 with a pullup to the appropriate power supply on the outputs. Thanks to both of you.

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