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

Dependencies:   mbed

main.cpp

Committer:
4180_1
Date:
2011-05-22
Revision:
0:a67c69cfafb9

File content as of revision 0:a67c69cfafb9:


    //EasyVR Bridge Program to connect to PC using mbed and download custom sound tables
#include "mbed.h"

Serial pc(USBTX, USBRX); // tx, rx
Serial device(p13, p14);  // tx, rx

int main() {
// higher baud rate is used only to download new sound tables
// also need to put a 100ohm pullup on /XM pin (>3V) and cycle power first.
// in download dialog box, must click the slow transfer check box.
    device.baud(115200);
    pc.baud(115200);
    while(1) {
        if(pc.readable()) {
            device.putc(pc.getc());
        }
        if(device.readable()) {
            pc.putc(device.getc());
        }
    }
}