Forums

"Random" Circuit Needed.

Started by Jim Thompson April 1, 2015
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
-- 
| James E.Thompson                                 |    mens     |
| Analog Innovations                               |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             |
| Voice:(480)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.
On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> 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
--- If you use something like an HC154 with an LFSR driving its address inputs to generate random one-hots on its outputs, will that work for you?
On Wed, 01 Apr 2015 13:27:06 -0500, John Fields
<jfields@austininstruments.com> wrote:

>On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> 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 > >--- >If you use something like an HC154 with an LFSR driving its address >inputs to generate random one-hots on its outputs, will that work >for you?
John, What are you saying... take the outputs of the LFSR broadside to drive the address lines of the 'HC154? I think that would do it. Thanks also to Lasse for the same suggestion. ...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 | | | Voice:(480)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.
On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> 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
Do you want to build hardware, or just Spice this? LT Spice has random signal generators. You could quantize one of them, and drive a decoder. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
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 -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On Wed, 01 Apr 2015 12:06:00 -0700, John Larkin
<jlarkin@highlandtechnology.com> wrote:

>On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> 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 > >Do you want to build hardware, or just Spice this? > >LT Spice has random signal generators. You could quantize one of them, >and drive a decoder.
"For a simulation situation..." ;-) John F and Lasse have provided how to do it. ...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 | | | Voice:(480)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.
On Wed, 01 Apr 2015 11:53:10 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Wed, 01 Apr 2015 13:27:06 -0500, John Fields ><jfields@austininstruments.com> wrote: > >>On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson >><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> 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 >> >>--- >>If you use something like an HC154 with an LFSR driving its address >>inputs to generate random one-hots on its outputs, will that work >>for you? > >John, > >What are you saying... take the outputs of the LFSR broadside to drive >the address lines of the 'HC154? > >I think that would do it. > >Thanks also to Lasse for the same suggestion. > > ...Jim Thompson
I was puzzling over how to get 0000, but then it dawned... just use an 8-bit LFSR and use the last 4-bits. ...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 | | | Voice:(480)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.
On Wed, 01 Apr 2015 15:07:54 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> 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 -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)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.
On Wed, 01 Apr 2015 11:53:10 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Wed, 01 Apr 2015 13:27:06 -0500, John Fields ><jfields@austininstruments.com> wrote: > >>On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson >><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> 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 >> >>--- >>If you use something like an HC154 with an LFSR driving its address >>inputs to generate random one-hots on its outputs, will that work >>for you? > >John, > >What are you saying... take the outputs of the LFSR broadside to drive >the address lines of the 'HC154?
--- Yes. ---
>I think that would do it.
--- OK :-) ---
>Thanks also to Lasse for the same suggestion.
--- He posted earlier than I did, so the "win" is really his. Also, perhaps not immediately apparent is that he also posted that the length of the LFSR will determine the repeat of the one-hot sequence out of the demux. For example, if you use a maximal length 4 bit LFSR, the sequence will repeat every 15 clocks, while if you use a maximal length 8 bit LFSR the sequence will repeat every 255 clocks, and so on... John Fields
On Wed, 01 Apr 2015 12:10:24 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Wed, 01 Apr 2015 11:53:10 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: > >>On Wed, 01 Apr 2015 13:27:06 -0500, John Fields >><jfields@austininstruments.com> wrote: >> >>>On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson >>><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> 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 >>> >>>--- >>>If you use something like an HC154 with an LFSR driving its address >>>inputs to generate random one-hots on its outputs, will that work >>>for you? >> >>John, >> >>What are you saying... take the outputs of the LFSR broadside to drive >>the address lines of the 'HC154? >> >>I think that would do it. >> >>Thanks also to Lasse for the same suggestion. >> >> ...Jim Thompson > >I was puzzling over how to get 0000, but then it dawned... just use an >8-bit LFSR and use the last 4-bits. > > ...Jim Thompson
--- There's really nothing quite like that thrilling flash of discovery, is there? If you need 0000 out and you only want to use a 4 bit LFSR, then use XNOR feedback to force the lockup state to 1111 instead of 0000 and you'll magically jump over 1111 once per cycle. If you need an LFSR with a maximal length of 2^n instead of 2^n-1, then a pulse-stuffer is called for. If there's any interest I'll post a schematic.