×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Barker Code Generator

Barker Code Generator

Barker Code Generator

(OP)
Hello,

I am looking for a _simple_ circuit to generate a Barker code sequence (11101101, if I remember correctly).  I was thinking of using a PIC10F200 to do this, but I feel that the PIC is a little "overkill" for this application.

Do you know any logic circuit or any alternative method to generate such sequence?  Thank you in advance!

Best regards,
James

RE: Barker Code Generator

If it's a fixed sequence, why can't you hardcode that into a synchronously loaded shift register?

TTFN



RE: Barker Code Generator

To expound on IRstuff's suggestion you just take a nonvolitle memory of some sort load it up with your data, tie it's RD pin somewhere.  Then run a shift register into the address pins so the memory sequentially spews your data.

It is used all the time for stuff; like my Direct Synthesis Signal Generator.

RE: Barker Code Generator

(OP)
Thank you both of you for your quick response!  Would you please tell me which synchronously loaded shift register is appropriate for this?  I am a little dim right now as I haven't touch the digital stuff for a while.  Thanks!
Best regards,
James

RE: Barker Code Generator

I believe that the longest (optimal) Barker code is 13 bits long. There are shorter ones, but apparently no longer ones.

(I've never understood why Barker Codes aren't used 'everywhere'.)

RE: Barker Code Generator

In answer to the original question, it could certainly be done using several TTL chips, but it might be cheaper, smaller, lower power, more reliable, easier to get parts, better in all respects - to simply use a small 8-pin uP (or something similar).

Barker Code info:
http://mathworld.wolfram.com/BarkerCode.html

RE: Barker Code Generator

Barker codes are essentially designed for error correction through the use of spread spectrum; but without the need for mathematical error correction.  It's VERY expensive due to the need for the extra bandwidth and unnecessary if you don't have that noisy a channel.  The code eeffectively provides multiple error correction on a bitwise basis.

If you don't have that noisy a channel, then any simple error correcting code will be more efficient from total data bandwidth.  

A simple 8 bit ECC on 64 bits is only 12.5% more data bandwidth required, while a 13-bit Barker code is 1300% more data bandwidth required.

TTFN



RE: Barker Code Generator

I don't believe that Barker Codes are designed for 'error correction' (in the manner of more modern codes); they're designed to add-up without any 'sidelobes' (spurious responses in the time domain) greater than +/- 1 even as they're being shifted into the Barker Code summation matrix.

The definition of Barker Codes includes this 'sidelobe' characteristic.  There's only a handful of codes that have this characteristic and the longest is 13-bits in length.

The first time that I met them was in a radar system where they're used to peak-up (by 13:1) the return thus improving SNR.

If your signal is relatively low bandwidth, then making it slightly wider with a Barker Code is free.

Apologies for disagreeing again...

RE: Barker Code Generator

"improving SNR" is essentially analog error correction.

TTFN



RE: Barker Code Generator

"improving SNR" is perhaps analog error *prevention*.


RE: Barker Code Generator

Your PIC solution, as you first suggested, may be "best" if you are familiiar with the part.  The cost should be on par with PAL. Unless you have other circuits involved in your entire project that could  do some of the work.  The longest Barker is 5, 2, 2, 1, 1, 1, 1, or 1 1 1 1 1 0 0 1 1 0 1 0 1.  It would be interesting why you would need specifically a Barker code.  If Barker is your only requirement, you could use all 0's, which is the first Barker code, or a clock, which is the seconde Barker code.  However, it is generaly considered that "the" Barker code is the length 13.  It can be forward or backward.
IRstuff first mentioned the pre-loaded shift register.  That is simpler than a PIC, but might not cost much less.  

RE: Barker Code Generator

(OP)
Thank you everyone for your inputs.  I think I will go with the MCU solution as I am more familiar with it and it doesn't take much real estate.  The PIC10F200 costs about $0.25 USD each and the Toshiba 86C405 costs about $0.13 USD each (is "cost" a verb?)

Anyway, I am having some troubles connecting the PIC10F200 to ICD 2 now.  I got these messages:

 Programming Target...
ICDWarn0044: Target has an invalid calibration memory value (0x400). Continue?
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x22)
...Loading DebugExecutive
Verifying...
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0xA01, Val Read = 0x0)
ICD0275: Programming failed.
MPLAB ICD 2 Ready

I read somewhere that I need to apply 12V at Vpp. I did that but it made no difference.  The CP bit is always turned off:
 __CONFIG _MCLRE_ON & _CP_OFF & _WDT_OFF

Any other idea?

James

RE: Barker Code Generator

You would have to read the programming spec for that specific chip, but you may need to modulate the Vpp and/or do multiple resets throughout the programming process.  Early PICs were easy enough... bring Vpp up to 13V, send in clock/data, and be done with it.  Some of the more recent varieties ('A series parts?) tend to require a little more complicated programming process.

Make sure you have the correct chip selected (also check that your programmer supports that chip).

Dan
Owner
http://www.Hi-TecDesigns.com

RE: Barker Code Generator

Screaming for a 22V10

RE: Barker Code Generator

Yashu; So true.

RE: Barker Code Generator

(OP)
Thank you everyone for your inputs.  I will check out the 22V10.  Hope it is cheap!
best regards,

RE: Barker Code Generator

how did it work out?  Did you go the PAL or the uC route?

Also, there are generaized Barker codes.  Use complex +/- j and +/-1 as your chips.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources