how to increase above 9600 baud rate (project due)

:-[I see everyone using baud rate that is really high. I am using 9600; If I use 14400 or anything higher, my serial monitor just prints out junk.
Specs:
-Arduino Nano ATmega320
-mini-USB
-Just reading an along print and doing Serial.print(analogRead(pin));

For the curious minded:
I want to increase the baud rate because, Serial.print takes a long time to computer, i.e, Serial.print computes and prints at roughly 100 times a second – this is not enough for my purpose.

How do I increase the baud rate/ why does it print junk when I increase to anything above 9600? :-/

Did you modify the serial monitor rate to 14400, too !?

You have to modify it in your code Serial.begin(14400); and in the monitor window!

Yes I did. Maybe it has something to do with the mini USB? Arghhh this is driving me mad! someone help, I have a project due, and I got everything working except this.

Maybe it has something to do with the mini USB?

No.

Use 14400 on the board and 28800 in the Serial Monitor. Does that work?

Use 28800 on the board and 14400 in the Serial Monitor. Does that work?

No they don't work either. I also tried other combination after your suggestion, they don't work as well! arrhh

A NANO running at 16mhz uses a bootloader baud rate of 57600, so if you can upload new sketches OK then I don't think it's a serial hardware problem but rather a software problem of some kind.

Lefty

How do I increase the baud rate/ why does it print junk when I increase to anything above 9600?

Perhaps you should post your code. ::)

So backing up to your real question....

I want to increase the baud rate because, Serial.print takes a long time to computer, i.e, Serial.print computes and prints at roughly 100 times a second -- this is not enough for my purpose.

By printing the result of analog read, you are printing 4 bytes. This is a total of 32 bits. You say it is happening roughly 100 times a second meaning you are trying to print 32 bits * 100 = 3200 bits per second.

At 9600 baud you are already capable of transmitting 3 times that amount. Increasing your baud rate isn't going to fix the problem.

Just for the record the following code:

int x=0;
long y=0;
void setup() {
 Serial.begin(9600); 
}

void loop() {
  y = millis();  
  while ((y + 1000) >= millis()) {
      Serial.print(x++);
  }
  Serial.println();
  Serial.print(x, DEC);
  delay(5000);
  x=0;
  y=0;
}

Averages 358 Prints() in about 1 second @ 9600. So as my math above shows, if you are looping about 100 times per second, the Serial.print() isn't what is slowing you down, at 9600 baud.

The problem was somehow fixed last night. I removed a resistor I had connected to one of the digital pins and to TX pin (I thought it was connected to ground, but I accidentally had it connected to TX). I still don't understand how this fixed the problem / why it caused the problem in the first place but thank you all for answering my questions! I am now communicating at 115200 baud rate!!!! ;D