Menu

Troubleshooting Communication

Today, I responded to a PPMScope communications problem e-mail, similar to several others I've responded to in the past. I wanted to share the e-mail at large in hopes that it would help others with similar problems and give me something to refer people to in the future. The following is a description of the problem:

Dear sir,

We have constructed the circuit on a PCB for PPMscope but we are unable to connect to our PC. The red circle seen on the left of PPMscope screen is always red. We are using a USB to serial converter (FT232RL) to connect to our laptop. Please help us.

Sincerely,
User

And my response:

Dear User,

I'm going to start with the FT232RL. If you can confirm that the Windows driver is installed, that would be great. If the Windows driver did not install, you can install it manually using this link (http://www.ftdichip.com/Drivers/VCP.htm).

If the driver is installed and the device was not recognized, you should check the connections to the FT232RL. I'd start by making sure power is applied to the chip (i.e. 5 volts should be applied to pins 4 and 20, and 0 volts applied to pins 25, 7, 18, 21, and 26). Then I'd check if pin 16 is connected to D- (pin 2 on the USB connector) and pin 15 is connected to D+ (pin 3 on the USB connector). The schematic at http://jonw0224.tripod.com/PPMHelp/USBToSerial.pdf is a good reference.

If the driver is installed and the device was recognized, you probably have a good FT232RL. Here is a screenshot of a good FT232RL from device manager and clicking the properties of the USB comm port.

http://www.flickr.com/x/t/0091009/photos/70238097@N03/9470819101/

The screenshot is from Windows 7 and my serial port is COM5.

If you want to check the FT232RL further, you can by disconnecting the FT232RL from the PIC and shorting the RX and TX pins (pins 1 and 5). Then you can use a terminal emulation program such as Hyperterminal or Realterm (http://realterm.sourceforge.net/) to open the virtual comm port and send some text characters manually to the FT232RL. If all is working correctly, any characters you send should be echoed back to you.

Also, because you're having communications problems, I'm going to have you change a driver setting just to be sure. Follow the steps circled on the screen capture.

http://www.flickr.com/x/t/0093009/photos/70238097@N03/9473601318/

The steps are, (1) open device manager, (2) Right click on the com port and click properties, (3) Choose the port settings tab, (4) Click Advanced, (5) change the latency timer to 1 msec, and (6) click OK. What that setting change does is override the default of the device transmitting back to the computer every 16 msec to every 1 msec. This should remove any issues or doubts concerning serial port timeouts. Changing the setting can also increase the refresh rate of the oscilloscope software.

Next, let's check the connection to the microcontroller. You should make sure the microcontroller is powered (+5V applied to VDD and 0 V applied to VSS). And make sure the MCLR line is high (at +5V). The microcontroller should also be programmed with the firmware (in the PicHex directory of the program download). There are many options of programmers and programmer software. You can bet if you can program the chip, that you have a good microcontroller.

Make sure that TX of the FT232RL is connected to RX of the PIC (Pin 1 of the FT232 is connected to pin 26 of the PIC) and that RX of the FT232RL is connected to TX of the PIC (Pin 5 of the FT232 is connected to pin 25 of the PIC). Connecting the TX of the FT232 to the TX of the PIC and the RX to the RX is a common mistake. Also, you should leave out the Serial Interface Logic Level Circuits and the Parallel Port Interface Logic Buffer on the schematic since you're not using those interfaces. Finally, make sure that RA2 is pulled high to tell the PIC to use serial communications. The schematic at http://jonw0224.tripod.com/PPMHelp/PPM1MHz.pdf is a good reference.

Finally, let's check the software settings. Open the PPMScope software. Click on Configure -> Hardware. And set up the Hardware dialog as follows (this example uses COM5).

http://www.flickr.com/x/t/0095009/photos/70238097@N03/9470839211/

Note, if you are using Paul Messer's DSOScope firmware, you would change "Hardware version" to "DSOScope". Click OK. Then click on Configure -> Hardware Test. The resulting dialog should look like this:

http://www.flickr.com/x/t/0096009/photos/70238097@N03/9473600222/

If it looks like the image below, you have an incorrect serial port specified.

http://www.flickr.com/x/t/0096009/photos/70238097@N03/9470817577/

If it looks like the image below, you have a communications problem.

http://www.flickr.com/x/t/0093009/photos/70238097@N03/9473600922/

Sometimes, if you get the communications problem, you can simply power down the scope and then power it up again. This makes sure that the FT232RL and microcontroller are reset to the correct settings. If you run a hardware test again after the scope is reset, it may begin communicating.

Once you have it communicating, I recommend saving the settings in the default.cfg file. From then on, you can simply open the PPMScope program with the scope connected to the PC and it is ready to use.

If you need any other help, feel free to contact me again.

Jonathan

Posted by jonw0224 2013-08-09

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.