time stamp

Viewed 8 times

I would like to send a random binary data sequence to a rpi GPIO at a particular frequency and then read the data stream off a scope. Is there a way of implementing this through python?

 New contributor
  • what are you using for sending the data to the RPi? – jsotola 1 hour ago
  • I want to write code to send the random data stream to a GPIO to read off on a scope. The binary data will later be used to encode a signal through various modulation schemes. The data stream is generated from the pi and transmitted out through a GPIO. – Ric Turner 54 mins ago
  • Hi @Ric Turner, Welcome and let me see. You can poll or interrupt a input mode GPIO pin for your signal and log the reading results to a text file, together with time stamps, and display them as a scope like wave form. You can also use the scope’ “single trigger mode” to display the waveform within a time period. You can also use a cheapie, US$300 scope to display the Fast Fourier Transform of the components of your random signals. – tlfong01 47 mins ago   
  • I am a little bit confused. Do you mean you wish to use an output mode GPIO pin to send a random sequence of high low signals, which will be read by an input mode GPIO pin? If what you wish is only to display the signal waveform, you can directly output the signal to a scope, say, cheapie US$100 digital storage oscilloscope. – tlfong01 41 mins ago   
  • Yes, I’d like to output the random sequence of HIGHs and LOWs from a GPIO pin set as an output. I’d like to clock the data out at a particular frequency. I’ve looked online but most examples include using SPI or I2C. I do not wish to use a master and slave setup with stop, start or acknowledge bits. The end result would be to see the data stream from a digital oscilloscope and to be able to identify the bit period that corresponds with the frequency that the data is sent out at. – Ric Turner 32 mins ago
  • Ah, let me see. That should not be difficult. Suppose we can start with the newbie assignment of using Rpi GPIO to blink a LED, which is a simple loop turning on LED, sleep some time, turn off LED sleep some time. Now you can modify the “sleep some time” statement by a “sleep random time” statement, using the python random function. Actually you can time stamp before and after the blink LED sequence and display a sequence of LED on and off with time stamps in the python output screen (eg Thonny python) or save in a text or Excel file for analysis. In other words, no scope is necessary. – tlfong01 1 min ago   Edit   
  • Perhaps you can first try to write such a python program and show me your final version of your newbie program, and I can give you a ninja demo version (how to do random, timestamp, text file etc), and scope screen capture for your to compare and contrast. – tlfong01 12 secs ago   Edit

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: