1

I use ATTiny2313 microcontroller to drive a linear CCD imager. That's all it does - an infinite loop that toggles six IO ports at different times. However, it is only a 20MHz controller. I calculated that I need about 200MHz microcontroller. At these speeds they are 32bit and too big, and not made in DIP packages.

Does anyone have an idea of what I could use instead of microcontroller to get the same function? Unfortunately, not all the waveforms are 50% duty cycle:

enter image description here

I heard about XCR3256XL 256 Macrocell CPLD. Could someone tell me how I could use it?

Nazar
  • 3,142
  • 4
  • 35
  • 62
  • Cant you just use individual Crystal oscillators?, just connect there output enables to the uController so you have control over them. (or connect them all to one pin so you can start them in synchrony.. ) – Tim M Apr 11 '14 at 13:42
  • @TimMottram Just edited my question. As you can see, since the wave forms are not 50% duty, I can not use just crystals. – Nazar Apr 11 '14 at 13:58
  • I assume, there should be some other programmable logic – Nazar Apr 11 '14 at 13:58
  • Can you build a circuit with standard logic chips? – John U Apr 11 '14 at 13:59
  • @JohnU I probably could, if it is not too complicated. But just looking at my application, it is worth seeking for an alternative? Can I achieve such function with other approach (without unreasonable complications) ? – Nazar Apr 11 '14 at 14:03
  • 1
    I fail to see how 6 individual crystal oscillators would be better than 1 MCU. That's a very expensive solution which is probably vulnerable to physical impact, such as... shipping the board. To me, it sounds like a 1970s solution, rather than a 2010s one. – Lundin Apr 11 '14 at 14:04
  • 1
    @Lundin Because they can run as speeds of over 200MHz each, now since OP can provided us with timing diagrams I can now see that this would not be a solution. But if, in another application you wanted 6 high speed clock sources a uController is a terrible solution, 6 high speed crystals is a far better one. – Tim M Apr 11 '14 at 14:07
  • 256 macrocells seem like a lot more than what you need for this task. Also, the models of the XCR3256XL I see on Digikey cost >$15 and the smallest package is a 144pin SMD package. This does not seem like a good match for what you asked for. – microtherion Apr 11 '14 at 14:09
  • I think that, if you want to avoid circuit complexity, just using a 32 bit PIC or equivalent is a good choice, it gives you flexibility, and is coded in embedded C which is easy to learn, and also, seeing as your program will be very simple, not take much time to do. You can leave most of the pins unconnected as you only want the 6 lines, you can probably get a QFP to DIL converter on ebay if you really want DIL. Are you designing thin on a PCB, if not you can get proto boards which will make your life easier. – Tim M Apr 11 '14 at 14:15
  • What kind of values are we talking about for the t1… in your diagram? – microtherion Apr 11 '14 at 14:17
  • @TimMottram Obviously, you wouldn't use AtTiny, PIC or some other slow, hobbyist junk... but rather a low-cost DSP. – Lundin Apr 11 '14 at 14:22
  • 2
    what about clock generating ic's? something like this: http://www.microsemi.com/documents/clock/ds/MAX3636.pdf it's quite expensive but maybe a bit of research can lead to the right choice for your application. i've just googled "programmable clock generator chip" (no quotes) – Vladimir Cravero Apr 11 '14 at 14:28
  • on silabs.com they even customize the chips for you programming them in some proprietary way... I can't guess pricing though. I't be useful to know if that's a one-piece project or you're planning to produce it. – Vladimir Cravero Apr 11 '14 at 14:34
  • If DIP package is a requirement, your choices will be heavily constrained. – Spehro Pefhany Apr 11 '14 at 14:36
  • A CPLD is a possibility, but it tends to have a much steeper learning curve than a processor. Also you will need to learn to deal with leaded surface mount packages, but it's high time to do that even for working with processors. And it's not tricky to learn - you have to make or buy a board, use flux, and learn that *surface tension* rather than *tip size* is the primary tool for getting the solder in the right places. A processor with a number of hardware timer channels might be a solution too. – Chris Stratton Apr 11 '14 at 14:44
  • 3
    6 separate crystal oscillators would potentially drift out of sync, you'd surely want ONE oscillator clocking a circuit that then outputs 6 signals. – John U Apr 11 '14 at 14:50
  • @microtherion t1 = 5ns minimum. – Nazar Apr 11 '14 at 14:57

1 Answers1

3

Since your pattern repeats you can use a counter and a ROM. A clock to a binary counter chip and the counter outputs are the address lines of the ROM. The ROM contents are a truth table to create the output you need and the outputs are the data lines of the ROM. The clock can run continuously and as it wraps around or rolls over, the pattern will repeat (or several cycles will repeat - you can do whatever you want this way). It looks like you can use a very small 8 bit ROM, like a simple fusible link ROM. Could be a two chip solution or in a small FPGA. The CPLD might be OK as well. It looks like you don't need any flip-flops and it can all be combinatorial logic (unless you use a CPLD or FPGA and have to make your own counter).

C. Towne Springer
  • 2,141
  • 11
  • 14
  • I've been wondering if something along these lines would work. Two concerns I can see: (1) 5ns seems an extremely aggressive speed target, especially for a two chip solution. (2) Are the outputs of ROMs typically guaranteed to be hazard free? For clock signals, they'd pretty much have to be. – microtherion Apr 11 '14 at 16:08
  • Speed is no problem. The parts in PCs are running over 1 GHz. The fusible link ROMs are basically wires with fuses. You can't get much faster. I think all the parallel ROMs are plenty fast. To be hazard free you may need a latch on the output or to clock an output enable. You could pass the clock through a NAND or a buffer to get a little delay of a latch enable, but a latch will have a little delay anyway. A ROM emulates combinatorial logic, but faster, and the pathway from input to output is only one stage long for all input combinations. I don't recall hazard problems. Anyone recent exper? – C. Towne Springer Apr 11 '14 at 16:49
  • In the 80's we did this on Apple II cards. A little 256 byte ROM replaced a handful of logic chips. IIRC it is in the IWM for the Disk II interface. I did 8 bit gray scale video rate ADC and DACs at the time and common parts from Fry's were plenty fast for 7 to 20 MHz. – C. Towne Springer Apr 11 '14 at 16:53
  • Agree this should be a simple task for an FPGA. – tcrosley Apr 11 '14 at 17:29
  • @C.TowneSpringer That sounds interesting. All of this is new to me. Could you, please, expand on your answer? Give some part names? Example? You mean that I would not need a microcontroller? – Nazar Apr 11 '14 at 18:15
  • @C.TowneSpringer I just checked MouserElectronics website. The EEPROMs like SN74HC590 (@20MHz max) and Counters like AT28C010 (@5Mhz max) available, whereas I need some for 200MHz min. Was I looking in the wrong place? – Nazar Apr 11 '14 at 19:00
  • Right. No micro needed. 200MHz? I thought you said 20. A FPGA might be the way to go. A counter will be a library part. How many clocks long is one complete cycle. I mean the cycle that repeats without variation, like a complete read of the sensor. – C. Towne Springer Apr 11 '14 at 19:04
  • @C.TowneSpringer I think about 8k Bytes. Or multiple of it, if frequency multiplied. I could probably make it with 100MHz. Any suggestions? – Nazar Apr 11 '14 at 21:39
  • 1
    I may have to quit giving this advice for anything over 20 MHz. I can't find modern PROMs or EPROMS or OTP or fusible link that have kept up with microprocessor speeds. Mostly I find old standby 32Kx8 at 5 MHz. (BTW, STM32F4 family ARM M4 chips are 168 MHz and have DMA and are very inexpensive. FPGA may be the best choice). – C. Towne Springer Apr 11 '14 at 22:45
  • 1
    Alternative - and getting complicated - battery back a Static RAM so it holds data after programming with a truth table and use it like a ROM. The Cypress CY7C199D-10ZXI is in a useable package and is 32Kx8 and 10 ns. I can't find any ROMs that fast. – C. Towne Springer Apr 11 '14 at 23:35