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
Off the Shelf
  • Challenges & Projects
  • Project14
  • Off the Shelf
  • More
  • Cancel
Off the Shelf
Blog Multi Colour Oscilloscope Clock
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Off the Shelf to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: wolfgangfriedrich
  • Date Created: 13 Oct 2021 2:05 AM Date Created
  • Views 1835 views
  • Likes 1 like
  • Comments 0 comments
  • offtheshelfch
  • clock
  • arty-s7
  • fpga
  • oscilloscope
  • 7 segment
Related
Recommended

Multi Colour Oscilloscope Clock

wolfgangfriedrich
wolfgangfriedrich
13 Oct 2021

Inspiration

 

A long long time ago, in the early days of my VHDL endeavors, I set out to re-use an analog 20MHz scope that was sitting in a corner of my company's lab as a clock display. Inspired by PicOClock from Bruno Gavand (Oct 2007), I wanted to do the same clock with an FPGA. From the timestamp of my original source code this was in September 2009. The device of choice was an Altera MAX10, which run out of logic cell with the implementation of a 12 hour clock, a 24 hour display was out of the question. And the board was property of a previous company, so I don't have access any more.

 

Off The Shelf

 

With the announcement of the Off-the-shelf competition and proud owner of a 4-channel scope and an ARTY-S7 board, I figured to re-vamp the design and make it more colourful and maybe a 24-hour clock.

 

Theory of Operation

 

A 7-segment display is basically 3 horizontal bars plus 4 vertical bars. To display this on an oscilloscope, 4 different voltage levels are required which are easily generated by 2 output pins and 4 resistors building a resistor ladder ADC. The resistor values define the voltage levels and for equidistant level, a R-2R setup is the way to go. Identical to the original MCU implementation, I selected a 1 millisecond horizontal timebase for the full screen. Several counters at usec and msec intervals generate 1000 timeslots per millisecond, each timeslot 1 usec wide. During each timeslot, a comparison of the clock digits sets the outputs pins to get the correct voltage level through the ADC. Horizontal bars are a constant level, multiple bars, e.g. all 3 are active at digit '8' are interleaved through up to 3 frames and have a slight flicker visible. Vertical bars switch between 2 levels at consecutive timeslots to generate thicker visible lines. Again depending on the active digit, the vertical bar goes from top to bottom or center. Hour, minute and second counters take care of the time keeping, which limits the clock accuracy to the crystal. No real time clocks were harmed during this project.  

2 buttons are used to cycle through hours and minutes to set the correct time, the seconds are reset to 0 with every button press.

 

Implementation

 

As I knew that the code was already running, I only had to adjust the primary usec timer to the clock frequency of 12 MHz on the board. Everything else is synchronous to counters from there.

Only the output is one huge ugly mess of combinatorial logic per channel, which does not really matter in this case as every comparison is based on the msec timer and there will be enough headroom for the propagation delay to not glitch.

 

The FPGA code and the pin mapping file for the ARTY-S7 board in Xilinx Vivado are attached to this blog post.

 

I also had to build 3 or 4 resistor ladders for 3 or 4 scope channels + another pickup for the millisecond pulse feeding the aux trigger input. I have never used PMOD modules before so I decided to use the PMOD ports on the ARTY board, which are basically 0.1" header with 6x2 rows. I used my off-the-shelf old school solder trace and wire on protoboard instead of a breadboard to make the setup a little more permanent. It became a 1 1/2 layer board with all through hole components on one side and the solder pads + some free form wires on the bottom side.

 

{gallery} Build details

image

Front of the board

image

Back of the board

image

FPGA board setup and scope connection

image

Closeup of 3 colour scope probe connection + ext trigger

image

Oscilloscope-Clock Display

 

Here is the full circuit, that I have built on the protoboard to run the clock. Buttons to set the correct time were re-used on the ARTY board.

image

 

Result

 

To visualize the running clock, the oscilloscope has be set up at 100usec per division with the trigger position at the very left edge of the screen and 0.5V/div, all channels at the same offset level, ideally just outside the bottom edge of the screen. There are artifacts visible when the 'beam' enters the screen from the bottom, adjusting the intensity can minimize this effect.

 

Here is a short video of the clock running in 3 colour mode.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

[videos]

 

Conclusion

 

As far as I know this is the 1st ever multi-colour clock implementation on a scope, using an expensive piece of test gear for a benign but useful function.

 

At any moment, the feature creep could kick in to add some code to use the 4th colour (e.g. for the dots) and expand the display to a full 24 hour clock.

 

Next entry on the new project list would be a multi-colour analog clock driven by my trusted FPGA with the scope in X-Y mode and a whole bunch of arithmetic done in VHDL. This one goes on the shelf for now, as I just made room by taking this project off the shelf. I hope everybody does enjoy it as much as I do.

 

 

And A Late Night Double Feature Picture Show

 

Ambition and the spirit of the contest spurred me on to finish this before closing date.

First I 'borrowed' another BNC cable and added the 4th channel to generate a true 4 colour picture. I decided to keep the look clean with separate colours for hours, minutes and seconds and only make the separator dots in nice channel 4 green. Also I pushed the offset for channel 4 up to move the dots into a more visibly pleasing location.

image

 

And finally, with that huge FPGA it was no problem to upgrade the clock to a full 24 hour display.The full design is only using 1% of the LUTs and flip-flops.image

 

image

 

 

PS: The scope itself, is 'on the shelf' for a long time as well, as dusty as the pictures are. My apologies for the picture quality.

Attachments:
OOclock.zip
OOclock4col24hour.zip
  • Sign in to reply
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