Shop OBEX P1 Docs P2 Docs Learn Events
Programming the chip (beginner question) — Parallax Forums

Programming the chip (beginner question)

Hi.

I'd like to learn how to use Propeller chips in my projects, and for the moment I'm trying to figure out how to program one. I don't have a clip/plug, but I was wondering if I could use a generic FTDI programmer (chinese clone, like this one).

I was planning to wire it up like in the attached pic, would that work?
And for writing the code, is PropellerIDE a good choice or is there something better?

Thanks and sorry if the question is dumb, I'm pretty new to electronics and I'd like to burn as few components as possible :)
876 x 882 - 155K

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-08-29 02:00
    Hi galgaroth, welcome to the Parallax forum!

    The basic hookup is fine but just plug the crystal in directly next to the chip and even cut the leads short on the crystal. Another thing is never ever forget decoupling capacitors, usually 0.1uF directly across the 3.3V and GND pins on each side separately, as close as possible to the chip, and again with short leads. Long leads = inductance, the enemy of high frequencies (in this case).

    But the DTR can't be used directly as normally this feeds through a capacitor and then a transistor with resistors before connecting to the reset. My quick tip that I've used before is if you want to cheat in the meantime you can try it with a small 1,000pF or anywhere thereabouts capacitor between the DTR and reset. Ideally though when you have time look up the transistor reset circuit that's used.

    BTW - I am assuming that "VCC" is 3.3V, do not connect 5V

    EDIT - TRY - FRY - DIE
    just had a look at the FTDI board I think you are using and it is jumpered for 5V out. DO NOT CONNECT THIS - just leave it open and supply your board with 3.3V. Don't rely on the 3.3V that is available from the FTDI module as it is only rated for very light loads, not for the Prop.

    Nonetheless SJ2 on the FTDI Basic needs to be strapped to 3.3V so that the TXD and DTR pins outputs 3.3V, not 5V. You could use the 5V from there to run a 3.3V regulator to power the Prop but it seems the to do that you need to connect directly to the USB 5V and not rely upon the VCC pin since this also sets the I/O voltage range.


  • Look up the datasheet for parallax propeller prop plug. It's shows details of the ftdi hookup and eprom .
  • @galgaroth, Welcome to the forum. You can follow the steps in the Propeller kit manual. Here's the link
    Install the Propeller tool, click on Help and click on "Propeller Education Kit PDF" The breadboard circuit starts on page 26. Just remember to double check your work before you apply power to the board.
    I have only used a Prop Plug on a breadboard setup.
  • If you are just starting out on propellor, you can do a whole lot with a FlIp module. Avoid the whole FTDI issue, at least for the time being.
  • galgarothgalgaroth Posts: 3
    edited 2018-08-30 17:36
    Thank you all for the replies :)

    I would use a clip/plug or the Flip module if possible, but all I have to work with is the Propeller chip and the FTDI programmer...

    I read the suggested documentation and modified the schematic. It's attached below, could you please tell me if I understood everything correctly and if it would work? In the real circuit I'll keep the leads of the crystal and the caps to a minimum, I just used long wires in the drawing to make it clear what connects to what.

    Speaking of the crystal, the datasheet says it's optional but what's the difference between using and not using it? I couldn't find the answer in the docs, maybe I didn't look in the right place...

    Edit:
    Just in case it's important, the capacitor connected to the NPN transistor's base is 100nF and the resistor is 33k. Vcc is 3.3V, coming from the voltage regulator. The decoupling caps across the Vcc and GND pins of the chip are 0.1uF.
    2136 x 969 - 328K
  • Pretty much have to use a crystal. If not, the clock is generated from a RC and isn't very accurate. See the CLK register, beginning on page 28.
  • lardomlardom Posts: 1,659
    edited 2018-08-30 18:23
    @galgaroth, please do not take shortcuts if you are new to this! I only see one regulator. Without a crystal you will not be able to use the Parallax Serial Terminal.
    I'm not going to ask you to press F7 to see if the computer recognizes your Propeller because you will have to power it up and if there's a mistake you may fry some of your components.
    Please follow the steps in the PDF and order everything in the parts list. Use a meter to check your work. You do need 3.3V and 5V regulators.
    The PDF will give you the basics and get you off to a good start.
  • @lardom I looked at the PDF you mentioned, and at page 27 I see the schematic, the power module does indeed have a 5V rail but I don't see it used anywhere... In the circuit below that, everything (Propeller chip, plug and EEPROM) uses 3.3V. So that's why I used only one voltage regulator (which outputs 3.3V). Am I missing something?
  • @galgaroth, I'm only a hobbyist so I am cautious with any tips I offer.
    Destroying components is part of the learning process. I don't mind losing them. It's been the price of my own education so I keep a supply of the components that I need.
    On page 28 of the PDF it talks about verifying your wiring connections. Do that first. If that tests OK you can open the serial terminal and press F7 to see if the computer recognizes your Propeller.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2018-08-31 05:05
    @galgaroth, Yes, the PDF shows a 5V source. It is used for the input power to the 3.3V regulator. Partly so that you don't drop 6-9V across the regulator and cause excessive heating and the other use of 5.0V would be for devices capable of using it. For example the MC320x can be powered by 3.3 or 5.0V for a higher performance level of the device. AT 3.3 V, the sample rate is 50ksps, at 5.0V it is 100ksps. There are a number of posts in the forum for interfacing a 5.0V logic device to the prop. Yes, the prop is a 3.3 V device, but with proper interfacing methods can utilize 5.0V level logic. If you wanted to and are careful as to what you are doing, you could use one bus strip on the bread board as +3, another as +5, another as ground/common, and perhaps yet another for +12/24 for motor/relay use. Or maybe +/- 15v on two strips for analog use, +3.3 (or +5 with a regulator just for the prop) and common as an example for the prop interfacing with analog sources.

    Quick edit. I would recommend getting a prop plug; they don;t cost that much. You know it will work and you also know you will not be getting a half-bassed or fako FTDI clone that may work questionably if at all.

    Nuther quick edit. I have a PPDB, and did not like the distance of bypass caps to the VDD/VSS pins. Soldered a 10uf and a 0.1uf cap directly across the pins under the board.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-08-31 08:04
    Bend the leads on the crystal to fit into the XI XO pins on the Prop and do not use jumper wires. You can even simply put the crystal in at an angle, it doesn't have to be right angles simply because of the Fritzing editor. The crystal circuit is very sensitive to noise, don't aggravate it any further.

    Same goes for the caps across the Prop's vdd and gnd, they must be across these pins, don't run them with jumper wires please..... They are rendered ineffective by these long leads. Remember to cut the leads short as well.
Sign In or Register to comment.