Forum Update - Announcement about May 10th, 2018 update and your password.

Why is my propeller not running?

2»

Comments

  • It was suppose to say Try this configuration (I wrote fast and the auto correct changed it)
  • Try using a FT232 with a 5 MHz crystal if you have one
  • AribaAriba Posts: 2,187
    edited September 5 Vote Up1Vote Down
    Read this similar thread:
    forums.parallax.com/discussion/168888/programming-the-chip-beginner-question

    To make SimpleIDE to work with your C code, you need:
    - The Transistor/R/C reset circuit at the DTR pin.
    - A crystal (5 MHz) for reliable serial communication.
    - Bypass capacitors of 100nF at both sides of the Propeller at the supply pins.

    PropTool will detect a Propeller with DTR connected directly, and can download a code, but if you need serial communication, you also need the special reset circuit.
    This circuit generates a reset pulse only when the DTR pin goes from Low to High, so DTR can be constantly in high or low state without doing a reset, which is important because DTR is often controlled by terminals at open and close of the COM port, and not always the same way.
  • I have been using the Propeller with PropellerIDE and SPIN/PASM for a few months (and absolutely delighted with it) so I am very much still new to the mcu. I have not used SimpleIDE until now. This thread has prompted me to try a few things out.

    I put the propeller on a breadboard (5MHz crystal, FTDI breakout, NPN/R/C circuit from DTR, EEPROM, bypass capacitors - they could/should be closer to mcu). I then wrote a small SPIN program to (only) blink an LED and used PropellerIDE to build and load it to RAM. It worked perfectly. Then I changed _CLKMODE to RCFAST, removed the crystal and reprogrammed. It worked perfectly.

    I then switched to SimpleIDE and wrote an equivalent program in C. I replaced the crystal, set the board type to GENERIC and compiled and loaded to RAM. It worked perfectly. I then removed the crystal, set the board type to RCFAST and compiled and loaded to RAM. It compiled but failed to load to RAM.

    proploader -r -I /Applications/SimpleIDE.app/Contents/MacOS/../propeller-gcc/propeller-load/ -b rcfast -p /dev/cu.usbserial-FT1XN8LQ cmm/Welcome.elf
    Opening file 'cmm/Welcome.elf'
    ERROR: Download failed: -1

    I doubt whether I would ever use a propeller without a crystal but I am intrigued as to why I appear to be able to succeed without a crystal using PropellerIDE with SPIN, but I fail using SimpleIDE and C?

    Attached image of breadboard and scope image of voltage at DTR (yellow) and voltage at RESET (purple) on build with PropellerIDE.
    4032 x 3024 - 2M
    800 x 480 - 24K
  • Peter JakackiPeter Jakacki Posts: 7,577
    edited September 5 Vote Up1Vote Down
    No doubt it is using a two stage loader, the first part loads a small loader with RCFAST and then assumes a 5MHz crystal is available so it can switch to a much higher baud rate I guess. That's what I might do.


    Just tracked it down and it is indeed so. Ask David Betz.
    @ int Loader::fastLoadImageHelper(const uint8_t *image, int imageSize, LoadType lo
        /* open the transparent serial connection that will be used for the second-stage loader */
        if (m_connection->connect() != 0) {
            message("Failed to connect to target");
            nerror(ERROR_COMMUNICATION_LOST);
            return -1;
        }
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • Whenever I'm troubleshooting to see whether or not a Prop chip is bad I use the Parallax configuration with the Prop plug, crystal, Eprom etc.. Removes all of the guess work. I've had chips with blown out pins before mostly caused by some voltage spike etc.
  • No doubt it is using a two stage loader, the first part loads a small loader with RCFAST and then assumes a 5MHz crystal is available so it can switch to a much higher baud rate I guess. That's what I might do.

    Many thanks indeed.

  • mcuOnemcuOne Posts: 15
    edited September 5 Vote Up0Vote Down
    Wow, thanks you very much, thank you for the great work. I already thought that it was not on my USB2Serial adapter or on my plug connection on the breadboard. Thank you again for the very detailed answer.
    tw1 wrote: »
    I have been using the Propeller with PropellerIDE and SPIN/PASM for a few months (and absolutely delighted with it) so I am very much still new to the mcu. I have not used SimpleIDE until now. This thread has prompted me to try a few things out.

    I put the propeller on a breadboard (5MHz crystal, FTDI breakout, NPN/R/C circuit from DTR, EEPROM, bypass capacitors - they could/should be closer to mcu). I then wrote a small SPIN program to (only) blink an LED and used PropellerIDE to build and load it to RAM. It worked perfectly. Then I changed _CLKMODE to RCFAST, removed the crystal and reprogrammed. It worked perfectly.

    I then switched to SimpleIDE and wrote an equivalent program in C. I replaced the crystal, set the board type to GENERIC and compiled and loaded to RAM. It worked perfectly. I then removed the crystal, set the board type to RCFAST and compiled and loaded to RAM. It compiled but failed to load to RAM.

    proploader -r -I /Applications/SimpleIDE.app/Contents/MacOS/../propeller-gcc/propeller-load/ -b rcfast -p /dev/cu.usbserial-FT1XN8LQ cmm/Welcome.elf
    Opening file 'cmm/Welcome.elf'
    ERROR: Download failed: -1

    I doubt whether I would ever use a propeller without a crystal but I am intrigued as to why I appear to be able to succeed without a crystal using PropellerIDE with SPIN, but I fail using SimpleIDE and C?

    Attached image of breadboard and scope image of voltage at DTR (yellow) and voltage at RESET (purple) on build with PropellerIDE.



    Many thanks Peter Jakacki, I already had the assumption that it is the software, because it worked so wonderfully and without problems in Propeller Tool and Propeller IDE.
    No doubt it is using a two stage loader, the first part loads a small loader with RCFAST and then assumes a 5MHz crystal is available so it can switch to a much higher baud rate I guess. That's what I might do.


    Just tracked it down and it is indeed so. Ask David Betz.
    @ int Loader::fastLoadImageHelper(const uint8_t *image, int imageSize, LoadType lo
        /* open the transparent serial connection that will be used for the second-stage loader */
        if (m_connection->connect() != 0) {
            message("Failed to connect to target");
            nerror(ERROR_COMMUNICATION_LOST);
            return -1;
        }
    

    So and for me the thread is closed. You have been a great help to me, many thanks to the great community. My 5Mhz Crystals are definitely on my way home
Sign In or Register to comment.