serial communication @ 921600bps - Working fine on hyperterminal as well as bray's

Dependencies:   mbed

Committer:
Rahul
Date:
Thu Mar 11 03:31:42 2010 +0000
Revision:
0:d57a982ac59a

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rahul 0:d57a982ac59a 1 #include "mbed.h"
Rahul 0:d57a982ac59a 2
Rahul 0:d57a982ac59a 3 Serial pc(USBTX, USBRX);
Rahul 0:d57a982ac59a 4 Timer t;
Rahul 0:d57a982ac59a 5 DigitalOut led1(LED1);
Rahul 0:d57a982ac59a 6 int main()
Rahul 0:d57a982ac59a 7 {
Rahul 0:d57a982ac59a 8 pc.baud(921600);
Rahul 0:d57a982ac59a 9 pc.format(8,Serial::None,1);
Rahul 0:d57a982ac59a 10 while(1)
Rahul 0:d57a982ac59a 11 {
Rahul 0:d57a982ac59a 12 t.start();
Rahul 0:d57a982ac59a 13 pc.printf("Hello World! @921.600kbps\n",1285);
Rahul 0:d57a982ac59a 14 t.stop();
Rahul 0:d57a982ac59a 15 pc.printf("The time taken was %f seconds\n", t.read());
Rahul 0:d57a982ac59a 16 t.reset();
Rahul 0:d57a982ac59a 17 wait(1.0);
Rahul 0:d57a982ac59a 18 led1 = !led1;
Rahul 0:d57a982ac59a 19 }
Rahul 0:d57a982ac59a 20 }