'PRORGAM: Maxxum 7000 Extended Camera Controller Widget ' 'Written by: ' Quentin J. Lewis ' Litchfield, NH 03052 ' bigqueue@tiac.net ' 'This program controls a box I made to connect to my Maxxum 7000 'camera. This box will do long exposure bracketing, as well as 'long time delay sequencing (hours, days, and even weeks!) ' 'The widget box itself is quite simple. It has a single power 'switch, a speed switch, and four command switches. The unit is 'powered off, the command switches are set (see below), the speed 'switch is selected, and the box power is then turned on....viola, 'the stamp comes to life and executes the command. Its that simple! ' 'NOTE: The speed switch simply selects whether the FAUX Stamp is 'running at 4MHz or 16MHz....thereby speeding up operations by '400% is operated in the 4x (fast) mode. ' '--------------------------------------------------------------- The commands are as follows: ' 0000 do_nothing: ' Just as it sounds.....go to sleep. ' 0001 bracket_5sec: ' Bracket for X pictures, each 5 seconds more than the last ' 0010 bracket_10sec: ' Bracket for X pictures, each 10 seconds more than the last ' 0011 bracket_20sec: ' Bracket for X pictures, each 20 seconds more than the last ' 0100 bracket_30sec: ' Bracket for X pictures, each 30 seconds more than the last ' 0101 bracket_40sec: ' Bracket for X pictures, each 40 seconds more than the last ' 0110 bracket_50sec: ' Bracket for X pictures, each 50 seconds more than the last ' 0111 bracket_60sec: ' Bracket for X pictures, each 60 seconds more than the last ' 1000 per_1min: ' Take time-lapsed photos every minute ' 1001 per_10min: ' Take time-lapsed photos every 10 minutes ' 1010 per_30min: ' Take time-lapsed photos every 30 minutes ' 1011 per_1hour: ' Take time-lapsed photos every hour ' 1100 per_6hour: ' Take time-lapsed photos every 6 hours ' 1101 per_12hour: ' Take time-lapsed photos every 12 hours ' 1110 per_24hour: ' Take time-lapsed photos every day ' 1111 per_1week: ' Take time-lapsed photos every week ' '------------------------------------------------------------ 'STUFF TO DEFINE symbol num_pix_bracket = 5 'Number of pictures in a bracket symbol camera_delay = 2500 '# milliseconds to wait for camera 'Don't forget its /4 for FAST mode symbol max_roll = 36 'Maximum # pictures on a roll 'SIGNALS TO STAMP symbol command_bits = %11110000 'Pins Bit 4-7 'SIGNALS TO CAMERA FROM STAMP symbol shoot_camera = pin3 symbol shoot_camera_dir = dir3 'DEFINE SHUTTER PIN STATES symbol click = 1 symbol unclick = 0 'DEFINE COMMAND INPUT STATES symbol do_nothing = %00000000 'Do nothing, go to sleep symbol bracket_5sec = %00010000 'Take 5 shots bracketed +5 sec symbol bracket_10sec = %00100000 'Take 5 shots bracketed +10 sec symbol bracket_20sec = %00110000 'Take 5 shots bracketed +20 sec symbol bracket_30sec = %01000000 'Take 5 shots bracketed +30 sec symbol bracket_40sec = %01010000 'Take 5 shots bracketed +40 sec symbol bracket_50sec = %01100000 'Take 5 shots bracketed +50 sec symbol bracket_60sec = %01110000 'Take 5 shots bracketed +60 sec symbol per_1min = %10000000 'Take a shot every 1 minute symbol per_10min = %10010000 'Take a shot every 10 minutes symbol per_30min = %10100000 'Take a shot every 30 minutes symbol per_1hour = %10110000 'Take a shot every 60 minutes symbol per_6hour = %11000000 'Take a shot every 6 hours symbol per_12hour = %11010000 'Take a shot twice a day symbol per_24hour = %11100000 'Take a shot once a day symbol per_1week = %11110000 'Take a shot once a week 'DEFINE VARIABLES symbol command = b2 'Place to hold the command symbol current_shot = b11 'Current picture # symbol bracket_seconds = b10 'Time to add to picture bracketing symbol sleep_count = b9 'Used for sleep_loop symbol pause_time = w3 'Time to send to pause symbol sleep_half_days = w2 'How many half days to sleep symbol sleep_seconds = W2 'How many seconds to sleep '==================================================== ' RESET - It all starts here at the reset vector '==================================================== reset: dirs = %00000000 'All Inputs shoot_camera = unclick 'Un-set shutter shoot_camera_dir = 1 'make this pin an output main: gosub get_command 'Go and get the command debug %command branch command,(do_nada, brkt_5sec, brkt_10sec, brkt_20sec, brkt_30sec, brkt_40sec, brkt_50sec, brkt_60sec, p_1min, p_10min, p_30min, p_1hour, p_6hour, p_12hour, p_24hour, p_1week) goto main ' '==================================================== ' COMMANDS - The above BRANCH instructions moves ' us to one of the following commands. '==================================================== do_nada: end 'Nothing to do...sleep! brkt_5sec: bracket_seconds = 5 'Number of seconds we are bracketing goto bracket_shooting 'Shoot the 5 bracketed pictures brkt_10sec: bracket_seconds = 10 'Number of seconds we are bracketing goto bracket_shooting 'Shoot the 5 bracketed pictures brkt_20sec: bracket_seconds = 20 'Number of seconds we are bracketing goto bracket_shooting 'Shoot the 5 bracketed pictures brkt_30sec: bracket_seconds = 30 'Number of seconds we are bracketing goto bracket_shooting 'Shoot the 5 bracketed pictures brkt_40sec: bracket_seconds = 40 'Number of seconds we are bracketing goto bracket_shooting 'Shoot the 5 bracketed pictures brkt_50sec: bracket_seconds = 50 'Number of seconds we are bracketing goto bracket_shooting 'Shoot the 5 bracketed pictures brkt_60sec: bracket_seconds = 60 'Number of seconds we are bracketing goto bracket_shooting 'Shoot the 5 bracketed pictures '==================================================== ' BRACKET_SHOOTING - This the routine that all the ' above bracket commands use. '==================================================== bracket_shooting: for current_shot = 1 to num_pix_bracket 'Do a set of pictures pause_time = 1000 * bracket_seconds * current_shot 'Make it in milliseconds shoot_camera = click 'Close the shutter pause pause_time 'Pause is in milliseconds shoot_camera = unclick 'Open the shutter pause camera_delay 'Wait for camera next 'Next shot in sequence return 'Return to sender... '==================================================== ' TIME_LAPSED_SHOOTING - These are the time-lapsed ' commands. '==================================================== p_1min: pause_time = 1000 * 60 'Wait 60 seconds for current_shot = 1 to max_roll 'Go only up to MAX_ROLL shoot_camera = click 'Close the shutter pause camera_delay 'Wait for camera shoot_camera = unclick 'Open the shutter pause pause_time 'Pause is in milliseconds next 'Next shot in sequence end 'Done, go to sleep forever p_10min: sleep_half_days = 0 '# half days to sleep sleep_seconds = 10 * 60 'How many seconds to sleep goto shoot_pix 'Go to the general routine p_30min: sleep_half_days = 0 '# half days to sleep sleep_seconds = 30 * 60 'How many seconds to sleep goto shoot_pix 'Go to the general routine p_1hour: sleep_half_days = 0 '# half days to sleep sleep_seconds = 1 * 60 * 60 'How many seconds to sleep goto shoot_pix 'Go to the general routine p_6hour: sleep_half_days = 0 '# half days to sleep sleep_seconds = 6 * 60 * 60 'How many seconds to sleep goto shoot_pix 'Go to the general routine p_12hour: sleep_half_days = 0 '# half days to sleep sleep_seconds = 12 * 60 * 60 'How many seconds to sleep goto shoot_pix 'Go to the general routine p_24hour: sleep_half_days = 1 '# half days to sleep sleep_seconds = 12 * 60 * 60 'How many seconds to sleep goto shoot_pix 'Go to the general routine p_1week: sleep_half_days = 13 '# half days to sleep sleep_seconds = 12 * 60 * 60 'How many seconds to sleep goto shoot_pix 'Go to the general routine '==================================================== ' SHOOT PIX - This routine is used by ALL of the ' above time-lapsed routines to do their job. '==================================================== shoot_pix: for current_shot = 1 to max_roll 'Go up to max_roll for sleep_count = 1 to sleep_half_days 'Sleep for this many half days sleep 43200 'Thats # seconds in 12 hours! next 'Go as many days as needed sleep sleep_seconds 'Now the remainder shoot_camera = click 'Close the shutter pause camera_delay 'Wait for camera shoot_camera = unclick 'Open the shutter next 'Goto next picture end 'Sleep for ever '==================================================== ' GET COMMAND - Finally, the place the program calls ' to get the users switch command. '==================================================== get_command: command = pins & command_bits 'Get command, and mask off 'unused bits command = command / 16 'Shift right 4 bits return 'Retun to sender