Author Topic: LFSR output drops at clock frequency?  (Read 2184 times)

0 Members and 1 Guest are viewing this topic.

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
LFSR output drops at clock frequency?
« on: March 26, 2017, 01:07:18 am »
I built a LFSR with two 74164 shift registers and some XOR gates to generate some pseudo-random noise just because I find it interesting, not building anything in particular.
In my example image (this is from a simulation but it does the same thing on a breadboard) I'm clocking it at 12KHz and you can see that there's a drop at that frequency.

What is it about an LFSR that does this?
 

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
Re: LFSR output drops at clock frequency?
« Reply #1 on: March 27, 2017, 01:16:49 am »
Interesting.
At a 5KHz clock frequency it's easier to see that it's "quieter" in audio terms, at 5Hhz, 10KHz, 15KHz, 20KHz. so that's 1x, 2x, 3x and 4x the clock frequency.
The darker colours represent less content in the spectral image.
 

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
Re: LFSR output drops at clock frequency?
« Reply #2 on: March 27, 2017, 08:40:05 pm »
It is confusing to me that you're clocking it at 12 kHz but getting harmonics of spectral nulls at N*5 kHz instead of N*12 kHz.
AFAICT you should have spectral nulls at every integer harmonic of the sample clock rate:
http://electronicdesign.com/digital-ics/well-controlled-audio-band-noise-source-uses-basic-microcontroller-filtering
http://pdfserv.maximintegrated.com/en/an/AN3455.pdf

In my last post I'm clocking it at 5KHz so it's easier to see more of the harmonics because I can't record anything beyond 22KHz with my soundcard.
Thanks for those links.

I guess if I actually cared about getting a signal that didn't have these drops I would just clock it at something above audio frequency and filter out anything above that too but I just asked because I found it interesting.
This technique was used in old video games to create noise and it's also useful in certain synthesizers, especially for percussion sounds.
The ETI Vocoder uses it so that's how I became interested in it.
« Last Edit: March 27, 2017, 08:47:04 pm by dentaku »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf