Hi -
One of Paul's cool libraries that I have'nt used yet is usb_serial,
so today I fired it up on a T2, and tried to connect with a PC file
manager pgm that has an RS232 I/O option, via usb. (I've done
this before with other hardware, including bit-banging it with a T2
-> MAX3232 -> FT232R -> PC, which connected to the PC file manager
pgm with little fuss...)
So what I expect to happen is that after transmitting the contents of
the buffer the PC program should pop up a "connected" icon, and send
back an "ACK" message.
What actually happens is nothing, until I reset the Teensy, at which
point the PC pgm pops up its "connected" icon...
I can see the serial port come up in Device Manager, and the PC pgm
can see it too (It shows what port it's connected to...), and there's
no handshaking involved.
Most likely I've made some dumb coding error - Can anyone see what
I'm missing?
Thanks...
usb_init();
while (!usb_configured());
_delay_ms(1000);
while (PIND & (1<<1)) {}; // loop while PIND.1 High
// start up PC terminal pgm , then pull PIND.1 low
usb_serial_write(buffer,14); // sends "Connect" command,
// should see connected icon now...
usb_serial_flush_output(); // just in case, but no joy...
// but, when I give up and reset the T2, the icon appears, so
// apparently the msg is sent, but is'nt received by the PC pgm
// until the reset...?
One of Paul's cool libraries that I have'nt used yet is usb_serial,
so today I fired it up on a T2, and tried to connect with a PC file
manager pgm that has an RS232 I/O option, via usb. (I've done
this before with other hardware, including bit-banging it with a T2
-> MAX3232 -> FT232R -> PC, which connected to the PC file manager
pgm with little fuss...)
So what I expect to happen is that after transmitting the contents of
the buffer the PC program should pop up a "connected" icon, and send
back an "ACK" message.
What actually happens is nothing, until I reset the Teensy, at which
point the PC pgm pops up its "connected" icon...
I can see the serial port come up in Device Manager, and the PC pgm
can see it too (It shows what port it's connected to...), and there's
no handshaking involved.
Most likely I've made some dumb coding error - Can anyone see what
I'm missing?
Thanks...
usb_init();
while (!usb_configured());
_delay_ms(1000);
while (PIND & (1<<1)) {}; // loop while PIND.1 High
// start up PC terminal pgm , then pull PIND.1 low
usb_serial_write(buffer,14); // sends "Connect" command,
// should see connected icon now...
usb_serial_flush_output(); // just in case, but no joy...
// but, when I give up and reset the T2, the icon appears, so
// apparently the msg is sent, but is'nt received by the PC pgm
// until the reset...?