Arduino TV out question

Please Why this TVout code built in the IDE does not assign the pins from which Arduino is going to send the signal to TV ?

#include <TVout.h>
#include <TVoutfonts/fontALL.h>

TVout TV;
unsigned char x,y;

void setup()  {
  x=0;
  y=0;
  TV.begin(NTSC|OVERLAY);	//for devices with only 1k sram(m168) use TV.begin(_NTSC,128,56)
  TV.select_font(font6x8);
}

void loop() {
  TV.clear_screen();
  x=0;
  y=0;
  for (char i = 32; i < 127; i++) {
    TV.print_char(x*6,y*8,i);
    x++;
    if (x >= TV.char_line()) {
      y++;
      x=0;
    }
  }
  TV.delay(1000);
  TV.clear_screen();
  TV.println(F("Fill the Screen\nPixel by Pixel"));
  TV.delay(1000);
  TV.clear_screen();
  for(x=0;x<TV.hres();x++){
    for(y=0;y<TV.vres();y++){
      TV.set_pixel(x,y,1);
    }
  }
  TV.delay(1000);
  TV.clear_screen();
  TV.print(F("Draw some lines"));
  TV.delay(1000);
  x = TV.hres() - 1;
  for(y=0;y<TV.vres();y++){
    TV.draw_line(0,y,x-y,y,2);
  }
  TV.delay(1000);
}

I've not used the TV library but I would guess that it might use specific hardware features of the host micro to generate the required signals. If that is the case, then the pins are fixed.

The documentation says:

SYNC is on OCR1A and AUDIO is on OCR2A (except on the Arduino Leonardo, where AUDIO is on OCR0A)

1 Like

Hi,
the pins are fixed.
If you inform which Arduino you are using it would be easier to help you.
If it's Arduino UNO, the pins are:
"Arduino SYNC VIDEO AUDIO"
"UNO------- 9 ------ 7 ----- 11 "

1 Like

The IDE doesn t specify which arduino. But I am using nano all the time.

But there are no pins on arduino labeled OCR...they all D0, D1...or A0..A1...and so so..? !

There's not a lot of space on a Nano board (or most other Arduino boards) to have lots of text printed on the board next to the headers.

The 328P micro that is used in the Nano & UNO (and others) has more functionality built inside the chip than there are pins on the chip. In order to get all that functionality out, most i/o pins have more than one function.

If you read the documentation for TVOUT, you will see the actual port pins that the audio, video and sync use.

Find one of the pinout drawings for a Nano and look where PB1, PB3 and PD7 are.

1 Like

according to your post, on the Nano it would be D9, D11, & D7 respectively.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.