Garbage value in serial monitor

i'm using arduino uno and video experimenter shield for my project. i want to display the values in the serial monitor to tv.
i have made use of example program provided by this website for poll serial implementation . my program is below
#include <TVout.h>
#include <pollserial.h>
#include <fontALL.h>

TVout TV;
pollserial pserial;

void setup() {

TV.begin(_NTSC,184,72);
TV.select_font(font6x8);
TV.println("Serial Terminal");
TV.println("-- Version 0.1 --");
TV.set_hbi_hook(pserial.begin(57600));
}

void loop() {

Serial.write(45);
if (pserial.available()) {

TV.print((char)pserial.read());
}
}

i'm expecting 45 to be printed but i'm getting garbage values in my serial monitor...i'm new to this programming....i know there is something wrong with my code, could anyone please help me out ?

Serial.write will send the binary number 45 to the serial monitor. If you want to see the number 45 use Serial.print

I tried using Serial.print(45) but still i'm getting garbage values in the serial monitor :~

You do have the correct baud rate selected?

i have used 9600 as baud rate

TV.set_hbi_hook(pserial.begin(57600));

That's not 9600 baud.

Shouldn't you be using pserial.print()?

Thanks a lot ...baud rate was causing the problem...now its working fine...thanks :slight_smile:

i'm getting the correct value in serial monitor but when i connect to tv the value is not getting displayed in the screen....do i need to change the code?