Shop OBEX P1 Docs P2 Docs Learn Events
FTDI as a xtal source for propeller — Parallax Forums

FTDI as a xtal source for propeller

BitsBits Posts: 414
edited 2012-06-08 00:16 in Propeller 1
I am designing a very small board and real estate is scarce. That said I intend on using the FT232RL and want to exploit the 12Mhz xtal output. Can this be used as the Xtal for the propeller?

Also what about powering the propeller from the FT232RL?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 08:54
    You might get by with using the FT232RL's xtal output under two conditions:
    1. You're not doing video or anything else that requires an accurate frequency.
    2. You don't use PLL to multiply the 12 MHz to something higher. 12MHz is pushing the envelope as PLL source.

    As to powering the Prop from the 3V3 output that typically powers VCCIO, no. Use a separate regulator from the USB +5V supply. There are some restrictions about doing this. You best guide would be the schematics for the QuickStart and Prop BOE.

    -Phil
  • BitsBits Posts: 414
    edited 2012-06-07 09:11
    The data sheet states as follows:
    Clock Multiplier / Divider. The Clock Multiplier / Divider takes the 12MHz input from the Internal Oscillator function and generates the 48MHz, 24MHz, 12MHz and 6MHz reference clock signals. The 48Mz clock reference is used by the USB DPLL and the Baud Rate Generator blocks.

    Therefore I could set the clock 6Mhz and then use the propellers PLL. You think this is a good idea?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 09:21
    Crystals are cheap. I'd use a separate crystal with the Prop. It using the clock output from the FT232RL were a good idea, Parallax would have done so on the QuickStart in order to save money. Even if you did get it to work, you'd be limiting the kinds of apps you could use your board for, since you would not have an accurate or stable clock source.

    -Phil
  • BitsBits Posts: 414
    edited 2012-06-07 09:25
    yea crystals are cheap but space is my issue and crystals are huge for what they provide. Hum... I will keep thinking.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-06-07 09:44
    ..(if) using the clock output from the FT232RL were a good idea, Parallax would have done so on the QuickStart in order to save money. Even if you did get it to work, you'd be limiting the kinds of apps you could use your board for, since you would not have an accurate or stable clock source.

    From what you are saying, it doesn't mean its a BAD idea, it just means that that the clock source has different stability and accuracy. The question is, is this stability and accuracy sufficient for the intended application? Parallax used a crystal on the quickstart as it is intended to be a robust general propose intro platform. We should at least find out what Bits is looking for. I think this is a cool idea and should at least be explored. The experiments that go against conventional wisdom are the have a lower likelihood of succeeding, but have a higher likelihood of revealing a cool new result.

    Bits, what is the intended application of your board? How does stability and accuracy impact your target?
  • BitsBits Posts: 414
    edited 2012-06-07 10:03
    The board I am designing has an approximate size of 1.5" x 2.75" and includes circuits for the following: USB communications, 10 Amp H-bridge, 20 Bit ADC, 1 stepper motor driver and a few other simple I/O nick-knacks. The clock will have to be accurate up to about 1 second within a 8 hour period - so no big deal. No video by-the-way.

    I want to maximize the IC's I have selected and used there secondary features, like in the FTDI Ic's clock and CBUS0..6 pins. It would be great if I could also use the voltage regulator already installed inside th eFTDI ic but seems the current capabilities would be inadequate to run a propeller.

    All the circuits fit but I am trying to make space for things like a reference regulator (20 bit ADC ic needs a clean reference). Resistors are 1206 package but I can go smaller as its a tight fit now then again I hate soldering anything smaller than a 1206. I might
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 10:11
    Bits wrote:
    The clock will have to be accurate up to about 1 second within a 8 hour period - so no big deal.
    Given that requirement, I'd say no to the FT232RL as a clock source. I doubt that it's anywhere near that accurate. It's not a crystal, remember, but internal to the device's silicon. You can use a 10 MHz SMD crystal, and they're quite small. Both the Propeller Backpack and Spin Stamp employ them to save space.

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2012-06-07 10:17
    I'm not sure that you will gain anything in the way of real-estate ... briefly looking over the datasheet, the option to use a crystal is programatically set in the FTDI. In other words you either use an external 12MHz crystal or the built in internal reference, but not both. From what I gather, your trying to use the internal oscillator, and bleed off of the 12MHz output to drive a Propeller. In this case I don't think that a 12MHz reference would be available with the internal oscillator selected on the FTDI.
  • BitsBits Posts: 414
    edited 2012-06-07 10:30
    I was thinking that I could configure the CBUS0 pin to 6Mhz not 12Mhz (for clarity purposes I mention this). The CBUS0 pin on page 7.4 here shows how its a clock source.

    It does mention that the clock signal is +/- 0.7% at 6Mhz but that is all it mentions. :(
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2012-06-07 10:34
    Bits,

    Follow the link in section 7.6 of that same document. ... it looks like one or the other to me.
  • pedwardpedward Posts: 1,642
    edited 2012-06-07 10:46
    The clock from the FT232 doesn't work until the chip has been enumerated via USB. This means the prop will not get a clock until the FT232 has been plugged into a computer. I looked at using the FT232 for the same purpose, but decided to put a 6Mhz cylindrical can crystal.

    As for running the prop from the 3v3 regulator of the FT232, it can be done, and the datasheet permits this. The limitation is 50ma output. I chose to do this on my board and followed the design guidelines in the FT232 datasheet.

    Since you are designing a stepper motor controller, I would not advise using the regulator of the FT232.

    If you are really limited on space, I might suggest just putting a header on the board for a Prop Plug instead of building the USB into the board.
  • BitsBits Posts: 414
    edited 2012-06-07 11:01
    pedward,

    The stepper motor is running off an external switching PS at 15V 10 amps so the only IC I wanted to run at 3.3v was the propeller and the 24lc256. Boy it would be cool to use the eeprom on the FTDI ic to store the propeller code but that's a different dream.
  • BitsBits Posts: 414
    edited 2012-06-07 11:07
    Apparently the CBUS pins can be ran at 6 MHz but as mentioned by pedward it has to be enumerated.

    Not to mention at +/- 1667ppm considering a crystal is +/-30ppm this is a slight difference and ill probably go with a crystal.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 11:38
    Bits wrote:
    It does mention that the clock signal is +/- 0.7% at 6Mhz

    That's 7000 ppm.
    Bits wrote:
    The clock will have to be accurate up to about 1 second within a 8 hour period

    That's 34.7 ppm.

    Here's the DigiKey part number for the 10 MHz crystal: XC1510CT-ND. Its footprint is only 5mm x 3.2mm.

    -Phil
  • BitsBits Posts: 414
    edited 2012-06-07 11:56
    Nice part. I thank you.

    The capacitance is not as good as I would like but, its a far cry better than where I was headed.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 12:34
    What were you looking for capacitance-wise? This is the crystal used with the Propeller Backpack, BTW.

    -Phil
  • jmgjmg Posts: 15,183
    edited 2012-06-07 13:13
    Bits wrote: »
    Resistors are 1206 package but I can go smaller as its a tight fit now then again I hate soldering anything smaller than a 1206.

    1206 are huge - use those only if Power Numbers say you must. 0805 are just as easy to work with, and only 0603 and 0402 start to get hard to handle - but only slightly so.

    1206 are so 'old hat' they are now on the back of the price curve.

    That should give you room for a crystal.

    At 6MHz the size of the crystal element limits how small a package can be, but there are also Ceramic resonators.
    They come down to 2mmx4mm in size, and sit between the FTDI On-Chip Osc, and a crystal.in stability.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-07 13:21
    0603's aren't that hard to solder. You just need a pair of pointy tweezers, and a fine-tipped soldering iron. The trick is to tin one (and only one) pad first. Then grab the resistor with the tweezers and force it into the tinned puddle of solder as it's being reheated. Remove the iron and let it cool. The resistor will now stay in place while you solder the other side.

    That said, however, I don't think you'll have much success soldering the crystal I recommended by hand, since the pads are on the bottom and not exposed. You can do it with solder paste from a syringe and a temp-controlled toaster oven, though.

    -Phil
  • AribaAriba Posts: 2,690
    edited 2012-06-07 13:31
    The internal frequency of the FT232RL is synchronized to the USB signal on the bus with the help of a PLL. So the clock is as accurate as the USB signal, which is generated from a crystal inside the PC.

    As long as the Propeller not needs more than 50mA (depends on the code and used cogs) and the circuit is always connected to a PC then this should work. Be aware that the clock also stops while in suspend mode. If you power the Prop from the FT232 then there is also no reset proplem - no need for the QuickStart tri-state buffers.

    Andy
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-06-07 15:35
    Hi Phil;
    0603's aren't that hard to solder. You just need a pair of pointy tweezers, and a fine-tipped soldering iron.
    Just to add:
    I use the "reverse" type of tweezers. You squeeze to open it and release to grab the resister chip.
    I prefer this type because it statically holds the resister.

    I prefer the 0603 size whenever possible, th 0402 is just to small and the larger just takes too much room.

    Duane J
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-06-07 22:09
    Bits: Here are some ideas...

    A sot23 3v3 regulator from 5V is small but you will need an input and output cap I use 10uF ceramic 0805. If you are sure the prop (and driving the FTE/etc) will not draw more than 50mA then by all means use the FTDI regulator output.

    As for the OSC output from the FTDI, just remember as said above, it will not be active until enumeration is done by the PC USB, and IIRC it also ceases on a USB reset. I have found no problems with 13.5MHz xtals on the prop with PLLx8. Chip indicated that it should work to 14.31818MHz somewhere. However, commercial circuits should be aware these are well out of specs. But as you say, the FTDI can divide by 2, so 6MHz will be fine except for its accuracy. If that is ok, and you can take advantage of this too. Have you looked at the new FTDI chip (cannot recall its number - there was a thread recently - 1mth ago???)? Think it was cheaper and smaller.

    1206 resistors and capacitors. I use 0805 regularly without problems. I would not like to solder heaps of pcbs by hand with lots of these. However, can you use ResNets (x4)??? They come in 0603 size (1206 package). Now they are tiny but as long as you extend the pads out they are in fact quite easy to solder by hand once you have the hang of it. See CRA6S8, YC164J- on digikey. Use the J version - cannot recall if they call them convex or concave - think convex - where the pins are flat and the recess is between the pins are slightly easier.

    Do you require 32/64KB eeprom??? If not, you can use 24LC64 (8KB) in a sot23 package. Otherwise use the TSSOP for the 24LC512. Just be aware the 24LC64 requires a special download program - I have tested the 24LC64 and it works, but requires a special download sequence as you cannot program it by the PropTool/bst/etc.

    If you are adding the transistor reset circuit, you can use a sot23 transistor with an internal 10K between BE (will have 470R or 1K series resistor into the base which is fine) - saves a resistor. I use them on my latest designs.

    If you are hand soldering, consider putting parts on the uderside of your pcb.
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2012-06-07 23:39
    Cluso99 wrote: »
    ... a sot23 transistor with an internal 10K between BE ...

    [slaps forehead]
  • TubularTubular Posts: 4,706
    edited 2012-06-08 00:16
    Cluso99 wrote: »
    As for the OSC output from the FTDI, just remember as said above, it will not be active until enumeration is done by the PC USB, and IIRC it also ceases on a USB reset. I have found no problems with 13.5MHz xtals on the prop with PLLx8. Chip indicated that it should work to 14.31818MHz somewhere. However, commercial circuits should be aware these are well out of specs. But as you say, the FTDI can divide by 2, so 6MHz will be fine except for its accuracy. If that is ok, and you can take advantage of this too. Have you looked at the new FTDI chip (cannot recall its number - there was a thread recently - 1mth ago???)? Think it was cheaper and smaller.

    This is correct for the FT232R - when the usb cable is unplugged it stops outputting a clock signal.

    At first glance the newer equivalents (FT230X, FT231X) appear to have the same issue - the datasheet says "*When in USB suspend mode the outputs clocks are also suspended."
    However it would pay to check in with them to verify, since its a whole new generation of devices. Perhaps there is a say of ignoring usb suspend or something. If space is really an issue there is a 3x3mm chip with 10 pins that communicates over I2C (FT200XD), it still has the 3v3 output and a single CBUS output.
Sign In or Register to comment.