01-18-2024 10:06 PM - edited 01-18-2024 10:37 PM
Hi!
I am doing a custom onewire implementation where the bitstream logic 1 and 0 is expressed by changing the pulse width within a fixed bit period as shown below (kindly disregard trise and tfall for now)
If the DUT reads "vhigh" level at time = tread (3us) then it reads a "1" (the red waveform), otherwise if it reads "vlow" then "0" (blue waveform).
Using the Digital Pattern Editor, I was able to create a timing waveform for both the logic "1" and "0" and those show up fine when probed with an oscilloscope.
My questions are:
But what if I want to sweep the byte value from 0x00 to 0xFF?
Do I have to create a pattern file that will explicitly define each bit's time set?
Thanks!
01-18-2024 11:06 PM
Do you happen to be familiar with Source and Capture waveforms of 657x?
If you're not, you need to take up training sessions from NI.
https://learn.ni.com/learning-paths/device-testing-with-digital-pattern-instruments
The way I would approach this is,
01-18-2024 11:23 PM
Hi!
Thanks for the suggestion.
I have no issues generating the sweep pattern of any byte length.
But I do have trouble assigning the time set for each bit of the pattern I send, because the pulse width for logic "0" is different for logic "1".
Step 3 on your suggestion seem to indicate usage of a single time set (i.e. fixed pulse width). Or maybe I'm missing something?
Thanks!
01-20-2024 10:37 AM
Yeah, I am suggesting to create a few vectors that can generically represent a bit in OneWire data and just loop over them to a byte and then N-byte.
If you boil down your timing rules of a bit, you can make the common portions constant and only the different portions as source waveform.
01-28-2024 06:05 PM - edited 01-28-2024 06:45 PM
Hi! Thanks for the suggestion.
Ultimately, I figured that Digital Pattern Editor logic states is level based, not time (pulse width) based as is the case for OneWire.
What worked is to create two timings -- one for logic '1' and another for logic '0'. Both logic states have the same bit period, but differing duty cycle %.
To send each byte, I use a call function to call whatever byte sequence I need. Each possible byte (all 2^8 combinations) is hard-coded with the two timings.
Kind regards.