Printing in loop to TVout


I've started playing with Arduino for about a week now and it's my first electrical project. Because I wanted to display some data (for now the coordinates of the GPS), I've set up the TVout library.

Everything was working fine so far, I set up my sketch for TVout with the following code:

void setup() {
  result = tv.begin(PAL, 96, 40);
  tv.printPGM(0, 0, PSTR("GPS coordinates:"));
  tv.printPGM(60, 6, PSTR(", "));
  tv.printPGM(0, 12, PSTR("GPS satellites:"));

void loop() {
  tv.print(32, 6, gps_latitude, 4); //gps_latitude is a double

When I comment the line out (the line in the loop), it all works fine, but no data is shown except the setup text. When I do not comment the line out, the behavior is rather different each run, but often it results in a blue screen.

I was hoping that this is common problem and no more code is required. If you still need more code, please ask, but it's almost all about parsing the strings from the serial into the gps_latitude.

Something else that keeps me wondering: when I replace gps_latitude with PSTR("hello") and change the function to printPGM, exactly the same happens (screen flashes, blue screen as end result).

Hope you could help me.

I would also like to add that I use SoftwareSerial to read serial data from other pins. I have read something about interrupts, and that these (SoftwareSerial and TVout) not work together that well.

What model of Arduino are you using.

I have an Atmega168 based duemilanove. It doesn't work too well with TVOut library, mainly because its 1KB of RAM is too low. If I go over the limit werid things happen, but usually I just get a blank screen.