element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Generating clk synchronized signal without using typical serial communication protocol (SPI, UART etc)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 13 replies
  • Subscribers 663 subscribers
  • Views 3206 views
  • Users 0 members are here
Related

Generating clk synchronized signal without using typical serial communication protocol (SPI, UART etc)

lolants55
lolants55 over 3 years ago

Hello i have problem with generating clk synchronized signal.


I am using Raspberry 4 and Python , trying to make 8MHz clk and the synchronized signal(24bit every cycle) with it.
I need to generate 24bits every rising rising edge of 8MHz clk. Like 0101 1001 0000 0000 0010 0000(24 zeros and ones) should be generated every rising edge of 8MHz clk. Every commends on the manual have different configuration of 0 and 1, so i was trying to make function that can determine 0 or 1 every rising edge so that it can express all commends.

I made a clk with pigpio library's " hardware_clock(gpio, clkfreq) " function and used "event_callback(event, func)", i referred "">abyz.me.uk/.../python.html" to use it , to detect the rising edge and call function sending a bit every event(when rising edge is detected). But i found it doesn't work since its operation time was too low compare to clk period. So i tried to use interrupt function of raspberry itself but again found it is slow to use again. Is there any way that i can generate MHz order scale signal using raspberry 4 and python?

So what i want to know since the receiver operates when 8MHz clk and signal are received and synchronized well each other, i want make raspberry operates a function(this would be something like one bit generating) at least 10^-7 second(~ 8MHz) a once.

If needed i may use C language instead, but i am not familiar with it. If it is possible i prefer to use python.

p.s
I found functions from RPIgpio and pigpio aren't compatible(I tried to use clk function from pigpio and eventcallback function from rpigipio). Is this because they occupy same registers in raspberry 4(since they have similar function.. ig)? So that they may malfunction while they are used at once.

Thanks for your helps in advance.
Thanks for reading!

  • Sign in to reply
  • Cancel
Parents
  • colporteur
    0 colporteur over 3 years ago

    image

    I have read your question and napkined this drawing to confirm your explanation and my understanding are the same.

    The data signal (i.e the bits) has a frequency of 200Mhz? 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • geralds
    0 geralds over 3 years ago in reply to colporteur

    No - not in this way of thinking. Yes in second thinking about.

    But first - the problem you have is signal leakage. Then the square wave becomes a sine wave or it cannot be transmitted through the cable as well may be the signal comes not to the receiver.
    The higher or sharper the slope of the signal, the slower the frequency needs to be to transmit a digital signal and the shorter the cable length needs to be.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • geralds
    0 geralds over 3 years ago in reply to colporteur

    No - not in this way of thinking. Yes in second thinking about.

    But first - the problem you have is signal leakage. Then the square wave becomes a sine wave or it cannot be transmitted through the cable as well may be the signal comes not to the receiver.
    The higher or sharper the slope of the signal, the slower the frequency needs to be to transmit a digital signal and the shorter the cable length needs to be.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • colporteur
    0 colporteur over 3 years ago in reply to geralds

    Sorry G, No & Yes? I was trying to confirm my numbers.

    I was looking to determine the frequency of the data signal. Analog or digital waveform is not my concern. The question is "trying to make the signal". Transporting such a signal is another matter for consideration in transmission media.

    I attended my very first HP systems course to learn how to install and configure HP Unix computer system used for weather forecasting. The instructor was providing the rules for terminators on the SCSI bus. The original SCSI bus in a computer was moving data at 100Mhz. I was confused until he indicated the bus speed of 100Mhz. Wait, that is in the radio frequency RF range. Rules for termination on the SCSI bus were no different than the termination in an RF transmission environment.

    My background was RF transmission systems from HF to well past UH. My career path was taking me from electronic system support to computer system administration. Some of the knowledge between careers was transferable between careers.

    Computers move data at giggly hertz all the time. It is only when the data is taken from the bus that I would start to consider transmission media.

    Can you create a 200Mhz digital signal on a Raspberry Pi and if yes can it be exported?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • geralds
    0 geralds over 3 years ago in reply to colporteur

    HI,

    It's a point of the type of RPi.

    Not 200MHz. The SPI can transmit up to 125MHz with the chip BCM2711.

    Please read this manual on page 17:

    "Again the SPIs themselves have no throughput limitations, in fact they can run with an SPI clock of 125 MHz. But
    doing so requires significant CPU involvement as they have shallow FIFOs and no DMA support."

    https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf

    Raspberry Pi Datasheets

    Best Regards

    Gerald

    ---

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube