Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Resonators and Crystals - Help Request


  • Please log in to reply
9 replies to this topic

#1 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 03 October 2011 - 08:31 AM

I'm trying to set up and external clock for the TLC5940 GSCLK pin. This can go up to 30MHz but I'm starting out with a modest 4 MHz resonator. I know they are not as accurate as crystals but accuracy is not that important here. I have tried to set up the circuit as described in circuit A and I am either misunderstanding what I should be seeing or I have this set up incorrectly.

I have a 3 pin resonator with built in capacitors. I have placed this component in the circuit for the crystal and the two capacitors. I have a 1M resistor across the invertor (horizontal resistor in the diagram) and a 2K2 resistor for the other resistor. The invertor is provided by a 74LS04 and the whole circuit is powered by 5V.

The circuit is built on breadboard (could this be a problem?) as I'm experimenting :)

I am expecting to see a 4MHz square wave coming out of the invertor but when I connect the scope to the circuit I am getting nothing.

Can anyone see any obvious problems or point me to a good resource to help me learn a little more about these circuits?

Thanks in advance,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 03 October 2011 - 08:42 AM

Mark, I have tested with success, many times, the circuit in fig. 1d
http://cds.linear.co...Note/an12fa.pdf
It is much stable than any other.
However, I always used crystals (3 to 5MHz), and never any resonators.

For freqs relatively low (less than 10MHz), the crystal/resonator is working on the primary harmonic. Some crystals/resonator released for 20-30MHz (and over), may works on third or fifth harmonic. In this case is much harder to make it oscillating properly.
Cheers
Biggest fault of Netduino? It runs by electricity.

#3 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 03 October 2011 - 08:45 AM

Mark, I have tested with success, many times, the circuit in fig. 1d
http://cds.linear.co...Note/an12fa.pdf
It is much stable than any other.

Thanks for the hint - I'll look at it later today. I'm not precious about using a resonator - crystal will be fine. I really just need to get an external clock up and running.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#4 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 04 October 2011 - 05:35 PM

Mark, I have tested with success, many times, the circuit in fig. 1d
http://cds.linear.co...Note/an12fa.pdf
It is much stable than any other.
However, I always used crystals (3 to 5MHz), and never any resonators.

The circuits in the document all have different crystals in them - does this mean that the circuit is "tuned" to a specific range of values?

I have wired up the circuit in 1d using a crystal rated at 8MHz (smallest value crystal I have) at the moment. I am getting a wave form which is not very square out of the circuit and the frequency is about 8 MHz. Just out of interest I swapped out the crystal and dropped in a ceramic resonator and got a slightly better wave form.

I did make one modification, I fed the output through a not gate to buffer the output - this also had the effect of squaring the wave off a little more.

So back to the questions - should I use circuit 1c (instead of 1d) if I am using a 10Mhz crystal?

Thanks in advance,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#5 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 04 October 2011 - 05:51 PM

8MHz is enough for a LS-TTL, so don't expect to see a perfect square wave. The 2nd harmonic is at 16MHz, and the 3rd is at 24MHz...that's almost out of the capability of that family. Basically, the circuits depicted differs for their speed ability: two gates (1d) are slower than one (1c), but the (1d) circuit is much less critical. That's normal. There's another point regarding the crystal/resonator itself, as stated. If you wish to build an oscillator at 30MHz, for instance, you may find a crystal marked for "30MHz", but it's a 10MHz optimized for working on the 3rd harmonic. That's a bit harder to make it working properly than the 1st harmonic. So, the higher is the frequency, the harder is the circuit. Anyway, why are you using LS and not HCMOS? EDIT: if you use a HCMOS, even 10MHz are not a problem, either using 1c or 1d.
Biggest fault of Netduino? It runs by electricity.

#6 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 04 October 2011 - 06:02 PM

Anyway, why are you using LS and not HCMOS?

I started working on this on Saturday afternoon and I had 74LS04's but not a HCMOS equivalent. Basically, I was using what I had to hand :)

Thanks for all the help,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#7 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 06 October 2011 - 06:50 AM

hey just wondered if I could swap using pin 8 for pin 4? And have you got a recommendation on how to connect in an external crystal and what would be required? I'm guessing the higher the frequency of the crystal, the higher the resolution right? fig 1d on the link is recommened, I'm new to electronics so I struggle with schematics, its like reading sheet music. Any suggestions on hardware and whats the possibility of getting a stable circuit towards the 32mhz end of the spectrum? thank guy keep up the good work! :D andy

#8 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 06 October 2011 - 07:03 AM

Andy, what pin 4 and 8 are you talking about? If you were talking about the TLC, my suggestion is still to make one step a time. I'd first try to use a well-known clock source, such the Netduino PWM, afterward you may refine the circuit with a good (and faster) oscillator. If the circuit will have any issue, you are not able to find the guilty otherwise! I guess that 30MHz is the upper limit for the TLC, so I'd avoid to reach a so high frequency. Anyway, it would be better if this topic will be filed under a TLC interfacing. Mark opened this thread just for oscillators, in a generic way... The comparison of sheet music and schematics is great indeed! Believe me: it's only practice, when you'll learn to read schematics, the whole world is much clear! Cheers
Biggest fault of Netduino? It runs by electricity.

#9 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 06 October 2011 - 07:22 AM

thanks mario I will open a new topic for tlc interfacing :rolleyes:

#10 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 06 October 2011 - 07:30 AM

If you were talking about the TLC, my suggestion is still to make one step a time. I'd first try to use a well-known clock source, such the Netduino PWM, afterward you may refine the circuit with a good (and faster) oscillator.

This is where I started with the TLC - I used an astable 741 for the clock - not fast and a bit crude but I knew I could get the circuit working at 40-70KHz. Fast enough to prove the concept before moving on to new principles - hence this thread. I knew I needed to be able to generate good clock signals.

Bit off topic - I'm expecting to be posting some code on the TLC5940 later this week, possibly the weekend. I'll be including a schematic and some description of the operating principles - including the clock circuit. I just need to work on the code at the moment.

Mario - thanks for the help on this topic.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.