EasyVR Bridge Program to connect to PC using mbed and download custom sound tables at 115200 baud

Dependencies:   mbed

Committer:
4180_1
Date:
Sun May 22 01:05:50 2011 +0000
Revision:
0:a67c69cfafb9

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
4180_1 0:a67c69cfafb9 1
4180_1 0:a67c69cfafb9 2 //EasyVR Bridge Program to connect to PC using mbed and download custom sound tables
4180_1 0:a67c69cfafb9 3 #include "mbed.h"
4180_1 0:a67c69cfafb9 4
4180_1 0:a67c69cfafb9 5 Serial pc(USBTX, USBRX); // tx, rx
4180_1 0:a67c69cfafb9 6 Serial device(p13, p14); // tx, rx
4180_1 0:a67c69cfafb9 7
4180_1 0:a67c69cfafb9 8 int main() {
4180_1 0:a67c69cfafb9 9 // higher baud rate is used only to download new sound tables
4180_1 0:a67c69cfafb9 10 // also need to put a 100ohm pullup on /XM pin (>3V) and cycle power first.
4180_1 0:a67c69cfafb9 11 // in download dialog box, must click the slow transfer check box.
4180_1 0:a67c69cfafb9 12 device.baud(115200);
4180_1 0:a67c69cfafb9 13 pc.baud(115200);
4180_1 0:a67c69cfafb9 14 while(1) {
4180_1 0:a67c69cfafb9 15 if(pc.readable()) {
4180_1 0:a67c69cfafb9 16 device.putc(pc.getc());
4180_1 0:a67c69cfafb9 17 }
4180_1 0:a67c69cfafb9 18 if(device.readable()) {
4180_1 0:a67c69cfafb9 19 pc.putc(device.getc());
4180_1 0:a67c69cfafb9 20 }
4180_1 0:a67c69cfafb9 21 }
4180_1 0:a67c69cfafb9 22 }
4180_1 0:a67c69cfafb9 23