Electronic Schematics (alt.binaries.schematics.electronic) A place to show and share your electronics schematic drawings.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11   Report Post  
Old April 1st 15, 10:07 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Jul 2013
Posts: 732
Default "Random" Circuit Needed.

On Wed, 01 Apr 2015 12:08:34 -0700, Jim Thompson
wrote:

...snip...


"For a simulation situation..." ;-)

John F and Lasse have provided how to do it.

...Jim Thompson



For simulation I'd use the built-in rand() function of LTspice, if you
want gaussian instead of uniform distribution, use five rand()'s summed
appropriately. You said you like to use PSpice only, so create a text file
to use in a PWL type thingy THEN you can get completel control, likw
distribution and the elusive 1/f etc, any type statistics you want.

For Hardware to not have to go buy much, use the Soundcard and run it
directly with either a repeating pattern of random values, or from a
random number generator to get very long runs. The method of converting
FROM the audio output [BW is 10Hz to approx 100kHz] is left to the
'student'] The point here is that you can get repeatable random sequences
that are completely under your control.

  #12   Report Post  
Old April 1st 15, 10:26 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Jul 2009
Posts: 83
Default "Random" Circuit Needed.

On Thu, 02 Apr 2015 05:14:13 +1000, Jim Thompson
wrote:

On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
wrote:

On 04/01/2015 02:00 PM, Jim Thompson wrote:
For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson


How random? You could use a 16-bit PRBS made from two HC299 and an
HC86. Feed back Q14 XOR Q13, and tap out four stages to a HC154 demux.
If you need better randomness, use four PRBSes of different length.

Cheers

Phil Hobbs


I just need semi-random enough to test a fast AGC.

...Jim Thompson


there is a bias with the 8-bit just use the last 4 bit idea. With 255
'clocks' all states but 0000 will occur 16 times while 0000 will only
appear 15 - the cycle then repeats. The lack of the extra 0000 may cause
the bias point to continually drift high.
  #13   Report Post  
Old April 1st 15, 11:30 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Mar 2010
Posts: 2,181
Default "Random" Circuit Needed.

On Wed, 01 Apr 2015 14:07:40 -0700, RobertMacy
wrote:

On Wed, 01 Apr 2015 12:08:34 -0700, Jim Thompson
wrote:

...snip...


"For a simulation situation..." ;-)

John F and Lasse have provided how to do it.

...Jim Thompson



For simulation I'd use the built-in rand() function of LTspice, if you
want gaussian instead of uniform distribution, use five rand()'s summed
appropriately. You said you like to use PSpice only, so create a text file
to use in a PWL type thingy THEN you can get completel control, likw
distribution and the elusive 1/f etc, any type statistics you want.

For Hardware to not have to go buy much, use the Soundcard and run it
directly with either a repeating pattern of random values, or from a
random number generator to get very long runs. The method of converting
FROM the audio output [BW is 10Hz to approx 100kHz] is left to the
'student'] The point here is that you can get repeatable random sequences
that are completely under your control.


I'm after "random" as in numbers 1-16, which will turn on specific I/Q
components of a modulation "constellation", such as 16-QAM... building
a carrier extractor with AGC and needed a stimulus ;-)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
  #14   Report Post  
Old April 1st 15, 11:31 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Mar 2010
Posts: 2,181
Default "Random" Circuit Needed.

On Thu, 02 Apr 2015 07:26:29 +1000, "David Eather"
wrote:

On Thu, 02 Apr 2015 05:14:13 +1000, Jim Thompson
wrote:

On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
wrote:

On 04/01/2015 02:00 PM, Jim Thompson wrote:
For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson


How random? You could use a 16-bit PRBS made from two HC299 and an
HC86. Feed back Q14 XOR Q13, and tap out four stages to a HC154 demux.
If you need better randomness, use four PRBSes of different length.

Cheers

Phil Hobbs


I just need semi-random enough to test a fast AGC.

...Jim Thompson


there is a bias with the 8-bit just use the last 4 bit idea. With 255
'clocks' all states but 0000 will occur 16 times while 0000 will only
appear 15 - the cycle then repeats. The lack of the extra 0000 may cause
the bias point to continually drift high.


I was wondering about that myself... I'll see if there's a cure.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
  #15   Report Post  
Old April 2nd 15, 12:24 AM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Mar 2007
Posts: 399
Default "Random" Circuit Needed.

On 4/1/2015 6:31 PM, Jim Thompson wrote:
On Thu, 02 Apr 2015 07:26:29 +1000, "David Eather"
wrote:

On Thu, 02 Apr 2015 05:14:13 +1000, Jim Thompson
wrote:

On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
wrote:

On 04/01/2015 02:00 PM, Jim Thompson wrote:
For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson


How random? You could use a 16-bit PRBS made from two HC299 and an
HC86. Feed back Q14 XOR Q13, and tap out four stages to a HC154 demux.
If you need better randomness, use four PRBSes of different length.

Cheers

Phil Hobbs

I just need semi-random enough to test a fast AGC.

...Jim Thompson


there is a bias with the 8-bit just use the last 4 bit idea. With 255
'clocks' all states but 0000 will occur 16 times while 0000 will only
appear 15 - the cycle then repeats. The lack of the extra 0000 may cause
the bias point to continually drift high.


I was wondering about that myself... I'll see if there's a cure.


Do a search on the Xilinx web site for app notes on LFSR. Peter Alfke
published one which adds a few gates to specifically inject the zero
state.... or you can just use a much larger LFSR so that the small bias
is in the noise. If you use a short sequence LFSR you may see the
artifacts in your signal anyway. Remember this is only pseudo-random.
Is 255 length sequence long enough for your needs?

--

Rick


  #16   Report Post  
Old April 2nd 15, 12:59 AM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Jul 2009
Posts: 83
Default "Random" Circuit Needed.

On Thu, 02 Apr 2015 09:24:29 +1000, rickman wrote:

On 4/1/2015 6:31 PM, Jim Thompson wrote:
On Thu, 02 Apr 2015 07:26:29 +1000, "David Eather"
wrote:

On Thu, 02 Apr 2015 05:14:13 +1000, Jim Thompson
wrote:

On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
wrote:

On 04/01/2015 02:00 PM, Jim Thompson wrote:
For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16
outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of
those
device in my PSpice library.

Thanks in advance.

...Jim Thompson


How random? You could use a 16-bit PRBS made from two HC299 and an
HC86. Feed back Q14 XOR Q13, and tap out four stages to a HC154
demux.
If you need better randomness, use four PRBSes of different length.

Cheers

Phil Hobbs

I just need semi-random enough to test a fast AGC.

...Jim Thompson

there is a bias with the 8-bit just use the last 4 bit idea. With 255
'clocks' all states but 0000 will occur 16 times while 0000 will only
appear 15 - the cycle then repeats. The lack of the extra 0000 may
cause
the bias point to continually drift high.


I was wondering about that myself... I'll see if there's a cure.


Do a search on the Xilinx web site for app notes on LFSR. Peter Alfke
published one which adds a few gates to specifically inject the zero
state.... or you can just use a much larger LFSR so that the small bias
is in the noise. If you use a short sequence LFSR you may see the
artifacts in your signal anyway. Remember this is only pseudo-random.
Is 255 length sequence long enough for your needs?


longer lfsr would get my vote
  #17   Report Post  
Old April 2nd 15, 07:32 AM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Nov 2011
Posts: 14
Default "Random" Circuit Needed.

On 2.4.15 01:31, Jim Thompson wrote:
On Thu, 02 Apr 2015 07:26:29 +1000, "David Eather"
wrote:

On Thu, 02 Apr 2015 05:14:13 +1000, Jim Thompson
wrote:

On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
wrote:

On 04/01/2015 02:00 PM, Jim Thompson wrote:
For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson


How random? You could use a 16-bit PRBS made from two HC299 and an
HC86. Feed back Q14 XOR Q13, and tap out four stages to a HC154 demux.
If you need better randomness, use four PRBSes of different length.

Cheers

Phil Hobbs

I just need semi-random enough to test a fast AGC.

...Jim Thompson


there is a bias with the 8-bit just use the last 4 bit idea. With 255
'clocks' all states but 0000 will occur 16 times while 0000 will only
appear 15 - the cycle then repeats. The lack of the extra 0000 may cause
the bias point to continually drift high.


I was wondering about that myself... I'll see if there's a cure.

...Jim Thompson



A longer LFSR is the simplest cure. 20 bits will give you a bias
of one per million.

Another possibility is to use a congruential generator, but it
needs quite a lot of arithmetic, one multiply and one add.

--

-Tauno Voipio

  #18   Report Post  
Old April 2nd 15, 11:42 AM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Jul 2008
Posts: 326
Default "Random" Circuit Needed.

On 2015-04-01, Jim Thompson wrote:
On Thu, 02 Apr 2015 07:26:29 +1000, "David Eather"
wrote:

On Thu, 02 Apr 2015 05:14:13 +1000, Jim Thompson
wrote:

On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
wrote:

On 04/01/2015 02:00 PM, Jim Thompson wrote:
For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson


How random? You could use a 16-bit PRBS made from two HC299 and an
HC86. Feed back Q14 XOR Q13, and tap out four stages to a HC154 demux.
If you need better randomness, use four PRBSes of different length.

Cheers

Phil Hobbs

I just need semi-random enough to test a fast AGC.

...Jim Thompson


there is a bias with the 8-bit just use the last 4 bit idea. With 255
'clocks' all states but 0000 will occur 16 times while 0000 will only
appear 15 - the cycle then repeats. The lack of the extra 0000 may cause
the bias point to continually drift high.


I was wondering about that myself... I'll see if there's a cure.


r=(75*r+74)%65537 visits 0-65535 with no gaps.

not that i'd want to build it using 74LS logic.

--
umop apisdn

  #19   Report Post  
Old April 2nd 15, 11:48 AM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Jul 2008
Posts: 326
Default "Random" Circuit Needed.

On 2015-04-01, rickman wrote:
On 4/1/2015 6:31 PM, Jim Thompson wrote:

Do a search on the Xilinx web site for app notes on LFSR. Peter Alfke
published one which adds a few gates to specifically inject the zero
state....


yeah, but no LFSR visits all states.



--
umop apisdn

  #20   Report Post  
Old April 2nd 15, 12:22 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Jul 2013
Posts: 732
Default "Random" Circuit Needed.

On Wed, 01 Apr 2015 12:14:13 -0700, Jim Thompson
wrote:

On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
wrote:
...snip....

How random? You could use a 16-bit PRBS made from two HC299 and an
HC86. Feed back Q14 XOR Q13, and tap out four stages to a HC154 demux.
If you need better randomness, use four PRBSes of different length.

Cheers

Phil Hobbs


I just need semi-random enough to test a fast AGC.

...Jim Thompson


Uniform distribution sounds like a great 'first' test.

However, often modulators are not always set up to 'scramble' the data to
create uniform distribution. Does that mean you should also check some
weird distributions reflecting fixed/sloppy modulation? Especially if the
16 level space has any type of one to one relationship, like text, mime
format, or images which have repeating patterns [don't they?]

Anyway, just to be sure, you may want to try some weird distributions just
to make certain the AGC doesn't respond to these 'patterns'.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Under the banner of "Si, Se Puede" "Moving America Forward""Latino Voter Registration Drives"... Warren Penn Home Repair 0 April 18th 12 10:38 PM
I am looking for a local source for "Rockwool" / "Mineral Wool" /"Safe & Sound" / "AFB" jtpr Home Repair 3 June 10th 10 06:27 AM
For women who desire the traditional 12-marker dials, the "Faceto,""Juro" and "Rilati" all add a little more functionality, without sacrificingthe diamonds. [email protected] Woodworking 0 April 19th 08 11:12 AM
Circuit to connect "Soundblaster" electret microphone to line-input Robert Ham Electronics 0 October 2nd 07 03:28 PM
Orange Peel Texture? "Knockdown" or "Skip Trowel" also "California Knock-down" HotRod Home Repair 6 September 28th 06 01:48 PM


All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"

 

Copyright © 2017