Printf to windows console

01 Jul 2011

Can this be done how? I only have a few LEDs and a piezospieker, so I don't have much in the way of output, so it would be ideal if the thing could print out to windows console.

01 Jul 2011

you can get a terminal that runs in the console.
See SerialTerm http://www.comp.lancs.ac.uk/~albrecht/sw/terminal/index.html

Although, I am not sure what the significance is to printing to the terminal. Maybe you mean print to cmd so you can run programs upon receiving a command? If so, that's a little more involved.

01 Jul 2011

Hm, that seems to work, but it's not too perfect.

Serial out(USBTX, USBRX); .. .. out.printf("Hello, world!");

And it came up with: http://i.imgur.com/HMKs7.png

01 Jul 2011

Now it just comes up with nonsense. I figure I need to do some sort of ascii conversion?

01 Jul 2011

Apologies if I am missing something, but why don't you just use a terminal application such as TeraTerm?

The "Communicating over USB Serial" section of the Handbook explains how to do this. Don't forget to install the serial driver!

01 Jul 2011

The thing is connected to COM6 and tera term only goes up to com4

01 Jul 2011

I found some other terminal app.

My next question - is there a way to get generate interrupt from a terminal?

01 Jul 2011

Have a look at MODSERIAL. The RX callback may be useful.

01 Jul 2011

Seems to work :D