Need a way to turn Video source on/off

Store Forums Video Experimenter General Discussion Need a way to turn Video source on/off

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8304
    nosredna000
    Participant

    Hi All,

    For my application I need to be able to turn the video source off to set channel and other settings. So OSD on a black screen is what I’m looking for then go back to a video overlay.

    I found that if I comment out initOverlay(); I can get it to display over a black screen / no input. How would can I turn that function on/off? Is there a better way to do this? Sorry I’m a newbie

    I have another question about processor load while using TV experimenter. Should all I really be worried about is processes that uses interrupts or??? I plan on eventually running this on a 1284 so I should have a bit more memory available.

    #8307
    Michael
    Keymaster

    What about using the overlay switch? Or do you need a way to do it programatically?

    The Video Experimenter is designed for the Arduino Uno only. Other Arduino models do not have all the needed pins available (e.g. the Arduino Mega) so it can never work on an Arduino Mega. See this for more info.

    #8311
    nosredna000
    Participant

    Hi Micheal, The overlay switch does not seem to work after it has overlayed over video. For instance if you get the TV experimenter overlaying a video signal then unplug the video source the black video with overlay starts dancing and moving back and forth like the sync isn’t right. I’ve tried changing the jumper from sync to D9 and have the same results.

    It is only when I comment out initOverlay(); I get a overlay on a black screen but no overlay over video.

    Would you mind trying it on your end just to make sure I’m doing it right. I’m using the http://nootropicdesign.com/projectlab/2011/03/20/text-and-graphics-overlay/ sketch unmodified.

    I need to be able to turn on/off the video source and keep the overlay.

    Otherwise it seems like if I’m able to turn initOverlay(); on and off i twould work. How would I do that in the best way?

    #8313
    Michael
    Keymaster

    In order to provide a video signal, there needs to be a vertical sync for the destination TV. When you have a video input connected, that input signal is the source of the vsync. If you remove the signal, then there is no synchronization and that is why the overlay is all over the place.
    If you don’t have a video input then the Arduino needs to generate the vsync. That is the purpose of moving the jumper to the D9 position and using Arduino code to create the vsync on the D9 pin.

    I don’t think there is a way for the Arduino program to sense whether there is a signal present so that it can start generating the vsync. You would have to tell it by pressing a button or something. And besides, you would have to move the jumper to the D9 position when you disconnected the video input signal so that the D9 pin is connected to the video output. Are you moving the jumper when you disconnect video and comment out initOverlay()? I have to move the jumper to D9 and set the output select to sync only.

    Are you trying to make this so it is automatic? So that you can remove the input signal and somehow have the Arduino program take over generating the vsync? I don’t think it can be automatic because you have to also change the way the circuit is connected. You could possibly do it with an external DPDT switch and some clever code to reconfigure the registers when you throw the switch, but it’s not really a beginner project. Is that what your goal is?

    #8314
    nosredna000
    Participant

    Hi,

    No I’m making a TV tuner. The arduino is also controlling a AV receiver and everything works just fine. I set the channels via arduino.

    I’m trying to add OSD so that you can see which channel you are tuning to. The problem is if you leave it trying to sync with the video source the OSD (I understand why) goes nuts because unless your on the right channel you have static. So what I’d like to do is have a black screen with the channel stuff. then turn the AV input back on after a delay. BTW My setup has a digital analog switch that turns on/off the video source.

    Unfortunately for me when I cut the video source off (goes to open) and move the jumpers and switch I get a blue screen on my display. The only way I can get it to work is to turn off initOverlay() but then it doesn’t work when I go back to overlaying on good video source unless I turn on initOverlay(). So basically it seems if I can turn that function on/off while changing channels and have the video input go open (easy on my part) I would be in good shape. I’m a novice coder.. seems like this shouldn’t be that hard but I have no idea how to turn it on/off. Turning it on would be easy but how to disable?

    Thanks for the help. I’m really far along in my project less this last step. I actually have it working with a max7456 chip but drawing lines and graphs is a bit awkward with the 7456. On top of that the 7456 is at end of life/discontinued.

    #8317
    Michael
    Keymaster

    Ok, I need to look into writing a function called noOverlay() that does the opposite of initOverlay(). I’ll try to find some time in the next few days, but I’m extremely busy with the business. I’ll help though.

    #8326
    nosredna000
    Participant

    Thanks so much Micheal, Did you happen to find anything? If you give me some clues on how to do it I might be able to run with the ball and figure it out myself. Sorry for being a pain.

    #8327
    Michael
    Keymaster

    Here is some code to try. I don’t have time to test it myself, but this should “undo” the overlay setup:

    
    void stopOverlay() {
      tv.end();
      EIMSK = 0;
      EICRA = 0;
      tv.begin(NTSC, W, H);
    }
    

    And if you want to turn the overlay back on again:

    
    void startOverlay() {
      tv.end();
      tv.begin(NTSC, W, H);
      initOverlay();
    }
    
    • This reply was modified 8 years, 4 months ago by Michael.
    • This reply was modified 8 years, 4 months ago by Michael.
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.