Shop OBEX P1 Docs P2 Docs Learn Events
Problem Communicating with Propeller — Parallax Forums

Problem Communicating with Propeller

Wu HaoxuanWu Haoxuan Posts: 14
edited 2014-06-18 16:28 in Propeller 1
Hello, and thank you for clicking on this forum post. I would be grateful for any help on this problem I'm having. When I try to program the Propeller via a PropPlug, I get the following message in a Communication Error window:

"No propeller chip found on any serial port. Scanned COM5."



The propeller (DIP-40 package) is installed on a custom prototype board, along with the recommended EEPROM chip and a regulated supply taking power from a battery pack. I have thoroughly tested the traces for shorts and other wiring errors. All the wiring is correct. The regulated power is clean and steady. A PropPlug connects via a 4-pin header.

I also have a bench setup for developing Propeller applications. Everything (Propeller, EEPROM, PropPlug) works just fine when installed on the bench system. The trouble begins when I install it on the prototype board.

Right. Seems like there's obviously something wrong with the prototype board I made. Well as I was troubleshooting it I found a "fix" to the problem that gives me pause (and makes me go "wha...?"). I was probing the EEPROM power supply pins with my voltmeter and I accidentally shorted 3.3V to GND momentarily. The power supply indicator lamp dimmed, as one would expect. I removed the probe quickly and everything returned to normal. The next time I tried to program with F11, the Propeller was recognized and everything worked fine....until I reset the power using the ON/OFF switch. Then the same problem appeared.

What I've found is that when the power is first turned on, the Propeller will not communicate with the PC via the PropPlug. If I momentarily short the power supply pins to "reset the system", communication is restored. I can program and re-program as many times as I want with no problems, as long as I don't reset the power using the actual ON/OFF switch. As soon as I do that, I have to do this "fix" to get it to work again. Obviously, it isn't a very good fix and I don't want to have to keep doing it.

Here's another level of detail for you to consider. I tried programming the EEPROM on my bench setup and physically transferring the chip to the socket on my prototype board. If I turn the system on without the PropPlug plugged in, the Propeller starts up, runs the program, and the entire system works as I've designed it. If I turn the system on with the PropPlug plugged in, the Propeller does not start up. Of course, it begins to work if I perform the reset fix described above.



I hope this isn't too long or rambling. Any ideas what is going wrong here?

Thanks again for any help you might be able to offer.

Mr. Wu

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2014-06-16 14:16
    During the "boot" operation which includes downloading programs to the Propeller and the EEPROM, the Propeller must be running. It has to have power and it runs off its fast internal (RC) clock, so a crystal is not needed for this. There needs to be a working serial connection to the PC (provided by the PropPlug or other interface). There are several power and ground pins on the package and all of them need to be connected properly and Vdd pins have to be individually bypassed to Vss with something like 0.1uF.

    Make sure that the EEPROM is connected properly including a pullup on /WP.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-16 14:40
    Wu Haoxuan wrote:
    If I turn the system on without the PropPlug plugged in, the Propeller starts up, runs the program, and the entire system works as I've designed it. If I turn the system on with the PropPlug plugged in,
    When this happens with the PropPlug plugged in, is the USB cable to the computer also connected? If not, this is a known issue, wherein the P30 output from the Prop tries to power the PropPlug which, in turn, resets the Prop via the USB chip's DTR line. This will happen continuously if your program starts one of the serial I/O objects, keeping your program from getting any kind of start. The remedy is to not start serial I/O under this condition or to add a 2.2K-4.7K pull-up to P30, which will keep the PropPlug powered all the time.

    -Phil
  • Wu HaoxuanWu Haoxuan Posts: 14
    edited 2014-06-16 15:31
    Hi Mike and Phil, thank you both for your replies.

    @Mike: I think you found the problem. I was using a single bypass capacitor across both sides of the Propeller. I reconfigured it to bypass each side individually and the problem seems to be gone. Thank you very much.
  • Wu HaoxuanWu Haoxuan Posts: 14
    edited 2014-06-18 15:56
    Okay, so bypassing both sides of the Propeller seemed to have done the trick. Unfortunately, I'm back to the same issue for no apparent reason. It just stopped working after about a day.

    The thing that's really perplexing about this, to me, is the fact that I can sort of kick-start the system as I described earlier. Everything works fine after I do that, until I decide to reset the power with the ON/OFF switch. This leads me to believe the circuit is not the problem. Communication would never be possible if it wasn't physically wired correctly, not to mention the other stuff this program does with sensors/display (all of which works properly when I can get the program onto the Propeller).

    I've rebuilt the prototype circuit carefully. The power supply is clean. Both sides of the Propeller are getting power, each with its own bypass capacitor, as soon as I switch it on. I extensively tested everything with a continuity sensor and voltmeter before and after I put the chips in their sockets. The Propeller, EEPROM and PropPlug are connected exactly as recommended in the literature.

    I've checked my computer's com ports, including the hidden virtual ports. There were none except the COM5 port assigned to the PropPlug, which I uninstalled and reinstalled. At any rate, it (mostly) has no problem connecting to the same Propeller via the same PropPlug when it's on my bench setup.

    I modified the program to wait 5 seconds before even starting up a cog to run the serial communications object (FullDuplexSerialPlus.spin) to avoid any conflicts on the bus. Adding a 2k2 pull-up to P30 as per Phil's suggestion had no discernible effect.

    I'm starting to question my sanity, like this is a dream and soon I will wake up to a world where electricity works according to my knowledge and experience. Any other ideas?

    Pls

    ~Wu
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-18 16:02
    1. Did you ground the /BOE pin? If not, please do that.
    2. What is your crystal frequency, and what are your clock mode settings?

    -Phil
  • Wu HaoxuanWu Haoxuan Posts: 14
    edited 2014-06-18 16:10
    Yes, the BOEn pin is grounded.

    The crystal frequency is 5MHz. This program uses the pll16x mode.

    ~Wu
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-18 16:19
    I'm often surprised by how many people like the Propeller on a breadboard idea. I personally think there are plenty of ways to get the software wrong without adding hardware issues to the mix.

    I've questioned my sanity many times myself and some of these times have been when using a circuit on a breadboard. One thing that has worked many times when a breadboard circuit hasn't worked as expected is to pull the circuit up and start again in a different location on the board. Those metal clips inside the breadboard can get fatigued over time and not hold wires well enough to make a good electrical connection. By moving the location of the circuit you'll be using different metal clips which hopefully wont have the same problem.

    Early on in my electronics education (a few years ago), I had a bod habit of pushing too much of a wire or lead into the breadboard. I'd push so much wire into the hole that the wire would end up touching one of the adjacent rows causing a short.

    I use breadboards a lot but I don't really trust them.
  • Wu HaoxuanWu Haoxuan Posts: 14
    edited 2014-06-18 16:28
    Hi Duane, thank you for your reply. The bench system I've referred to is built on a breadboard. I have had the Propeller system installed on it for a few years with very few issues. I will keep your advice in mind though.

    My current situation involves a wire-and-solder circuit built on one of those generic proto-boards with the array of holes.

    ~Wu
Sign In or Register to comment.