Shop OBEX P1 Docs P2 Docs Learn Events
Problem with Prototype and don't know where to start to solve. — Parallax Forums

Problem with Prototype and don't know where to start to solve.

greybeardgreybeard Posts: 65
edited 2014-10-31 15:17 in Propeller 1
I have a project that will require the use of the Propeller as an integral part. I know the project will work because I have been using a PROPSTICK and a Professional Development Board (PDB) for proof of principal. In have integrated the PROPSTICK into a PCB for the completed project.

Now, I need to replace the PROPSTICK on the PCB by integrating the Propeller into the PCB. For a start I want to do a simple test of something that has the functionality of the PROPSTICK, but using the DIP versions of components, except for the FT232RL. The board would simply consist of a 3.3V regulator, a 24LC256 EPROM, a 5 Mhz Crystal, a 40 PIN Propeller, at FT232RL and a reset circuit. All based on the design of the PROPSTICK, Gadget Gangster and other designs.

I have a limited experience with EAGLE and PCB design and this is my first attempt to design a board with the Propeller.

Anyway. I designed the Board and had it made at a PCB house. The first and overwhelming problem is there is not clock. I used the 5MHZ crystal used the PROPSTICK and the PDB. At this point the PCB is only partially populated. The only components on the board are the 3.3V regulator, the crystal, and the propeller, which I socketed. The EPROM and the FT232RL is not on the board. I believe at this point I should be able to see the clock at the XO pin. I don't. There are only 8 connections that are required.

Pin 9(GND), 10(BOE), and 29(GND) are tied to ground - I used a meter to verify these are tied to ground.
pin 12 (VDD) and Pin 32(VDD) are tied to regulator output. Measured voltage at these pins was 3.29 V.
Pin 11 (RESET) is goes to the reset circuit and drifts high when power is applied.

First thing is to verify that the crystal and propeller are ok. I placed both the crystal and the propeller into the PDB and ran a few tests. They worked well. So... what's wrong. I have not idea where to start to solve this problem.

Anyone have suggestions???

Schematic and board layout attached,...... I hope.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-10-27 13:58
    My attempt at making my own Prop boards also didn't turn out as hoped.

    A couple of things stand out looking at your PCB design. I don't see a pull-up resistor on the I2C data line. This is required to boot from the EEPROM. It's also a good idea to include a pull-up on the I2C clock line. Some I2C drivers require pull-ups on both lines.

    The Propeller is very sensitive to potential differences across the chip. It's generally (possibly always) a good idea to have a 0.1uF cap next to each Vdd/Vss pair on the chip.

    Your power traces seem kind of thin but I don't know enough to know if they're too thin.
  • PublisonPublison Posts: 12,366
    edited 2014-10-27 14:48
    In the schematic, I don't see VSS on pins 12 and 29. Doesn't seem like the chip is getting power.

    Agree with Duane need bypass caps close to VDD and VSS near the chip.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-10-27 15:55
    You didn't mention having loaded a program into the Prop. When the Prop starts up, it runs on its internal 12MHz RC oscillator, and it takes a setting or a command in a program to turn on the xtal oscillator. Furthermore, if no program is loaded, even the 12MHz oscillator will soon shut down.

    You said there is not yet an eeprom nor the FT232, so you'd have to crib in a prop plug to load a program into RAM which could then fire up the crystal. Oh, +1 on the capacitors.
  • TubularTubular Posts: 4,702
    edited 2014-10-27 16:00
    I'm guessing there's a ground plane we don't see.

    How does the reset signal reach the base of the 2n2222?

    When attempting to boot (looking for the eeprom code), the prop takes 2 or 3mA, you can usually spot that as you release the reset button
  • greybeardgreybeard Posts: 65
    edited 2014-10-28 09:56
    Thanks for all the responses.

    I'll try to address each in order

    I'll add a pull-up on I2C-- Didn't see one on PROPSTICK but I probably missed it.
    I'll add Cap on VCC-- Didn't see on PROPSTICK -- probably a SMD chip -- Didn't know if I should add on or not.
    Power traces are 10 mil. May have an affect.

    VSS is the ground plane and connected via the pins.

    Reset circuit is not connected -- I have to do a manual reset

    Tracey Allen's response suggest that the internal startup of the propeller my be the cause. I don't remember reading information on that process. I have ASSUMED that the clock should run without attaching anything else. What have I missed??
  • greybeardgreybeard Posts: 65
    edited 2014-10-28 09:59
    You didn't mention having loaded a program into the Prop. When the Prop starts up, it runs on its internal 12MHz RC oscillator, and it takes a setting or a command in a program to turn on the xtal oscillator. Furthermore, if no program is loaded, even the 12MHz oscillator will soon shut down.

    You said there is not yet an eeprom nor the FT232, so you'd have to crib in a prop plug to load a program into RAM which could then fire up the crystal. Oh, +1 on the capacitors.

    I have ASSUMED that proper power and the crystal should generate a CLOCK -- What have I missed and please point me to the documentation. and ?? +1 on the capacitors -- is that good or bad??
  • GenetixGenetix Posts: 1,754
    edited 2014-10-28 10:26
    Greybeard, if you look at page 25 of the Propeller datasheet you will see that the 12 MHz default clock will actually be in the range of 8 to 20 Mhz, or 12 +/- 8 Mhz. Page 30 also has a graph that shows this frequency changes quickly with temperature.
    http://www.parallax.com/sites/default/files/downloads/P8X32A-Propeller-Datasheet-v1.4.0_0.pdf

    Take a look at Page 53 and 54 of the Propeller Education Kit Text for a really good explaination on how to change to change the clock frequency and its accuracy.
    http://www.parallax.com/sites/default/files/downloads/122-32305-PE-Kit-Labs-Fundamentals-Text-v1.2.pdf
  • greybeardgreybeard Posts: 65
    edited 2014-10-28 10:42
    Boot Sequence
    1. Power or reset applied

    2. After 50 ms, clock switches from 20 kHz RC to 12 MHz RC

    3. Cog 0 loads and runs "Boot Loader" from hub ROM

    4. Boot Loader checks for computer listening on serial port of I/O pins P30 and P31.
    a. If found, computer can either transfer a program to hub RAM and optionally
    to external EEPROM. If successful, jumps to step 7,
    otherwise continues to step 5.
    b. Computer can also instruct Propeller to suspend operation.

    5. Boot Loader checks for response from EEPROM with I/O pins P28 and P29.
    a. If found, 32 KB is transferred from EEPROM to hub RAM.
    b. If successful, jumps to step 7.

    6. When no computer host found and no EEPROM found, cog 0 is stopped,
    all I/O pins set to input mode, and Propeller goes into shutdown mode which stops the internal clock.

    7. After successfully loading a program into hub RAM
    (and not instructed by computer to suspend):
    Cog 0 loads and runs the "Spin Interpreter" code from hub ROM
    Spin Interpreter executes code in hub RAM

    I found the above on-line which and may be what I previously missed. I have several questions about this
    but none of the questions are germane to the current problem. Since I do not have communications
    with a host and no EPROM installed, the propeller just enters shutdown mode per step 6.

    I can load the EPROM with a program using the Professional Development Board(PDB) I have
    and see if the propeller operates. If it does, then I'll move on the FT232RL. I'll keep you posted. On thing at a time.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-10-28 13:57
    Oh my my my, it was 'orrible officer, just 'orrible.

    But where to begin...
    and I'm sorry I have to begin like this though...

    The PCB diagram doesn't really show us the copper so a photo is really needed here, it just doesn't seem right, and what is that trace that runs past and under the crystal doing??? It won't stop it but it should have at least run away from the crystal. Never trust an auto-router to do a man's job. The 0.1uF is a high frequency decoupler and needs to be nice and cosy with the Prop, normally one for each VDD/VSS pair, as it is it is virtually useless, you can't just plonk them anywhere on the board, and the electro's there seem hugely overdone. The regulator should have one on it's input though, the poor thing could be oscillating wildly although a DC meter will never only ever show you the average voltage, even if it had 2V of noise on it.

    The schematic shows a "mess" for the reset circuit, the DTR effectively goes to ground as does the base of the transistor, is that what you meant?

    Anyway, a photo of a bare unassembled board may help.

    BTW, please feel free to have your hardware designs vetted through the forum first before you get them made, especially as you are learning, and sometimes it's just one tiny little thing that makes all the difference.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-10-28 16:12
    Greybeard, I see you found the documentation about the start-up procedure. You're right about what happened, "the propeller just enters shutdown mode per step 6".

    Also, I believe your action plan is good, "I can load the EPROM with a program using the Professional Development Board(PDB) I have and see if the propeller operates. If it does, then I'll move on the FT232RL. I'll keep you posted. On thing at a time."

    You have a socket for the eeprom on your board, but from your board diagram I can't tell which pins are connected to the ground plane. Pins 1,2,3,4 and 7 have to be connected to ground. Also you'll need to add the pullups to +3.3V on SDA at least (pin 38 on the Prop, pin 5 on the 24LC256).

    From you measurements it sounds like you have the power supply hooked up correctly to the Propeller, but I'll echo others and ask that you add the bypass capacitors, 0.1uF close between pins 9 to 12 and pins 29 to 32.

    You'll have to pre-load a program onto the eeprom that will do something that allows you to observe the output. How about flash an led in series with a resistor? Run the same program on your PDB, then pull out that eeprom, and transfer it to your board. It should run the same. If you have trouble with the crystal, first try running a program with RCfast only, without the crystal active. "One thing at a time".
  • greybeardgreybeard Posts: 65
    edited 2014-10-29 09:03
    A Quick update for those keeping track.

    RIGHT Good catch -- DTR SHOULD GO to BASE of 2N2222. I'll fix that. I would have been a problem when I got the FT232RL but not in this stage. That's why I'm using a 1" by 3" prototype instead of a full size board.

    I preloaded an EPROM and it performed ok in the PDB. Put it in the PCB under test and still got the same behavior. Removed the crystal from the PDB and monitored the XO pin during startup and reset. X0 was low on start up and about 1/2 second later went high after reset released XO stays high until reset. Back to PCB. X0 Low and STAYED LOW throughout the startup/reset process. Never went high. Ummmmm.
    The only thing left is the 40 PIN socket the caps and the board. Crystal and Prop still work in the PDB. I think I'll buzz out a second board and use a different style 40 PIN socket and add a couple of caps. I'll let you know.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-10-29 11:42
    What did you load into the eeprom? How do you determine if it is working or not? Did you check the ground connections on pins 1,2,3,4,7 of the eeprom socket on your pcb, and did you add the pullup on sda? There is no reason your board shouldn't show you some joy, despite its other problems.

    If you buzz out another board, please feel free to run it by the eyes here before you commit.
  • greybeardgreybeard Posts: 65
    edited 2014-10-30 18:49
    Update. My first thought was the 40 pin socket but a continuity check on all pins were ok. Per the documentation, the prop should query pin 5 of the Erpom(prop P29). Not getting anything there. Put in bypass cat directly across pins 32(VDD) and pin 29(VSS). No joy. Move the crystal and soldered it directly to pin 31(XO) and pin 30 (XI). No joy. Noticed the absence of 10K pull up on Eprom pin 5 and installed one. No joy. Probed Pin5 of Eprom during reset with scope. Joy. Reset again without scope. No joy. Re-soldered pull-up resistor and Eprom pins. Restart. Joy. Reset. Joy. Restart. Joy. Looks like the problem may have been a combination of pull-up resistor and cold solder joint --- even though the continuity checks showed ok.

    On to the FT232RL and the reset circuit. I'll keep you posted.

    Note: Blue trances on the board image on the bottom layer which has a ground plane.

    The EPROM was loaded on the PDB and simply sets a few bits high and creates a 10 ms clock on a specific pin. I can tell it works by monitoring the specified pins with a scope.

    A second board (which I haven't used) is identical to this. I suspected the 40 pin socket because I've had problems with them before. Not the case now. I make small prototypes because experience has show that a PCB give slightly different performance than a simulation (i.e. LTLITE) or using a breadboard. I'll group up a couple of small prototypes on a larger prototype to minimize costs.
  • greybeardgreybeard Posts: 65
    edited 2014-10-31 12:57
    Update -- for those that have an interest: FT232RL now works. Set up the propeller serial terminal and did a loopback on P30 andP31. Re-worked the reset circuit. Can't get the Propeller Tool to recognize the chip unless the reset is set up to respond to the DTR properly. Looks like everything works. I'll work with it for a while before I attempt to integrate it into my main project. Then I'll try my luck with the QFP version.

    Major problem now is how to mark this thread as something other than "In Progress"
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-10-31 15:17
    greybeard wrote: »
    Update -- for those that have an interest: FT232RL now works. Set up the propeller serial terminal and did a loopback on P30 andP31. Re-worked the reset circuit. Can't get the Propeller Tool to recognize the chip unless the reset is set up to respond to the DTR properly. Looks like everything works. I'll work with it for a while before I attempt to integrate it into my main project. Then I'll try my luck with the QFP version.

    Major problem now is how to mark this thread as something other than "In Progress"

    Good to see you are solving it :)

    Go back to post #1 and edit it in advanced mode, there you can change the thread title etc etc.
Sign In or Register to comment.