The cable is then connected to the PC using a BAFO USB/Serial adaptor.
I tried connecting it directly or through a powered Dynex USB Hub (DX-4P2H).
I installed the AtomPro IDE 7.2.0.6 to rule out any bug in the more up to date 8 version.
In the Tools/Preferences dialog, if I click on “Find AtomPro”, I get an error dialog that says “Could not find AtomPro”. If I set it up to the right port and click Program, I get an error dialog that says “Atom must be connected for Auto detection”. If I set up the IDE to use an AtomPro28, clicking Program builds the program, then shows a “Loading” dialog and ends up with an error dialog that says “Error connecting to ATOM: The operation completed successfully”.
What exactly is supposed to go on between the atom and the PC at shake hand time? I’d like to write a small program that connects to the port, sends the bytes the atom is expecting and see what I receive.
I just added a bunch of info to the Bot Board users manual…
Programming - USB to Serial Cables?
The fastest way to program the Atom or Atom Pro microcontroller is with a PC that has a real serial port. If you have a desktop PC that does not have a serial port it is recommended that you install a serial port card into the PC. If your PC has a USB port it can be used to program the microcontroller, but some will slow the process down a bit.
We have tested the following USB to serial cables and are known to work.
BAFO BF-810
IOGear GUC232A
FTDI or Prolific based USB to serial cables have properties in their drivers called Latency and Buffer. You will need to reduce the size of the buffer from 4k to 1k and the Latency from 16 to 1. As drivers and hardware change it may be necessary to experiment with these values.
Many laptop USB ports are not powered. You can add a powered hub to make the USB to serial cable work for unpowered USB ports.
I can’t find those parameters. When I connect the BAFO cable, a new “Prolific USB-to-Serial Comm Port (COM14)” appears (well, obviously not always COM14, but…). If I go to the properties page, in the “Port Settings” tab, I have these options: Bits per second (115200), Data bits (8), Parity (None), Stop bits (1), Flow control (None). If I go to “Advanced…”, I can enable or disable “Use FIFO buffers (requires 16550 compatible UART)”. If it’s enabled I can change “Receive Buffer” from Low(1) to High(14) (it’s on high now) and “Transmit Buffer” from Low(1) to High(16) (it’s on high now). I can also change the port number (COM14 now).
Where are the size of the buffer and the latency options?
Latency and buffer size are driver settings not port settings. Access the driver properties using device manager, under Ports (COM&LPT) for your com port. Verify you have the newest drivers, I know the older FTDI drivers did not always have the latency adjustment so it is possible your Prolific drivers are dated. Remember that just because they came with the adapter does not mean they are the latest version. (speaking from FTDI experience here only, never used the BAFO adapter.)
The tab I was describing was comming from the device manager. Under Ports (COM & LPT), I have 3 ports, one of which is the “Prolific USB-to-Serial Comm Port (COM14)”. If I get the properties of that item, I get a dialog with 4 tabs: General (not much to configure, it says “This device is working properly”), “Port Settings” (what I described in a previous message), “Driver” and “Details”.
On the “Details” tab there is a lot of read only information.
On the “Driver” tab, there are 5 buttons:
Driver Details shows that I’m using 2 files: ser2pl.sys and serenum.sys, the first one from Prolific, version 3.0.1.0, the second one from Microsoft, version 6.0.6000.16386
Update Driver… (brings me to the page to change the driver of the adapter)
Roll Back Driver (disabled)
Disable (well, I don’t think that will help)
Uninstall (I don’t think that’ll help either).
I still can’t find those latency and buffer size parameters…
I suggest you break the problem up. Find a PC WITH a serial port, and get it working on that (mind the cables). THEN go back to trying the USB/serial dongle.
If you want to see if your serial cable is working, connect the tx and rx pins together (maybe with a 10k resistor in between). Open hyperterminal and see if you can send/receive stuff that you type (make sure echo is turned off).