Video Sequencer

This device cycles the video output from multiple cameras to a video monitor and/or long timelapse VCR. I made this for a project at work and later expanded it to more inputs as the system and need for coverage increased. Typical commercial sequencers are made in 4 or 8 port only. I made two versions of this device, one is a relay based sequencer, and the other is a switching diode based sequencer. Both of these are selectable from 4 to 8 input ports via dip switch settings. The software in the PIC has gone through several extensive revisions until I arrived at this version that was ideal for my application. Time delay between switches is now 2 seconds. The PIC/software is interchangable between the both devices.

Relay Based Sequencer Selectable 4 to 8 ports

Diode based Video sequencer selectable 4 to 8 ports

Basic program listing

 
'vidseq12
'8 port Video Sequencer Diode or relay based selectable for 4 to 8 ports
'See schematic Relay Based Video Switcher Revision 3 or
'Diode Based Video Switcher Revision 3
'---------Constants---------------------------------------------
td con 2000 '2 seconds (2000ms) time delay between changing ports
'---------------------------------------------------------------
'scanport0 routine scans the first 5 ports at turn on
scanport0:High 0 ' Turn on diode connected to PORTB.0
  Pause td ' Delay for td Time Constant
  Low 0 ' Turn off diode connected to PORTB.0
  High 1 ' Turn on diode connected to PORTB.1
  Pause td ' Delay for td Time Constant
  low 1 ' Turn off diode connected to PORTB.1
  High 2 ' Turn on diode connected to PORTB.2
  Pause td ' Delay for td Time Constant
  Low 2 ' Turn off diode connected to PORTB.2
  High 3 ' Turn on diode connected to PORTB.3
  Pause td ' Delay for td Time Constant
  Low 3 ' Turn off diode connected to PORTB.3

input porta.2 'makes pin 1 a input
input porta.3 'makes pin 2 a input
input porta.4 'mapke pin 3 a input
input porta.1 'makes pin 18 a input
input porta.0 'makes pin 17 a input

'This is where the conditional branching starts
If PORTA.2=1 then scanport0 'if pin 1 high goto Scanport0
If PORTA.3=1 then scanport1 'if pin 2 high goto Scanport1
If PORTA.4=1 then scanport2 'if pin 3 high goto Scanport2
If PORTA.1=1 then scanport3 'if pin 18 high goto Scanport3
If PORTA.0=1 then scanport4 'if pin 17 high goto Scanport4

scanport1: High 4 ' Turn on diode connected to PORTB.4
  Pause td ' Delay for td Time Constant
  Low 4 ' Turn off diode connected to PORTB.4
Goto scanport 'go to scanport0 subroutine and run forever

scanport2: High 4 ' Turn on diode connected to PORTB.4
  Pause td ' Delay for td Time Constant
  Low 4 ' Turn off diode connected to PORTB.4
  High 5 ' Turn on diode connected to PORTB.5
  Pause td ' Delay for td Time Constant
  Low 5 ' Turn off diode connected to PORTB.5
Goto scanport0 'go to scanport0 subroutine and run forever


scanport3: High 4 ' Turn on diode connected to PORTB.4
  Pause td ' Delay for td Time Constant
  Low 4 ' Turn off diode connected to PORTB.4
  High 5 ' Turn on diode connected to PORTB.5
  Pause td ' Delay for td Time Constant
  Low 5 ' Turn off diode connected to PORTB.5
  High 6 ' Turn on diode connected to PORTB.6
  Pause td ' Delay for td Time Constant
  Low 6 ' Turn off diode connected to PORTB.6
Goto scanport0 ' go to scanport0 subroutine and run forever

scanport4: High 4 ' Turn on diode connected to PORTB.4
  Pause td ' Delay for td Time Constant
  Low 4 ' Turn off diode connected to PORTB.4
  High 5 ' Turn on diode connected to PORTB.5
  Pause td ' Delay for td Time Constant
  Low 5 ' Turn off diode connected to PORTB.5
  High 6 ' Turn on diode connected to PORTB.6
  Pause td ' Delay for td Time Constant
  Low 6 ' Turn off diode connected to PORTB.6
  High 7 ' Turn on diode connected to PORTB.7
  Pause td ' Delay for td Time Constant
  Low 7 ' Turn off diode connected to PORTB.7
Goto scanport0 ' go to scanport0 subroutine and run forever

end

Hex Listing

 
:100000009E015D28112080040D281120FF3A8005F3
:100010000E281120841780045828FF3A8417800581
:1000200058289400063094190530840000308A0066
:1000300014080739820701340234043408341034B8
:100040002034403480348F018E006400FF308E07EE
:10005000031C8F07031C080003308D00DC303220A6
:1000600025288D01E83E8C008D09031C3C28FC30BE
:100070008C07031838288C078D0F37288C184028D8
:100080008C1842280C18442808008D018F018E001E
:100090004D200239031DFF3058280F080D02031DA3
:1000A00055280E080C0203190234031C04340134D1
:1000B000831303138312640008000030022007300A
:1000C0008F00D0302420003005200130022007307E
:1000D0008F00D0302420013005200230022007306C
:1000E0008F00D0302420023005200330022007305A
:1000F0008F00D030242003300520053084000430E8
:100100000A200530840008300A20053084001030B1
:100110000A200530840002300A20053084000130B6
:100120000A20640005195D2864008519A028640070
:10013000051AA92864008518BA2864000518D32870
:100140000430022007308F00D030242004300520F6
:100150005D280430022007308F00D0302420043086
:1001600005200530022007308F00D03024200530D4
:1001700005205D280430022007308F00D030242075
:10018000043005200530022007308F00D0302420B5
:10019000053005200630022007308F00D0302420A3
:1001A000063005205D280430022007308F00D03053
:1001B0002420043005200530022007308F00D03085
:1001C0002420053005200630022007308F00D03073
:1001D0002420063005200730022007308F00D03061
:0C01E0002420073005205D286300F4286F
:084000007F007F007F007F00BC
:04400E00F53F010079
:00000001FF

Home