Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Output of PN sequence?

Status
Not open for further replies.

sadsorry

Newbie level 6
Newbie level 6
Joined
Feb 20, 2013
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,347
Hi guys!
I generate PN code
Code:
h=commsrc.pn('GenPoly',gfprimdf(4),'InitialStates',[0 0 0 1],'CurrentStates',[0 0 0 1],'Mask',[0 0 0 1],'NumBitsOut',1);
but I don't know what is output of h. Is it CurrentStates or something else? I want to implement PN code for FHSS so I really want to know it.
Thanks
 

h is a PRN "object", containing all the parameters required to generate your code sequence.
To make it do something useful, you use the generate() function, i.e.

outputBit = generate(h)

Since you've set the 'NumBitsOut' field to 1, every time you call generate(h), you'll get another (single) bit of your code. In the 4-bit case you've shown, your code will repeat every 2^N-1 = 15 generated bits.
If you're impatient, set NumBitsOut to 15 and generate(h) will give you your whole code in one go :)
 
Ah. It's you again. Thanks for you comment. Last time I find the way to recover BPSK signal and I want to say "THANKS".
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top