# Logic Syncing circuits and Microcontroller crystal

Discussion in 'General Electronics Chat' started by watsongrey, Nov 8, 2014.

1. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
What does the crystal set or do for a microcontroller/microprocessor? the crystal sets the frequency speed/rate of the microcontrollers speed

The crystals frequency waveform waveshape is a triangle waveform. Why does a microcontroller need a triangle waveform and not a sinewaveform or squarewaveform?

If the voltage on the crystals frequency

2. ### ScottWang Moderator

Aug 23, 2012
4,925
777
Discussing the EE questions for the useful info and just don't get into the Jungle.

The frequency for the uC almost decided by the uC maker and crystal maker, unless you want to design by yourself, the uC maker choosing the frequency of uC from the maker list, otherwise they have to order by their own, but it seems not good for the public user and it will affevted the market.

8051 SERIAL PORT PROGRAMMING IN ASSEMBLY.

Where did get that infos?
If you measured by yourself then how is your frequency of O'scope and which frequency of crystal did you measured and the really image of the waveform?

3. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
The uC needs either a oscillator or crystal. But why does a uC need a crystal or oscillator? what does it do to the uC? if i remove the crystal the uC won't work, so why does it need the crystal? also if I change the crystal to a different crystal with a different frequency the uC won't work, why?

The oscillator or crystal is a sinewaveform, if it's a triangle waveform the uC doesn't like this, why is that?

For logic circuits checking for sync:
How does a Test Technician using an Logic Analyzer test/check for logic signals that are all "in-sync" on multiple logic analyzer channels?

4. ### WBahn Moderator

Mar 31, 2012
18,085
4,917
You're babbling and contradicting yourself right and left. First you say that the waveform IS a triangle wave and ask why the microcontroller needs that and then you claim that it's a sinewave and ask why the microcontroller won't work with a triangle wave.

Most of your statements are just plain false (at least those that are not outright nonsensical).

The oscillator provides the clock signal for the microcontroller. Do you understand the role that the clock plays in sequential circuits?

The uC will work with different oscillator frequencies, as long as you stay within the range of frequencies it is spec'ed to work at.

If you use multiple logic analyzers, then you need to supply them all with a synchronizing signal.

absf likes this.
5. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
If you use multiple logic analyzers, then you need to supply them all with a synchronizing signal.

I'm not talking about hooking up multiple logic analyzers
I'm talking about "probing" multiple logic signals on a logic circuits. how would a tech know if the logic signals are in sync? what logic circuits want the logic signals to be "in-sync" , when would a tech test/check for synchroization in a logic circuit? what are some general circuits a tech would want to test/check for the synchroization of a circuit?

The oscillator provides the clock signal for the microcontroller. Do you understand the role that the clock plays in sequential circuits?

So The Oscillator/crystal is the master clock signal for the uC? why does a uC need a clock signal? the clock signal makes the data speed inside the uC faster?

The uC will work with different oscillator frequencies, as long as you stay within the range of frequencies it is spec'ed to work at.

The Oscillators frequency sets what for the uC? it sets the data speed , how fast the uC is clocking at? the logic signals internally inside the uC are pulse train signals, the oscillators frequency sets the RRP rep rate pulse, the rate of pulses per one second

6. ### profbuxton Member

Feb 21, 2014
233
68
The Crystal set the time for the uC so it knows what time is to go to lunch!! Are you telling us what it does or are you asking what it does. Your "questions" are a classic case of technobabble.

7. ### ScottWang Moderator

Aug 23, 2012
4,925
777
I'm not sure why you don't answer the question I mentioned?
Why do you need a heart, what does the heart doing for you, that's the answer for your question.

If a place have the gate and wall and high fence, how do you get into the place?

If you still don't get it, please go check on page 3 at AC Electrical Characteristics -- Minimum Clock Pulse Width.

If you wish to check 8 signals then you need 8 channels logic input to the Logic Analyzer to test, If you wish to check 16 signals then you need 16 channels logic input to the Logic Analyzer to test.

Last edited: Nov 8, 2014
8. ### takao21203 Distinguished Member

Apr 28, 2012
3,578
463

absf and ScottWang like this.
9. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
Yes a logic analyzer has 16 inputs, if a tech is looking at 16 logic signals at once to test and check for synchronization in a circuit. How would a test technician test for synchronization of a circuit? What are some common circuits that you test for the synchronization?

Are you telling us what it does or are you asking what it does

I'm asking what does the crystal do and why does a uC need one? does it set the speed or rate of the uC?

10. ### ScottWang Moderator

Aug 23, 2012
4,925
777
The I/O ports, parallel data bus and address bus for ram ,eeprom, dot matrix display circuits, etc...

11. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
The I/O ports, parallel data bus and address bus for ram ,eeprom, dot matrix display circuits, etc...

What would I be using as the Reference? a master clock? any circuit that has a clock or a master clock needs to be checked for synchronization on a logic analyzer to make sure all the logic signals are aligned up to the master clock? no offset or time delays.

12. ### WBahn Moderator

Mar 31, 2012
18,085
4,917
No, there WILL be offsets and delays. You are checking to see if those offsets and delays are within the allowable limits.

Why don't you read up on the basic concepts of sequential logic circuits?

13. ### ScottWang Moderator

Aug 23, 2012
4,925
777
Go to check the timing diagram of CD4510 on page 5.

14. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
Why don't you read up on the basic concepts of sequential logic circuits?

Yes i know that sequential logic circuits have a master clock

I put the master clock signal and probe it to Ch1 on the logic analyzer to make it a "reference" to compared all the other logic signals to. The other logic analyzer channels ch2 thur ch16 , I probe various stages inputs or outputs. The Master clock is free running so the other logic signals on ch2 thur ch16 are not aligning up or in-sync with the master clock pulse train.

No, there WILL be offsets and delays. You are checking to see if those offsets and delays are within the allowable limits.

How does a test technician know the allowed limits of the offsets and delays?

15. ### ScottWang Moderator

Aug 23, 2012
4,925
777
The Master clock can't be free running, unless it is astable, but normally the crystal oscillator won't happen something like that, or your frequency of logic analyzer is not enough to catch the clock.

16. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
So all the logic signals in a circuit are going to align up edge to edge , positive edge and negative edge with the master clock signal pulse train? is this how to test/check for synchronization?
How fast the pulse train is going is the rate/speed, the rate/speed is set by the crystals frequency or master clocks oscillators frequency?

How do you guys test/check for synchronization in a circuit?

17. ### takao21203 Distinguished Member

Apr 28, 2012
3,578
463
By applying techniques such as rapidly switching on/off, knocking on the enclosure, and making conductive paths with the fingers, as well randomly plugging out connectors. 95% of all appliances can be fixed that way.

Manufacturers use tricks such as fast oxydizing alloys, thin PCB tracks, and brittle materials, which do react well on such repair techniques. The time before that happens is called MTBF.

People from islamic countries for these reasons keep VCRs, DVD players, remote controls etc. inside their original wrapping.

So, the appliance "thinks" it is not used and still sitting on the shelf.

18. ### watsongrey Thread Starter Member

Oct 31, 2014
94
0
To measure the Pulse Repetition Rate:
I use a stop watch and count "how many pulses" in a logic signals pulse train in One second
The pulse repetition rate (or pulse repetition frequency) frep of a regular train of pulses is defined as the number of emitted pulses per second

The Master clocks frequency sets the speed/rate of how many pulses per One second

19. ### ScottWang Moderator

Aug 23, 2012
4,925
777
If you could see some more timing diagram for much more TTL and CMOS parts, then you will solve much more questions.

20. ### BillB3857 Senior Member

Feb 28, 2009
2,402
348
This sounds like Dexter is back.