IDE CPU Utilization Spike

Questions and discussion about the ZBasic IDE.
Post Reply
everest
Posts: 96
Joined: 31 May 2010, 9:01 AM

IDE CPU Utilization Spike

Post by everest »

Hey Don,

I've noticed that under the following conditions, the Zbasic IDE CPU utilization on my PC spikes to 100%:

1) I have a USB serial adapter connected to my laptop
2) The Zbasic IDE is running and the adapter is "Connected"
3) I remove the USB serial adapter from my laptop

At this point, the CPU utilization immediately spikes up to 100%. I can fix the problem by simply closing the COM port, or shutting down the IDE. But sometimes I just forget and wind up killing my battery with all that CPU utilization.

I can't tell if this is an issue with the serial drive, or the IDE specifically, but *if* it's the IDE, it would be great if it could detect and resolve this condition.

-Jeff
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: IDE CPU Utilization Spike

Post by dkinzer »

everest wrote:I can't tell if this is an issue with the serial drive, or the IDE specifically, but *if* it's the IDE, it would be great if it could detect and resolve this condition.
The IDE doesn't know anything about the existence of the USB device. Rather, it interacts with the driver that presents a virtual serial port interface.

I suspect that this is an issue within the FT232 driver and that it could only be resolved there. It would be interesting to conduct the same experiment replacing the IDE with some other application that opens the virtual serial port, e.g. a terminal emulator like TeraTerm, and see if the result is the same.
- Don Kinzer
everest
Posts: 96
Joined: 31 May 2010, 9:01 AM

Post by everest »

Yup, I just tested and as you suspected it's a driver issue, not specific to the IDE. Other terminal programs have the same issue. Annoying!

-Jeff
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

Which USB serial adapter? It might be worth trying one with a different chipset and thus different driver. FTDI, Silicon Labs and Prolific are the chips commonly used in these adapters. Each has it's own drivers.
everest
Posts: 96
Joined: 31 May 2010, 9:01 AM

Post by everest »

It is a very simple FTDI adapter sold by Parallax for around $15. It's consistently been the most solid adapter I've ever used, but in this case has a bit of an annoying habit!

-Jeff
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

IDE CPU Utilization Spike

Post by GTBecker »

You say you're removing the hardware while the application port is
open? How would you have the OS handle that circumstance?


Tom
Tom
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

everest wrote:It is a very simple FTDI adapter sold by Parallax for around $15.
I've used several of these under Windows/Linux/OSX...which has a Prolific chipset. I've never tested your scenario but it might be worth $10 to see if its driver handles this.

These are even cheaper...The one on the left uses Prolific, the one in the middlet is Silicon Labs.
Post Reply