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
  • michaelkellett
    0 michaelkellett over 3 years ago

    It would help us to help you if you could step back a bit and explain what the purpose of all this is.

    Where are these 24 bits to go, what will they interface with ?

    As you describe it the bit rate is 192MHz, the RPi is not capable of toggling a pin at that rate, let alonekeeping in synch.

    A 192MHz logic level signal (such as an RPi IO pin makes has a maximum "range" if a few cm at most in wire or on a pcb.

    But suitable trickery can get 1Gbit/s along 100s of meters of wire.

    Your SPI suggestion is more promising (but still too fast for RPi), so please explain the core purpose of your project.

    MK

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • lolants55
    0 lolants55 over 3 years ago in reply to michaelkellett

    image

    What i should do is just generate 27 bits(start bit + commend 24bits + parity bit + stop bit as described above!) and one bit is generated every 1 / (8MHz) second (at rising edge).

    When receiver detect 28 consecutive zeros, they distinguish the start of receiving.

    And after clk signal and signals come in they interpret 27 bits and instruct commends which is already postulated in receiver(for example 0000 0000 0000 0000 0000 0000 means do nothing) and go on.

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

    Hi 

    Look for SERDES in combination with FPGAs. - Xilinx, Altera, Lattice offer these chips.

    The RPi makes the host.

    You have to create a data frame because of the possible interference in the transmission path.
    All others are not usable.

    And you need a very good cable, e.g. B. Coaxial cable, or much better, you need fiber optic cable, because the transmission of about 200 MHz over a copper cable is very difficult, -> low-pass.

    How long will the transmit/receive length be?

    Best Regards

    Gerald

    ---

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

    Hi 

    Look for SERDES in combination with FPGAs. - Xilinx, Altera, Lattice offer these chips.

    The RPi makes the host.

    You have to create a data frame because of the possible interference in the transmission path.
    All others are not usable.

    And you need a very good cable, e.g. B. Coaxial cable, or much better, you need fiber optic cable, because the transmission of about 200 MHz over a copper cable is very difficult, -> low-pass.

    How long will the transmit/receive length be?

    Best Regards

    Gerald

    ---

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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