Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. LAN Port Controlling Relay

LAN Port Controlling Relay

Scheduled Pinned Locked Moved Visual Basic
comhelptutorialquestion
16 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C coolerfantasy

    hi guys .. there are big misanderstand i'm not said that i will not using protection circuits i said dont need interfacing circuits such as ICs ... etc just one pin gives (1 , 0) to control something .

    D Offline
    D Offline
    Dave Kreskowiak
    wrote on last edited by
    #7

    You don't get it. First off, you don't have direct access to the pins. Well, at least not without a very special driver being written. Second, you WILL burn up the chip you connect this relay to! You MUST MUST MUST use protection circuitry in order to prevent this. Why? A little grade-school science... What happens when you run electricity through a wire?? You get a magnetic field surrounding the wire. Great! Now, what happens when the electricity is taken away from the wire?? The magnetic field goes away, right? Wrong! The magnetic field COLLAPSES and during this collapse, it generates electricity in the wire! Where do you think that power goes if the only thing you have connected to it is your precious Ethernet chip?? YES YOU NEED PROTECTION CIRCUITRY! You've been warned...

    A guide to posting questions on CodeProject[^]
    Dave Kreskowiak

    C 1 Reply Last reply
    0
    • C coolerfantasy

      to make the idea much clear and what i exactly need there is two Leds attached to the lan port , one of them is TX data which is green color , if i can just get like that signal then my problem would be solve .

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #8

      Well as I suggested earlier, it's easy. You just need to write a LAN driver that will act on your commands.

      Veni, vidi, abiit domum

      C 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You don't get it. First off, you don't have direct access to the pins. Well, at least not without a very special driver being written. Second, you WILL burn up the chip you connect this relay to! You MUST MUST MUST use protection circuitry in order to prevent this. Why? A little grade-school science... What happens when you run electricity through a wire?? You get a magnetic field surrounding the wire. Great! Now, what happens when the electricity is taken away from the wire?? The magnetic field goes away, right? Wrong! The magnetic field COLLAPSES and during this collapse, it generates electricity in the wire! Where do you think that power goes if the only thing you have connected to it is your precious Ethernet chip?? YES YOU NEED PROTECTION CIRCUITRY! You've been warned...

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        C Offline
        C Offline
        coolerfantasy
        wrote on last edited by
        #9

        If you read my last post you will find whom dont got it i said ok , yes i must use protection circuits my question out of its purpose , as a result of these posts you absolutely dont understand what i mean and now we discuss protection instead of control and signals .

        D 1 Reply Last reply
        0
        • L Lost User

          Well as I suggested earlier, it's easy. You just need to write a LAN driver that will act on your commands.

          Veni, vidi, abiit domum

          C Offline
          C Offline
          coolerfantasy
          wrote on last edited by
          #10

          can you tell me how ... please

          L 1 Reply Last reply
          0
          • C coolerfantasy

            can you tell me how ... please

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #11

            coolerfantasy wrote:

            can you tell me how

            How what, to write a driver? Start at http://msdn.microsoft.com/en-us/library/windows/hardware/ff554690(v=vs.85).aspx[^], and maybe also http://articles.sysprogs.org/visualddk/firstdriver/[^].

            Veni, vidi, abiit domum

            C 1 Reply Last reply
            0
            • L Lost User

              coolerfantasy wrote:

              can you tell me how

              How what, to write a driver? Start at http://msdn.microsoft.com/en-us/library/windows/hardware/ff554690(v=vs.85).aspx[^], and maybe also http://articles.sysprogs.org/visualddk/firstdriver/[^].

              Veni, vidi, abiit domum

              C Offline
              C Offline
              coolerfantasy
              wrote on last edited by
              #12

              not writing driver .. just using existing one for example 'Realtek RTL8168D/8111D Family' sure with Visual Basic .

              L D 2 Replies Last reply
              0
              • C coolerfantasy

                not writing driver .. just using existing one for example 'Realtek RTL8168D/8111D Family' sure with Visual Basic .

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #13

                Then you need to get a copy of the driver documentation which will explain it. I would suggest using Google to search for sample programs or tutorials on this subject.

                Veni, vidi, abiit domum

                1 Reply Last reply
                0
                • C coolerfantasy

                  If you read my last post you will find whom dont got it i said ok , yes i must use protection circuits my question out of its purpose , as a result of these posts you absolutely dont understand what i mean and now we discuss protection instead of control and signals .

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #14

                  I don't know about your previous posts, nor about any previous conversations you've had here. Never assume that everyone knows your own personal history on any site. It would have been nice if you brought that up in your original post to this thread. As you've already been told, you need to write a very custom driver to expose the pins on the Ethernet port. This is something you're not going to do in a managed language like C# or VB.NET. You can start by going here[^] and start reading.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak

                  1 Reply Last reply
                  0
                  • C coolerfantasy

                    not writing driver .. just using existing one for example 'Realtek RTL8168D/8111D Family' sure with Visual Basic .

                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #15

                    Considering what you're doing is very much outside the functionality exposed by those drivers, this is not an option for you. You MUST write a custom driver for this. Like I said in my first reply, it is FAR easier to do this with a microcontroller.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak

                    1 Reply Last reply
                    0
                    • C coolerfantasy

                      i need only to get any voltage out from my laptop to control a relay how to get a signal from a LAN port from any pin ? in my laptop there is no com Port or lpt Port also the usb port needs interfacing circuits which is not nessesary in my simple project ... thats why i choosed the LAN Port i use (visual basic 6) .. any help would much appriciated .

                      U Offline
                      U Offline
                      User 10165537
                      wrote on last edited by
                      #16

                      Here need use specialy chip like ft232rl. For exsamlple Look : http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS\_FT232R.pdf

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups