Announcement

Collapse
No announcement yet.

Multi-stream asymmetrical pulse generator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multi-stream asymmetrical pulse generator

    Hi all, here's my idea for an array driven, multi-stream pulse generator for your consideration/comments.

    SUMMARY :

    1. Each bit of each byte, or whatever data type you fancy, in an array represents one pulse train. By setting the bit state at each address the pattern is created.

    2. The repetition rate is controlled by the indexing frequency which is driven by a precise timer interrupt (+software overheads) . So variable repetion rate is easy to implement.

    3. Each bit state is stored in a bit pattern array which specifies how many 1s or 0s to output in sequence. For simplicity let's say 10 states. So
    bit0Array(10)
    The value in each position states the number of 1s or 0s for that but stream where positive numbers are 1s and negative numbers are 0s and zero is and end of stream marker for the array configuration software loop to terminate early.
    Assuming the pattern array is cleared down to all zeros it is configured using the following information.

    bit0Array() 100,-20,20, 0 // 100 hi, 20 lo, 20 hi, end. Pattern array was set to all zeros on init

    bit1Array() -120,10,-20,10,0 // 120 delay, 10 hi, 20 lol, 10 hi, end

    So say bit0 was a PI TX pulse output from a 1000 point array, each location equates to 1uS if indexed and output at 1Mhz (10uS if clock=100kHz etc. )

    For a 50uS pulse @ 1Mhz in a 1000 byte array

    txBit0() 50, 0 // first 50 values are high thats all

    mainSampleBit1() -100,50, 0 // main sample occurs after 100uS delay and has 50 us duration

    anotherBit2() -120,20,-20,860, 0 // ends high until index is zero again

    Each array location can represent whatever level resolution is required ie.
    100 bytes at 10uS, 1000 at 1uS etc it all depends on your processors capabilities speed, timers etc.

    Different pattern banks could also be stored within a single array and addressed accordingly.

    I leave it with you all to think about the multiple extensions to this concept.

    I'm no C or Python programmer and the grey cells are weak in my dotage so I hope someone can come up with code to support/disprove/improve the idea.

    I have many ideas regarding extending the capabilites of such a system but need to think them through.

    I bow to your combined programming skills.

    Neil

Working...
X