divide-by-N

IT'S A PLAIN EMBEDDED PC BOARD, ABOUT 2" X 2", AND THE FREQUENCY WILL BE CHANGED SELDOM IF EVER. IT FIRES SOME SORT OF LASER.

JOHN

(WHO ALWAYS LIKED UPPERCASE)

Reply to
John Larkin
Loading thread data ...

Maybe one of those Xilinx Coolrunner CPLDs... they're cheap and don't need a micro or an external EEPROM to hold the configuration. IIRC the demo boards are quite reasonably priced (I've got one kicking around that I used for a s*tell*te subsystem design).

Reply to
Spehro Pefhany

One old trick is to connect an 8-bit counter into a NAND gate through eight series switches, using a TTL NAND so an open acts like a high. The gate output DC clears the counter. If you use a ripple counter, the decode is glitch-free up to the terminal count. But the ripple counter is slow. If you use a synchronous counter with a synchronous clear, that works too, but counts one more time.

John

Reply to
John Larkin

Some synchronous counters have jam resets, so they work just like the ripple counters, only faster.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

It would depend a lot on your range of "N". Maybe if we knew what the prospective "N"s would be, it would be more helpful. Do you want to program N itself with the dip switches? (at first I misread and thought, '8-position switch'.) In that case, any ol' presettable down counter would work (or, if they were inverted, an up counter) like the [74x]161, the [74x]193; the 393 has two 8-bit counters, which aren't presettable, but the appropriate number could be selected with a magnitude comparator, which number I don't remember off the top of my head, but any IC selection guide could help there.

I'm ass-u-me-ing that you don't want to do this in a CPLD/FPGA because you'd probably already have done it in VHDL or Verilog.

Hope This Helps! Rich

Reply to
Rich Grise

0 to 255? no, wait.. it would probably emit excessive EMI (gamma rays, perhaps) if you set it to 0.. so maybe 1 to 256.
Reply to
Spehro Pefhany

The famous ultraviolet counter catastrophe. ;)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Not that it's the best solution, but if you use the input as the PIC's clock and make the main loop something like:

set up pwm while (1) { read dip switches update pwm control regs }

Well, PIC may still be hosed because there are lots of things it can only do at Fclk/4, but an AVR could do something like that. You could get fancy and put the update in an interrupt-on-change handler and have the rest of the micro for something useful!

--
Ben Jackson AD7GD

http://www.ben.com/
Reply to
Ben Jackson

When you see the Cerenkov radiation coming off the solderless breadboard, it's too late!

Reply to
Spehro Pefhany

You'd probably escape with a few nasty UVA burns...with HC logic, there'd be a cutoff at 5 eV/photon, which is 248 nm.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

But the NAND decode is only glitch-free with a ripple counter.

John

Reply to
John Larkin

On a sunny day (Wed, 26 Aug 2009 14:13:47 -0400) it happened Phil Hobbs wrote in :

I one accidently made a ring oscillator in an FPGA. Only a few gates were involved, but it got smoking hot. The frequency must have been close to cosmic ray energy :-)

Reply to
Jan Panteltje

On a sunny day (Wed, 26 Aug 2009 18:25:33 GMT) it happened Ben Jackson wrote in :

Some PICs have a hardware counter with clock input on a pin (Timer 1 to be specfic in a 16F690), and allows async clock. It will then generate an interrupt if that timer overflows (it is a 16 bit timer). As the 16 bit counter is readable and writable, you could pre-load it. Have not tried it though, but should be very fast.

It can go even faster, pure hardware, as it also has a hardware compare module, quote from the 16F690 datasheet:

11.2 Compare Mode In Compare mode, the 16-bit CCPR1 register value i constantly compared against the TMR1 register pa value. When a match occurs, the CCP module may: · Toggle the CCP1 output · Set the CCP1 output · Clear the CCP1 output · Generate a Special Event Trigger · Generate a Software Interrupt The action on the pin is based on the value of the CCP1M control bits of the CCP1CON register. All Compare modes can generate an interrupt.

As the 16F690 also has an ADC, that could be used to get the voltage of a pot, and the value obtained to make a delay, but that would introduce some latency, would have to look a bit closer to see how long that delay should be and when it should start,

For a clock input on timer 1 the latency would only be nano seconds if the compare module is used.

Reply to
Jan Panteltje

Doesn't get much closer that that to John's specs.. even guaranteed to work to 10MHz over the miltary temp range, cheap and available.. just add a pullup network and go..

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

Pair of 74HC160,1,2,3 depending on binary/BCD and what synchronous/asynchronous resets that you want.

...Jim Thompson

-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | |

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson

Technically, if electrons make them they are always X-rays.

Can you take 2-257? That is sometimes easier to make work at high speeds.

The switches can be what is loaded into the counters each time they produce a carry out. You use a thumb wheel switch and load a high into a binary counter at each bit that is false in the number.

Reply to
MooseFET

Another insane idea:

If you connect the 8 pole switch to 8 address lines on a 27512 and have a HC374 latch that takes the 8 outputs and feeds them back around into to the other 8 lines, you can make lots of divide ratios including fractional ones.

Reply to
MooseFET

Trust Jim not to know about the 40103 - after all it has only been around since 1974. It took me a good ten years to start designing it into products, but that still leaves me 25 years ahead of Jim in electronics. His politics is a couple of centuries more retarded.

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

dunno about the PIC but maybe on an AVR. It looks possible using timer/couinter 0 on an ATTiny2313 and the code being just a loop reading some input pins and loading the value into OCR0A.

If the PIC is similarly equipped it should be possible on the PIC.

Reply to
Jasen Betts

Once I was asked if I can work with the PIC controllers made by AVR. So PIC is a generic name.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.