Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Looking for a 4 bit prescaler good to 500 MHz

Status
Not open for further replies.
Yes, but the link Bob posted isn't doing that; RA2 is connected to the LCD.
Exactly.
However, note that electronics-diy counter has RA1 connected to +Vcc (why?) and RA0 unconnected. So, I suspect the schematic is in error, either intentionally or not, and they probably have either RA0 or RA1 connected to RA4 to flush the prescaler. Anyway, it hardly matters. I've built these things before, and I know how it's done.

BTW, I was thinking of including the 1 GHz prescaler in the flush operation which would give several additional bits of resolution.
 
I don't understand your math.

This was my thinking...

The incoming signal isn't guaranteed to be aligned with the PIC instruction clock. In a single instruction at 4MHz there are 15 cycles of a 50MHz signal passing by. And now that I think about it the best it could do should be (50/4) x 2 = 30Hz, since there's one instruction cycle to turn the gate timer on and one to turn it off.

To exaggerate the situation for clarity: If the PIC executed instructions at the rate of one/day, do we know when in the day the gate timer is turned on? Could be at midnight, could be at 4PM. All we know is that it will be turned on at some point during the day. So there's an error margin of one day for turning the gate timer on and then one day for turning it off.

Okay, after thinking about it some more... Can we assume that the instruction is executed at the same point in the instruction cycle, no matter how long that is?
 
Up an atom (sorry, could not resist, the devil made me say it! :)), I think that you are way over-thinking this thing.

The program in the PIC generates a known gate time, say 1 second or 100mS, using timers in the PIC.
As with all counters which are not synchronous with the pulse stream they are counting, there will be a +/- 1 count ambiguity in the last digit depending on where in the cycle the gate opens and closes.

JimB
 
I have many counters. One is a PIC based 50mhz counter like this.
My PIC counter counts 50,000,00? (10 times a second). It also counts 50,000,000 once a second.
Assume the XTAL is accurate.
The PIC turns on the counter and 1 second later turns it off. The on/off is very accurate. The instruction rate is not important. At 1 instruction per micro second you simply do 1,000,000 instructions to get 1 second. If you were doing 100,000 instructions/second then do 100,000 instructions. The time a instruction is done to when the on/off happens is very predictable. Because the counter counts at 60mhz I have reason to believe the counter can be turned on/off very predictably with in 10nS.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top