Shop OBEX P1 Docs P2 Docs Learn Events
Starting with propeller - Help — Parallax Forums

Starting with propeller - Help

pracaspracas Posts: 15
edited 2010-03-17 15:42 in Propeller 1
Today I received my first Propeller Chip and I'm hooking it up on a breadboard. Now i'm planning to use an FTDI for programming. I have 2 choices - Arduino USB Board or Xbee USB Explorer Board Both of which i can do the rx/tx wiring from. Now can i power the propeller with the FTDI's 3.3v output? (50ma) will that be sufficient? if not will a LD1117 work? Now another question is what are the signal levels for rx/tx? I presume its 3.3v as well however i'm wondering if it can take a direct 5v? Looking for some replies.

Cheers,
Pracas

Comments

  • max72max72 Posts: 1,155
    edited 2010-03-10 13:24
    50 mA are not enough.

    Check the datasheet. www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerDatasheet-v1.2.pdf

    Moreover consider a LED drains about 20mA, alone.

    It is a good practice to have a resistor in series to protect the propeller when interfacing with a 5V signal. 2.2k ohm is a widely used resitor value.

    Massimo
  • pracaspracas Posts: 15
    edited 2010-03-10 15:31
    What is the basic circuitry required to program and run the propeller? rx, tx, Vdd &Vss - will this alone be enough? do i require anything more? (i'm planning to do a manual reset. I hope this will work?)

    Cheers,
    Pracas
  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-10 15:52
    The basic circuitry needed for programming the Propeller is shown via links on this page:
    www.parallax.com/ProductInfo/Microcontrollers/PropellerGeneralInformation/PropellerMediaPage/tabid/832/Default.aspx

    There's an extensive discussion on interfacing the Propeller's 3.3V logic with 5V logic in this thread:
    http://forums.parallax.com/showthread.php?p=791527
    see under Technical Considerations.

    Also look at another of the "sticky threads" on the Propeller Education Kit Labs.

    A manual reset won't work very well. The download protocol is very timing sensitive and it's very difficult to get the timing right manually.
  • pracaspracas Posts: 15
    edited 2010-03-10 16:21
    Somebody said...
    A manual reset won't work very well. The download protocol is very timing sensitive and it's very difficult to get the timing right manually.

    Now I'm planning to use my Arduino to burn programs onto the propeller...Any ideas how i can overcome the reset?

    cheers,
    pracas
  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-10 16:48
    Have the Arduino generate the reset signal. There are examples in Spin and in Python of download routines for the Propeller that can be translated into Arduino C++ code.
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-10 17:08
    My understanding is that you want to remove the arduino from the board and connect the FTDI to the propeller, right?

    So, why not use the automatic reset? You only have to connect the same line which can be used as AVR reset to the propellers reset pin. Remember the different levels. Manual reset works, but it's much more comfortable to have the automatic reset.

    What you'll need next is the crystal, as it's nice to use the serial lines for debugging. But the serial interface needs to have a stable clock frequency.
  • pracaspracas Posts: 15
    edited 2010-03-10 17:16
    ok. I have done everything as follows

    Arduino IC removed
    Rx of the Arduino Pin Connected to RX of Propeller through a voltage divider 1k + 2k giving out 3.3 v
    Tx of the Arduino Pin Connected to TX of Propeller
    Reset from the Arduino Board connected to Reset of Propeller (PIN 11)
    3.3Volts from another source provided to both Vdds
    All grounds connected together.
    Both Vss pins and Brownouts connected to Ground

    Now when i use the propeller tool to identify hadrware, it detects the FTDI port but says no propeller IC detected. What should i recheck? anything i'm overlooking?

    Cheers,
    Pracas
  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-10 17:44
    Do you have a schematic of the Arduino board? There may be other circuitry between the FTDI chip and the Arduino that's interfering with the programming process. The Propeller is detected by resetting it, sending it specific data, and seeing if it responds within the required timeout period.
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-10 17:45
    Propeller Tool - Edit - Preferences - Operation
    Is "Propeller Reset Signal" set to DTR?

    No level shift for the reset?

    The reset line on the arduino board has some soldering bridge pins. Did you add the soldering bridge?
  • pracaspracas Posts: 15
    edited 2010-03-11 01:27
    MagIO2 said...
    No level shift for the reset? The reset line on the arduino board has some soldering bridge pins. Is "Propeller Reset Signal" set to DTR?

    Whats a soldering bridge? I'm using a fully functional arduino board with the ic removed. so i presume this should be ok. I have used a 10k resistor in series for the reset and no level shifting. When i try level shifting using a voltage divider, there seems to be a short circuit, perhaps this can help explain something... Yes, the Reset Signal is set to DTR
    Mike Green said...
    Do you have a schematic of the Arduino board?
    Yes, its the same as this
    http://arduino.cc/en/Main/ArduinoBoardDuemilanove

    Here is something more on the reset switch of the arduino...
    about the arduino reset said...
    The reset pin is held high with a 10k resistor, the DTR line from the serial is connected to it through a 0.1uF capacitor. When the serial transfer is initialised the DTR goes low, temporarily dragging the reset with it via the capacitor. The pullup resistor returns the reset to high afterwards. The manual reset switch just shorts reset to ground.

    Cheers,
    Pracas

    Post Edited (pracas) : 3/11/2010 1:34:31 AM GMT
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-11 07:31
    Oh ... now I had a closer look to the schematic. I missunderstood the RESET-EN in the schematic. I thought it would be for choosing between capacitor driven reset and direct connection between FTDR and propeller reset pin.
    Well, I think that the capacitor is the problem. It only gives a short reset peak. The propeller tool and propeller boot program are very damageable when the timings don't fit. So, you should find the reset pin of the FTDI ( or find the RESET-EN pin 1) and connect it via diode to the propeller (kathode on FTDI side, anode on propeller side). As you're no longer using the arduino reset pin, you have to add a pullup by yourself.

    Post Edited (MagIO2) : 3/11/2010 7:38:12 AM GMT
  • pracaspracas Posts: 15
    edited 2010-03-11 08:17
    MagIO2 said...
    Oh ... now I had a closer look to the schematic. I missunderstood the RESET-EN in the schematic. I thought it would be for choosing between capacitor driven reset and direct connection between FTDR and propeller reset pin.
    Well, I think that the capacitor is the problem. It only gives a short reset peak. The propeller tool and propeller boot program are very damageable when the timings don't fit. So, you should find the reset pin of the FTDI ( or find the RESET-EN pin 1) and connect it via diode to the propeller (kathode on FTDI side, anode on propeller side). As you're no longer using the arduino reset pin, you have to add a pullup by yourself.

    Whats the best choice of diode here?

    Where do i add a pull up? why is this required? I do not understand this part [noparse]:([/noparse]

    Cheers,
    pracas
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-11 10:24
    You move the connection of the propeller reset from one side of the capacitor to the other. So, the resistor that's in place on the arduino board won't won't work anymore. It pulls up the wrong side.

    FTDI DTR pin ---> Kathode of diode / Anode of diode ---> pullup to be added ----> 3,3V
                                                         |
                                                          -> reset pin of propeller
                                                       [noparse][[/noparse] | ]
                                                    reset button
                                                         |
                                                        GND
    
    

    Reset button is optional.

    .....

    Forget all I said before, have a look at the demo-board schematic in the datasheet, page 25:·http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerDatasheet-v1.2.pdf
    that's prooven. Hope you have any kind of NPN transistor.
  • pracaspracas Posts: 15
    edited 2010-03-11 11:48
    Thanks. will try and update you.

    Cheers,
    Pracas
  • pracaspracas Posts: 15
    edited 2010-03-17 05:18
    jumpin.gif

    YAY! I got it working... My propeller is detected... and I'm able to program the flash!!! the downside is I'm unable to program the eeprom. i get a message saying 'EEPROM Programming Error on COM7'... Now what is this? and how do i diagonize? I dont have any external eeprom attached? Is this required? I believe there in a built-in eeprom on the propeller chip?

    Cheers,
    Pracas

    Post Edited (pracas) : 3/17/2010 7:37:42 AM GMT
  • Cats92Cats92 Posts: 149
    edited 2010-03-17 12:08
    Have you seen this comment ?
    May be useful.

    http://forums.parallax.com/forums/default.aspx?f=25&m=373027

    from RevAaron it says :

    "
    I asked about this two weeks ago- curious what the bare minimum was to get up and running on a breadboard. I got my DIP Propellers today. 5 minutes of tinkering later and I had a ready to use Propeller dev setup.

    The only real deviation is that I'm using a crystal. No reason not to use one. Without one, you'll be running at a really low speed, possibly with timing/reliability issues on top of it. If cost is *that* much of an issue, you'd be better off with a $2 PIC18 or mid-range AVR. Heck, you could get a lower-end PIC32 and a crystal for less than $5. For a high-performance and higher priced controller like the Propeller it's hard to argue that it's worth the $0.10 - $0.15 you'd save per crystal (in bulk) to cripple an $8 MCU into $1 performance. Net loss of $6.80. :P

    Don't get me wrong- I'm all for trying things just because. I'd be happy to try it without the crystal if anyone is curious. In lieu of a PropPlug I used a Arduino- both the Arduino and the PropPlug use the FTDI FT232RL chip to do USB to TTL. Handy for the regulated power, too. [noparse]:)[/noparse]

    "
  • pracaspracas Posts: 15
    edited 2010-03-17 14:12
    Well there seems to be some trouble with EEPROM. I tried a 24c16 and it said 'error verifying eeprom' and so i tried another eeprom(same 24c16) and it still gives the same error. Is this a propeller error or a eeprom? how can i check this?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-17 14:32
    You need a 32K byte or larger EEPROM (xxx256, xxx512, xxx1024). The 24c16 is a 2K byte EEPROM.
  • pracaspracas Posts: 15
    edited 2010-03-17 14:40
    Thats it! thanks mike! smile.gif
    I'm getting one now.

    Are there any suggested good documentations / reference for the SPIN language?

    I'm bowled at the first program trying to figure out what the 'cnt' in the following statement stands for and why it is needed.

    waitcnt(10_000_000 + cnt)

    I can understand the waitcnt function but the cnt... eyes.gif
  • rjo_rjo_ Posts: 1,825
    edited 2010-03-17 14:44
    There is no reason to suspect a propeller error... and there is no particular reason to suspect an eeprom problem either.

    You are probably running out of juice, but it could be a timing issue coming out of the arduino side.

    Cats is right.... if you build the learning lab circuit and test it out... which you can do for a few dollars, this problem will go away or be found outside of where you are looking.
  • LeonLeon Posts: 7,620
    edited 2010-03-17 15:03
    cnt is the current counter value, so you are waiting for 10_000_000 more ticks. It's in the Propeller Manual.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • pracaspracas Posts: 15
    edited 2010-03-17 15:11
    Thanks Leon,

    Just figured that out going through the education kit lab manual.

    Thanks everyone! I think i'm on with the propeller just waiting to check it out with a new eeprom.

    So far so good, only wish there was a help/detailed single reference like the arduino

    Cheers,
    pracas
  • max72max72 Posts: 1,155
    edited 2010-03-17 15:42
    From Propeller tool, select help.
    You'll get a manual and a quick reference.

    Moreover to learn from others, check the obex, you'll find a lot of working code to study, and modify.

    Massimo
Sign In or Register to comment.