USB Serial connection problem

03 Jul 2010 . Edited: 03 Jul 2010

Hi.

I have 2 mbed boards. With one I'm using the Serial pc(USBTX, USBRX); and it works fine. I'm getting a port# and I can connect to it using the Terminal.

I then tried to use the same software on a different board, and nothing. I can see that the software is running, but I don't get the CDC port in the windows. Nothing else is changing. same cable, same connection, same PC port, everything the same

I then tried a third board, also the same thing. Only on one I can see the CDC, on the rest, the software is running but the CDC is not opening.

Any idea?

Thanks.

03 Jul 2010

Hi Gidi,

On windows, you need to run the installer for every mbed as windows keys the driver of the serial number. So if you plug in one that is not working and run the installer, all should spring in to life!

I've also added this tip to the windows driver handbook page.

Please confirm if this gets you up and running or not.

Thanks,
Simon

03 Jul 2010 . Edited: 03 Jul 2010

Hi Simon.

Yes, its working fine now.

And I have a small ( different problem )

This is the code I use:

 

        if((c == 's')) // Stop Motor
        {
            if ( INa == !INa ){
            INa = INa ; 
            pc.printf("Motor Stoped!  \n");
            }
            else{
            INa = !INa ;
            pc.printf("Motor Started! \n");
            pc.printf("PWM Speed = %1.2f\n",PWMSpeed);
            }
        }

 

And this is what I get in the terminal window:


Motor Started!
PWM Speed = 0.10
Motor Started!
PWM Speed = 0.10
Motor Started!
PWM Speed = 0.10
Motor Started!
PWM Speed = 0.10

The code goes into the different functions printf, comes out only from the else.

Is there a problem with the compiler?

and yes, there is a small glitch in the compiler.

Highlight a variable and cut it (Ctrl + X ).

Compile. Doesn't compile

Then Ctrl + Z. Lines comes back.

Compile. Doesn't compile, as if the code didn't come back.

 

Thanks.

Gidi.

03 Jul 2010

Hi Gidi,

I'd have a look at this line:

if ( INa == !INa ) {
I think you'll struggle to find a condition that makes that resolve to true :)

Simon

04 Jul 2010

Ok, thanks. I will watch more closely when I write the code so late :-)