How to switch between video inputs


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Use a CD4066 quad bilateral analog switch.
    http://www.fairchildsemi.com/ds/CD/CD4066BC.pdf


    Same problem you have: (See CD4066).
    http://www.petesprojects.com/stereo-video/section4.htm

    Best regards,

    Luciano

    EDIT: With 5 cameras the 74HC4051 is a better choice.
    Last edited by Luciano; - 3rd May 2008 at 19:57.

  2. #2
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive been looking at the datasheet for the 74HC4051. From what i can see there are 8 pins and each one can be set to an input or an output. I do have a few questions about them though. Sorry if the datasheet answers these (if it does then i didnt understand it)

    I assume i pick a pin for example pin1 (A4) and use it as an output. Then i turn each input on seperately and it will come out of the output pin.

    How do i set which pins are inputs/outputs and how do i set which input is active? Im guessing i have to send the data through "COM out/in" (pin 3). Is that serial?

    Are the address pins just so you can control multiple chips using a single data line?

    Just thinking about the in/out pins. Are they actually an input or an output or do they just turn on/off and any pins that are on will all connect together?

  3. #3
    sinoteq's Avatar
    sinoteq Guest


    Did you find this post helpful? Yes | No

    Default Datasheets

    OK, let us start with the basic idea of multiplexers. You can look at them like a "One of Eight" switch where one line of the switch stays the same in all cases. 4051 is actually a MUX/DEMUX but let us not complicate this for the moment. Let us look at the datashet for example http://focus.ti.com/lit/ds/symlink/cd74hct4053.pdf PAGE 3


    Functional diagram of 4051:
    COM In/Out HERE IS WHERE YOU CONNECT YOUR TV
    CHANNEL In/Out HERE YOU CONNECT YOUR CAMERAS
    ENABLE pin must be low to make enable the chip
    S0,S1,S2 are the Select Pins (Adress) and they decide how you switch the signal, look at the diagram under the picture in PAGE 3
    S2=0 S1=0 S0=0 >> Connect Pin 13 to Pin 3
    S2=0 S1=0 S0=1 >> Connect Pin 14 to Pin 3
    and so on


    So you see 4051 does not use serial communication, it uses a 3 pin + enable parallell interface. If you want to have many chips on the same Slect Pin bus you have to figure out a way to only enable one chip at the time, this can be done by connecting the enable pins from each 4051 to the PIC or..... Connect the enable pins to a 4051 and control enable for all chips that way. Just at matter of how many pins you have left on your PIC.
    You can also connect 2 4051 in parallell, and feed video to one chip and Audio to the other chip, by doing this you always get the audio from the selected camera.

    Does this make things more clear?

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sinoteq View Post
    Does this make things more clear?
    Perfectly!

    I think i was going wrong because to me "COM" means serial. OK, i know it should be "COMM" but lots of people seem to miss off the last M. It does make perfect sense now since there are 3 address pins (2 states each) and 2^3=8 (8 inputs).

    It didnt help having pins labeled "in/out" either. Just a small question on these, does that mean i could use this chip the oposite way? (1 input and 8 switched outputs)

    I like the definition of "X" in the datasheet :P "Don't care"

    I should have realised how it worked before because when i was at school i actually use a chip that does pretty much the same thing but it was only for LEDs.

    One last question. Would i be right in saying that the grounds on the video inputs/outputs should all be connected to each other but *not* to the chip. Then the signal wires go into the correct chip pins

  5. #5
    sinoteq's Avatar
    sinoteq Guest


    Did you find this post helpful? Yes | No

    Default

    Yes, you can connect one camera and eight TV and run it backwards so to speak, that is why I said 4051 is MUX/DEMUX. I would connect all GND to the same place to make sure you get the same potential on all cameras this also includes GND to the PIC and 4051.

  6. #6
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ok, Thanx for the info! Now if only i could find somewhere that sells the correct SCART sockets

  7. #7
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive just been looking at the datasheet again and ive noticed another pin called "VEE". What does that do? The datasheet doesnt seem to mention it so i assume its another one of those basic things i should have been taught in school

Similar Threads

  1. Replies: 14
    Last Post: - 26th September 2007, 05:41
  2. dip switchs & inputs
    By grounded in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th September 2006, 13:37
  3. Newbie - 16F628A and switch latching
    By malc-c in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 19th May 2006, 02:35
  4. Switch Sequence
    By Tissy in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 13th February 2005, 20:36
  5. Switch Polling vs Interrupts
    By eric blair in forum General
    Replies: 1
    Last Post: - 17th October 2003, 09:38

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