Sparkfun Clock FAQ

 

 

Sparkfun O-Clock Hardware 1.1 FAQ

Dutchtronix Firmware Version 4.0ds

October 7, 2010

 

 Sections: 

 
bullet

Introduction

bullet

New Features

bullet

Interfacing

bullet

User Interface

bullet

Clock Operation

bullet

External Clock Source, incl. NMEA Input

bullet

Serial Interface

bullet

Warnings

bullet

Multiple Applications

bullet

Hardware Issues

bullet

AVR-Specific Issues

bullet

Fun 

 

The following description applies to the Sparkfun O-Clock board. This board allows the user to display various clocks on an analog CRT device, like an oscilloscope or an X-Y monitor, and control the options using the on-board push buttons S1 and S2 using on screen menus, all powered by an external wall wart (user provided). A true RS-232 level Serial Interface is also included. The board has footprints for two BNC connectors.

 

Introduction.

Sparkfun is proud to present a new hardware version of the Dutchtronix Sparkfun O-Clock, version 1.1. Some of the features of this board are:

bullet

Equipped with the Atmega328p AVR, providing twice the code space and memory of the Atmega168 used in earlier versions.

bullet

Use of the Analog Devices AD7302 DAC with built-in OpAmp. This DAC has low output impedance while generating an excellent image.  The low output impedance allows the use of regular BNC cables or even wires to connect the Clock board to a display device like an oscilloscope, an X-Y monitor or even a home made CRT device. Probes are still supported.

bullet

Use of the industry standard ds1307 Real Time Clock plus a replaceable backup battery.

bullet

On board power supply. Allows the use of an 8-15V wall wart with a standard DC connector (5.5mm outside diameter Barrel Jack, center positive) to power the Sparkfun O-Clock. A LED indicates the presence of power and there is an On-Off switch.

bullet

Probe connectors (“turret terminals”) are present on the board, as are footprints for two  BNC connectors for use with standard BNC cables.

bullet

On board trimpot to set the output voltage range of the DAC. Maximum voltage range is 5V.

bullet

 Intensity control with both positive (Z) and negative (ZINV) drive levels.

bullet

True RS-232 level Serial Interface with DB-9 female connector using a MAX232A compatible IC. This allows you to connect the Sparkfun O-Clock to a computer using a standard serial cable. Since the level converter is truly RS-232 compliant, you can also connect the Sparkfun O-Clock to an electronics project that uses a parasitic level converter, using the built-in terminal application.

bullet

Connector for an FTDI USB to serial converter cable or the Sparkfun FTDI breakout board

The Oscilloscope Clock is preloaded with firmware V4.0ds.

Image quality varies from scope to scope of course. X-Y monitors, which are like oscilloscopes but without the time-base section, work best. All pictures were taken on a Tektronix 608 X-Y monitor using the Intensity Control output ('Z') available on the board.

 

New Features in firmware V4

bullet

Select different applications/modes from the on-screen menu: Clock, Terminal,  Function Generator, Calibration Screen, Demo and Boot.

bullet

Control Burn-In protection frequency from 1 to 9 minutes, or turn the feature off.

bullet

The Terminal application now supports Vector Graphics, allowing you to run a games like Asteroids on another computer (PC or AVR based) and use the Sparkfun O-Clocks board as the display device (communication using the Serial Connection).

bullet

Selectable Baud Rate setting for the Serial Interface, now including the 250,000 baud value

bullet

Turning GPS mode on now remembers the current Serial Port speed setting and restores that value when turning GPS mode off

bullet

Help Screen, selected by a short S2 push

bullet

Simple Alarm Clock built-in. Use Menu to turn the Alarm on/off (Menu-Alarm:On). Use the On Screen Change Mode option to set the Alarm Time.

bullet

New Clock face:  Digital Display Mode now supported (Menu-Dial:Dig)

bullet

On board LED option to show the time in Morse Code (Menu-Led:Morse).

bullet

Day of the Week display on the screen (Menu-Name:Day)

bullet

The Sparkfun O-Clock supports a total of 37 different display combinations, many more when including the "Day of the Week" Display Option

bullet

The Function Generator has been sped up by 1 cycle, allowing for higher frequency waveforms.

bullet

Use the IOCTL serial command to select unusual options.

 

Internal Enhancements

bullet

Various bug fixes

bullet

Source code rewritten in C (was all AVR Assembly language in earlier versions)

bullet

The RTC is now programmed using the AVR's TWI mode (was bit banged in earlier versions)

bullet

Improved Char Rendering image quality and speed.

 

General Features (already available in firmware V3)

bullet

User control with 2 push button switches, including auto-repeat operation

bullet

Selectable Baud Rate setting for the Serial Interface

bullet

Select PPS (Pulse Per Second) mode: either 4096Hz (default) or 1 Hz (for use with an external 1 PPS signal.

bullet

Ability to do time accuracy correction in software.

bullet

Binary Clock Display option (Menu-Dial:Bin). This is a BCD binary clock. Show them you are an ubergeek! Try changing the current time when the Numeric Display is turned off!

bullet

24 Hour Clock Dial option (Menu-Dial:24hr). To see the exact time on an analog dial, when no numeric date is being shown (for example when the current date is displayed or when the Numeric Display has been turned off), you need a dial showing the 24-hour time digits. The dial will switch automatically, based on the current time.

bullet

More into a classical clock dial? Use Roman Numerals Dial option (Menu-Dial:Rom). The proper symbol for the number 4 is now used.

bullet

Date Display (Menu-Num:Date). The date can be changed using an S1 long push when the date is being displayed in the Numeric Display.

bullet

Hexadecimal Numeric Time Display (Menu-Num:Hex). This option was designed to work together with the Binary Clock Display to form a "Bi-Hex" clock.

bullet

Fractional Seconds Display option (Menu-Chrono:On). This mode will add a display of 1/100 of a second unit to either the 24 hour Numeric Display or the Hexadecimal Numeric Display

bullet

The Sparkfun O-Clock supports a total of 30 different display combinations.

bullet

GPS device NMEA parsing ($GPRMC records) allows you to connect your GPS device to the Sparkfun O-Clock and always display the correct Date and Time. You select the correct Local Time Offset (-12 to +12) when enabling this option in the Menu. If Automatic Daylight Saving Time Adjustment is enabled (see below), you don't have to worry about that either.

bullet

Automatic Daylight Saving Time Adjustment is supported for two zones: USA and EU for the years 2008 to 2014. Not only will the Sparkfun O-Clock set the time forward or backwards at a transition, it will also apply the proper adjustment when the clock has been turned off for a while and is turned on when Daylight Saving Time is active, and it will only do it once. Keep in mind that the Real Time Clock present on the Sparkfun O-Clock knows nothing about Daylight Saving Time.

bullet

User Name Display on the clock face is now supported. This User Name can be up to 20 characters in length. By default the name "Sparkfun" is displayed but you can edit the User Name in the menu, now using auto-repeat on switch S1. Spaces can be used in the User Name, but 2 adjacent spaces indicate the end of the User Name. The User Name Display can be turned off.

bullet

Need to return the clock to its original state? Select the Menu-Reset:On option. This will clear the EEProm configuration data. Handy if the EEProm configuration data ever get messed up. This option requires an explicit ON value to prevent the user from accidentally erasing the EEProm configuration data.

bullet

Play option: Menu-Play:Norm/Rev/FF/FR where FF means Fast Forward and FR means Fast Reverse.

bullet

Handy Serial Command Line interface; some commands require sub-values. For example to set the Numeric Display to show the date, enter "xn", followed by "3". The clock will prompt for the sub-values, showing the valid range.

bullet

Demo mode allows you to demonstrate many of the features of the Sparkfun O-Clock to friends and family.

bullet

On-screen menu using push button switches S1 and S2.  Using the S2 short push to move from field to field makes going through all 14 fields a breeze.  If you enter the menu by accident, just do an S2 long push; the clock will restart instantly.

bullet

The bootstrap loader uses the stk500v1 protocol and works with avrdude (from WinAvr). This bootstrap loader is permanently present in the Atmega328p microcontroller and uses just 512 words of memory.

 

Sparkfun O-Clock Interfacing

 

Q: What kind of oscilloscope can I use?

A: Any analog scope with X-Y mode should work without problems. Low-end digital scopes will surely not work, High-end digital scopes may work (Tektronix TDS3034B and HP54600B work well, Tektronix 2014B works ok) . High-end analog scopes (400 MHz or better) like the Tektronix 7904 or 7854 will have some flicker because their phosphor decay time is so short; this will make the picture look less stable, even at a refresh rate of over 150 times a second. On scopes like the Tektronix 465 and 475, the picture is rock solid.

 

Q: What kind of cables should I use to connect the clock to the oscilloscope?

A: The easiest way to connect the Sparkfun O-Clock to your scope is to use probes with pincer tips. The CH1 and CH2 turret terminals were selected to be easily useable for probes with pincer tips. When the BNC connectors are installed (user option), regular BNC cables can be used. The AD7302 DAC is a low output impedance DAC which allows the use of 1X probes, BNC cables or straight wires; 10x probes will also work. Connect the scope’s intensity control to the Z or ZINV output of the Sparkfun O-Clock to improve the image even more.

Set the scope in X-Y mode and connect the cables or probes to channels 1 and 2. Turn the potentiometer marked "SIZE" all the way counterclockwise (maximum image size). Set both channels to DC mode and the voltage range to 0.5V per division. Now turn the potentiometer marked "SIZE" clockwise to make the image fit your screen.  You can tweak the image, for example to make it completely square (8 divisions), by manually reducing the voltage per division value (VAR knob.) If your scope does not support 0.5V per division, reduce the image size by turning the potentiometer marked "SIZE" until the generated images matches your scope.

Most scopes define CH1 and the X axis and CH2 as the Y axis. Some, for example the Tektronix 485, reverse this convention. As a result, you will need to swap the probes.

Please note that if the image looks distorted when using 10x probes, you may have to adjust the probe compensation (they usually have a small adjustment screw).

 

Q: How do I power the Sparkfun O-Clock?

A: Use a standard wall wart which generates somewhere between 8 and 15V DC and has a 5.5mm outside diameter DC power plug, center positive. This is the most common DC power plug used. The kit includes such a plug. The Sparkfun O-Clock has protection against reverse polarity.

 

Sparkfun O-Clock User Interface

 

Q: How are the on-board button switches operated?
A: There are 2 push button switches, S1 and S2. Each switch has 2 actions: long push (> 1 second, hold until you see a change) and short push (<1 second, push and release). Switch S1 also has auto-repeat capabilities when in Time/Date Change or Menu mode. An S1 long push enters the Time/Date Change mode, an S1 short push enters the Menu mode. An S2 long push reboots the Sparkfun O-Clock

 

 

Time/Date Change mode:

bullet

S1 short push advances the current field one

bullet

S1 long push will auto-repeat

bullet

S2 short push moves to the next field.

 

Menu mode:

bullet

S1 short push selects the next value.

bullet

S1 long push will autorepeat

bullet

S2 short push activates the current option if changed or moves to the next option .

 

Sparkfun O-Clock Operation

 

Q: How do I change the time on the Sparkfun O-Clock using the button switch?

A: To change the time, make sure that the Numeric Display shows the current time (either 12Hr, 24Hr or Hex). If not, change it using the menu. An S1 long push will enter the Change mode. If the Numeric Display is Off, the time will also be changed, even if the Binary Clock Display is active. The clock is stopped when changing time. The value being changed will flash at this point. If the Numeric Display is Off, one of the Clock Hands will flash in an Analog Dial Display. In a Binary Clock Display, the "lights" columns representing the value being changed will flash. A S1 short push will increment the current field (hours, minutes, seconds); keep S1 pushed in to auto-repeat. An S2 short push will move to the next field, using the current field value as the new time value. Once done with the seconds field, a "Push S1 To Start" message pops up. An S1 short push will restart the clock at the selected time. You can cancel the Time Change operation using an S2 short push; this will restart the clock at the actual time, as kept by the on-board Real Time Clock. Change mode times out after 30 seconds of inactivity.

 

Q: How do I change the date on the Sparkfun O-Clock using the button switch?

A: To change the Date, make sure that the Numeric Display shows the current date. If not, change it to display the Date using the menu (Menu-Num:Date).  An S1 long push will enter the Change mode. The value being changed will flash. An S1 short push will increment the current field (year, month, day); keep S1 pushed in to auto-repeat. An S2 short push will move to the next field. The clock leaves Change mode automatically after finishing the Day value. The order of change is Year, Month, Day. This way, the clock can verify the date validity better (number of days per month, leap year etc.) Just FYI, years divisible by 4 are leap years, except when also divisible by 100. But the year 2000 is a leap year in the Gregorian Calendar because it is divisible by 4,  100 and 400.  Change mode times out after 30 seconds of inactivity.

 

Q: What options are available using the on-screen menu?
A:
An S1 short push will enter the Menu Mode. Once the Menu mode is entered, you'll see the following menu on the screen:

 

Option

 Values

Function

Option

Value

Function

Num

12hr
24hr
Hex
Date
Alarm
Off

Select Numeric Field to Display

Dial

12hr
24hr
Rom
Dig
Bin
Min

Select Clock Dial to Display

GPS

Off
-12 ..
+12

Select GPS NMEA input using the selected local time zone offset

DST

USA
EU
Off

Select Automatic
Daylight
Saving
Time for USA or EU

App

Clock
Cal
Term
Gen
Demo
Boot

Select application to run

PPS

1Hz
4096Hz
-4..
+4

Set PPS mode and apply software accuracy correction.

Chrono

Off
On

fractional seconds
display

Alarm

Off
On

Turn Alarm function On and Off

Led

On
Morse
Debug
Off

Controls on-board Led

BurnIn

0..
9

Control Burnin Prevention frequency

Play

Off
Rev
FF
FR

Fun modes: Reverse, Fast Forward and Fast Reverse

Reset

Off
On

Re-initialize the EEProm area of the Atmega328p to "virgin" state.

Baud

19200..
14400

Set Baud Rate on Serial Interface

Name On
Off
Edit
Day

User Name Display or
Day of the Week

    Current User Name is displayed below the Menu      

 

 

Q: How do I change an option on the Sparkfun O-Clock using the S1 button switch?

A: An S1 short push will enter the Menu Mode. The option being updated/selected is flashing. Move to the next option by an S2 short push.  The options are selection values: an S1 short push will show the next selection value; keep S1 pushed to auto-repeat. Moving to the next option (using an S2 short push) when the selection value has changed, will activate the selected value and the clock will leave the menu mode.   Menu mode times out after 30 seconds of inactivity.

 

Q: What does the the S2 tactile switch do?

A: A short S2 push will display a help screen for about 5 seconds, or until the user hits another short S2 push. The S2 switch will  reboot the Sparkfun O-Clock when doing a long push. Use an S2 long push if you want to leave the menu quickly. When in Time/Date Change mode or on the Menu page, the S2 short push moves the cursor from field to field. This allows you to move very quickly through the menu. Finally, when the Alarm is activated as shown in a flashing dial, a short S2 push will stop the Alarm.

 

Q: How do I tell the Sparkfun O-Clock to display only the analog clock?

A: Select the Num option, set the value to Off. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to display a minimal dial on the analog clock?

A: Select the Dial option, set the value to Min. Only 4 hour numbers will be displayed. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to display a dial with Roman Numerals on the analog clock?

A: Select the Dial option, set the value to Rom. Roman Numerals will be now be displayed on the dial. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to show a Digital Clock Display ?

A: Select the Dial option, set the value to Dig. The time will be displayed in 24 hr format using large digits. There will also be a dial of dots, one of which will be highlighted to show the current second value. IOCTL bits are available to fine-tune this display. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to show a Binary Clock Display ?

A: Select the Menu-Dial option, set the value to Bin. The clock will switch to a Binary Clock Display. This clock will display 24 Hour time in a BCD Binary fashion. You will see 6 columns displaying from 2 to 4 on-off "lights".  The left-most 2 columns show the hours, the middle 2 columns show the minutes and the right-most columns show the seconds. Each column represents one digit, together they form a value. The lowest position in each columns represents bit 0, the highest can be bit 2, 3 or 4. The size of each column was selected to represent the full range for each digit in its position. For example, the lowest digits for seconds can range from 0..9 so we need 4 bits to display the number 9 in binary. The highest digit for hours can range from 0..2 so we only need 2 bits to display the number 2 in binary. When you select a hexadecimal Numeric Display (Menu-Num: Hex) with this Binary Clock Display, you are looking at a Bi-Hex clock.  This mode is persistent.

 

Q: How do I read the Numeric Time in Hex?

A: The Numeric Time in Hex is a binary representation of the values of the time components, in 24 hr format. Convert each field from hexadecimal to decimal (0..59) and you'll see the current time. There is no separate BCD Hex Numeric Display since such a display is identical to the regular 24 hr Numeric Display since each digit is in the range 0..9 (identical in decimal and hex)

 

Q: How do I tell the Sparkfun O-Clock to display the Numeric Display in AM/PM mode?

A: Select the Num option, set the value to 12hr. This mode is persistent.

 

Q: How do I change the Clock Face to something more serene?

A: The Sparkfun O-Clock provides 3 different controls to change the clock face, providing a total of 30 different combinations. Use the Num option to turn the numeric display Off . Use the Menu-Dial:Min option to remove most digits from the clock face. The combination of no numeric display and fewer digits provides a minimal but elegant display.  You can select the Numeric Display format with the Num option, value 12hr, 24hr, Hex, Date, or Off

 

Q: What is PPS and how do I change the PPS frequency?

A: PPS refers to "Pulse per Second". The Real Time Clock (RTC) interrupts the AVR at precise intervals. The AVR keeps track of time by counting these pulses. By default, the Sparkfun O-Clock  runs in 1Hz PPS mode. This mode can also be used when using an external signal to advance the time, for example using a GPS device based 1PPS (1 pulse per second) signal.

 

However, it may be possible, depending on the particular crystal used and ambient temperature, that your clock runs more accurately when the RTC interrupts the AVR 4096 times per second. After 4096 pulses, 1 second has elapsed. Only experimentation can tell. 

 

When changing between 1Hz and 4096Hz PPS mode, the RTC is also reprogrammed to generate the corresponding pulse frequency.

 

When using an external PPS signal (usually from a GPS device), the solder joint JP4 needs to be opened (remove the solder) and a 3-pin 0.1" header needs to be soldered into JP4. It is then possible to connect the external signal using header pins marked "GND" and "PPS", or a shunt can be installed on the header pins "PPS" and "PPS RTC" to use the RTC again. When using an external 1 PPS signal, the clock must be changed to 1 PPS mode using the on-screen menu (field PPS)

 

Keep in mind that the 4096Hz PPS mode will require a little bit more power from the backup battery when the clock is turned off, than the 1Hz PPS mode.

 

The values -4 to +4 are used to apply a software time accuracy correction, see the next entry.

 

Q: How do I change the accuracy of the Sparkfun O-Clock using the PPS field?

A: It is possible to apply a software accuracy correction using the PPS field. What this means is that the clock must be fed a 4096Hz pulse signal from the RTC but NOT an external 1Hz signal. The AVR will internally use a different count to determine when a second has passed based on the following table:

 

PPS Value

AVR Count

result

result

-4

4092

run 0.097656% faster

3.52 sec/hour faster

-3

4093

run 0.073242% faster

2.64 sec/hour faster

-2

4094

run 0.048828% faster

1.75 sec/hour faster

-1

4095

run 0.024414% faster

0.88 sec/hour faster

1

4097

run 0.024414% slower

0.88 sec/hour slower

2

4098

run 0.048828% slower

1.75 sec/hour slower

3

4099

run 0.073242%  slower

2.64 sec/hour slower

4

4100

run 0.097656% slower

3.52 sec/hour slower

 

If you find that the clock runs 1 second per hour too fast, select PPS option 1; this will slow the clock down by about 1 second per hour.

Keep in mind that the correction is only applied when the clock has power. When the power is turned off, the RTC maintains its own time (powered by the on-board battery) and NO correction can be applied.

 

Q: How do I change the User Name to my own preference?

A: The current User Name is displayed at the bottom off the menu page, but is not a normally selectable field. Select the "Edit" option in the "Name" field to change the User Name. The actual edit process, once a User Name edit has started, is simple: the character being changed flashes. An S1 short push "increases" the char in an ASCII sequence (ASCII 127 is the highest char available, after which rotation to SPACE (ascii 32) occurs; keep S1 pushed to auto-repeat.

An S2 short push advances to the next char in the name.  Two spaces in a row complete the edit. For example to change the user name to "John Doe", enter "John Doe  ". This method allows for single spaces inside a name. The maximum length of a name is 20 positions. Editing will stop once the 20 positions have been reached.

If you are impatient like I am, you will be happy to know that as of firmware V3.5, auto-repeat is supported when changing a name. Very nice if you just pushed the button one too many times, and ended up with the next character!

The desired User Name is stored in the AVR EEprom memory. Flashing (aka blinking) may obscure the current char for a very short time (1/2 second) so be patient when incrementing a character: use the S1 auto-repeat feature to get close to the desired character value, then use S1 short pushes for the last strech.

If you entered the edit mode by accident, you can either advance to the end of the name using S2 short pushes, followed by 2 spaces, do an S2 long push to reboot the clock or you can just wait 30 seconds and the clock will time-out the edit mode.

Display of the User Name can be turned off using the "Off" option the "Name" field.

 

Q: How do I make the Sparkfun O-Clock show the "Day of the Week"?

A: Select the Name option, set the value of Day. This mode is persistant. Note that this replaces the current User Name. Select Menu-Name:On to show the User Name again.

 

Q: What is the "Automatic Daylight Saving Time" feature all about?

A: Daylight Saving Time, called "Summertime" in the European Union, is a time system where time is advanced by one hour sometime early in the year and time is set back one hour near the end of the year (in the Northern Hemisphere.) When you live in the USA or Western Europe, you won't have to change the clock to correct for Daylight Saving Time (DST) until 2015! The dates when DST takes effect and ends are programmed in the Sparkfun O-Clock for the years 2008-2014, based on the most recent laws, both for the USA and the European Union. Look at this website for all the details.

Not only will the clock automatically set the time one hour forward (and one hour back) when transitioning in and out of a DST window (the combination of date and time for which DST is active), the clock will also set itself to the proper time if it has been turned off for a while. Even though the Real Time Clock (RTC) on the Sparkfun O-Clock keeps running when the clock is turned off, it is not aware of DST so the RTC time will be off by one hour if it was turned off before a DST window, then turned on within such a window. The Sparkfun O-Clocks make the necessary adjustment when turned on. The clock keeps track of the adjustments made for each of the 7 supported years so that adjustments (forward and backward) are only applied once.

If the user manually changes the date, the clock will check if this new date requires a DST adjustment and will do so, if needed.

If the user manually changes the time, the clock assumes the user knows best, will not do an DST adjustment but will mark that a DST adjustment was made for the current year (if appropriate).

The time at which DST starts and ends is fixed at 2:00 AM. This is valid for the USA and most of Western Europe. However in the United Kingdom (which has UTC time), DST starts and ends at 1:00AM. There is no separate UK zone so the Sparkfun O-Clock is not 100% accurate for those living in the United Kingdom.

The automatic DST feature also works with the GPS NMEA input mode, again assuring you accurate date and time. Combine GPS NMEA input mode with Automatic Daylight Saving Time and you'll have the correct date and time until March 8, 2015, 01:59 AM, accurate to within 10 milliseconds (when also using the GPS 1 PPS input.)

 

Q: What does the "Chrono" Menu option do?

A: The Chrono option in the menu enables a fractional seconds display in the 24 hrs and hexadecimal numeric display modes. This fractional seconds display shows the current time in 1/100 of a second increments.

 

Q: Why does the clock display jump ever so slightly every 5 minutes?

A: The Sparkfun O-Clock offsets the display slightly every 5 minutes to prevent screen burn-in on your oscilloscope.You can change the frequency of this burn-in prevention feature to be from 1 to 9 minutes using the Burnin option, value 1 to 9. Select value 0 to turn off Burn-in prevention completely. This mode is persistent.

 

Q: What does “this mode is persistent” mean?

A: It means that the mode is remembered when the power is turned off, and the clock will start in the same mode when the power is turned back on. This is achieved by setting status bits in the EEProm section of the Atmega AVR.

 

Q: How do I align the clock properly on my scope?

A: a Calibration screen is available for this purpose. Select the App option, set the value to Cal , which will display a Calibration Pattern on the scope, to adjust the display. While in Calibration Mode, use the Volts/Div VAR knobs together with the position knobs to get the best square possible; this screen can also be used to fine-tune the probe compensation adjustments.  Get back in the Menu mode (S1 short push), Select the App option, set the value to Clock , to return to the normal clock display.

 

Q: Why doesn’t the Calibration Screen change location to prevent Burn-in?

A: This is a design decision. Having the Calibration Screen move while you are aligning the screen doesn’t seem to be a good idea.

 

Q: How do I tell the Sparkfun O-Clock to start and stop blinking the LED?

A: Select the Led option, set the value to On or Off to toggle the LED blinking. Stopping the blinking LED will also suppress the valid NMEA record received notification on the display ('G') if GPS mode is enabled. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to show the current time in Morse code using the LED?

A: Select the Led option, set the value to Morse. The LED will show the current time using Morse code. The actual sequence transmitted is: "CT hh:mm:ss".  The Morse sequence may take up to 22 seconds, after which the process repeats, each time using the current time.

 

Q: How do I reset the Sparkfun O-Clock without disconnecting power?

A: An S2 long push will reboot the Sparkfun O-Clock.

 

Q: Is there another way to communicate with the Sparkfun O-Clock?

A: Yes, you can also use the serial interface to communicate with the Sparkfun O-Clock. This requires a standard Serial cable with DB-9 connectors and a terminal, usually a terminal program on a computer. Use the letter "x" to obtain a prompt. This interface is completely optional.

 

Q: How do I know which version of the firmware my clock is running?

A: Enter Menu mode using a S1 short push or the Help screen using a short S2 push. The top line shows the current firmware version. The serial connection will also display the firmware version, both when starting up and when using the status command ("s").

 

Using an External Clock Source

 

Q: How do I apply an external clock source to the Sparkfun O-Clock?
A: The Sparkfun O-Clock normally receives a 1Hz signal from the Real Time Clock (RTC). This signal can be intercepted and replaced at the header with pins marked "PPS RTC", "PPS" and "GND". The "PPS RTC" and "PPS" pins are normally shorted by solder joint JP4, but you can feed your own external 1 PPS signal (usually from a GPS device) to the pin marked "PPS".

To achieve this, the solder joint JP4 needs to be opened (remove the solder) and a 3-pin 0.1" header needs to be soldered into JP3. It is then possible to connect the external signal using header pins marked "PPS" and "GND".When using an external 1 PPS signal, make sure that the clock runs in 1 PPS mode using the on-screen menu (field PPS)

Once the solder joint has been opened, a shunt must be installed on the header pins "PPS" and "PPS RTC" to use the Real Time Clock again (as opposed to an external 1 PPS signal).

 

Q: How do I hook up the Sparkfun O-Clock to my GPS unit?

A: Connecting your GPS unit to the Sparkfun O-Clock is simple once you get the correct cabling. This step may be frustrating though.

 

bullet

Serial Communication can electrically be done in at least 2 ways:
bullet

using TTL levels (5V)

bullet

using the RS-232 convention (-12V to -5V)

bullet

The pin marked "RX" in the USB header accepts incoming serial communication and expects 5V (TTL) level signals. Make sure the switch next to this header is set to USB. Check what voltage level your GPS unit generates on its outgoing serial port. A bare GPS chip/board usually generates 5V (TTL) levels (but may also be 3.3V levels), a more extensive board may generate the RS-232 levels. If your GPS unit generates these RS-232 levels, connect it to the DB9 connector.

bullet

Serial communications is based on a TX line and an RX line. You need to make sure that the TX line of the GPS unit is connected to the RX line on the Sparkfun O-Clock. A standard serial cable used to communicate with a computer will not work! The easiest way is to use a "null modem" adapter with your existing cable to switch the RX and TX lines. Make sure you pay attention to the DB-9 connectors used on your cabling: there are male ones and female ones. Combining a "gender changer" and a cross-over cable is a good option.

 

You can use the built-in Terminal application, already present on the Sparkfun O-Clock (Menu-App: Term), to test out the serial communication between a GPS device and the AVR oscilloscope hardware! Don't forget the set the proper baudrate in the menu (Menu-Baud:4800.) Once the connection is working, configure the GPS unit to send out NMEA $GPRMC records at 4800bps; this is the default on most units.

The GPS device may send out lots of NMEA information every second. The Sparkfun O-Clock will have to process every record, discarding most of them. Even though the Serial Input on the Sparkfun O-Clock is completely interrupt driven and buffered, it does take some time to find the individual NMEA records, time during which the oscilloscope screen cannot be refreshed and you will see an intensified dot on the screen when a lot of unwanted NMEA records are streamed by the GPS unit. If possible, disable the sending of other records and set the send frequency of the $GPRMC record to no more than once every 5 seconds; this is not required but makes it easier for the Sparkfun O-Clock. If necessary, also select UTC time, not GPS time.  Do not connect the cable to the Sparkfun O-Clock yet at this point.
Start the menu on the Sparkfun O-Clock and advance to the "GPS" field. The default value is "Off". S1 short pushes will cycle you through the possible options; keep S1 pushed for auto-repeat. These numbers indicate your "local time zone offset" from UTC (Greenwich time). For example, the local time zone offset here in the Northwest is -8. For the United Kingdom, the offset is 0. Activate the selected option and connect the cable. If all is well, you will see the letter 'G' appear in the status field every 4 to 5 seconds, lasting 1 second. This indicates that the Sparkfun O-Clock has found a valid $GPRMC record. The 4 to 5 seconds is because the Sparkfun O-Clock will wait 4 seconds after finding a valid $GPRMC record before accepting another one. Parsing these records costs time, including several ASCII to binary conversions, so the Sparkfun O-Clock waits 4 seconds after receiving a valid record. If the Sparkfun O-Clock determines that its time and/or date differs from the time and/or from the GPS device (after adjustments for the local time zone offset and possibly Daylight Saving Time), it will update itself and start a 5 second warning (flashing 'G'). This should be infrequent. The display of a 'G' every time the Sparkfun O-Clock receives a valid $GPRMC record can be turned off using the Menu-Led:Off option.

Please disconnect the GPS cable before changing the "GPS" field in the Sparkfun O-Clock menu to "Off". First of all the baud rate of the serial port is changed to its original value and secondly, the Sparkfun O-Clock will try to interpret the incoming data (from the GPS device) as commands.

Combining the 1PPS signal from a GPS unit with NMEA parsing will give you an extremely accurate clock which will continue running even if you lose the GPS satellite signal (displaying the 'P' warning); the clock will correct itself, if necessary, once another lock is obtained.

 

 

Serial (RS-232) interface

 

Q: Do I need the use the Serial Interface?

A: No, use of the Serial Interface is optional. The Sparkfun oscilloscope scope clock uses the on-board pus button switches S1 and S2 to set the time and has an on-screen menu to set options, using the same switches.

 

Q: What is the hardware connection between the Sparkfun O-Clock and the RS-232 interface on the computer?

A: You can use a standard serial cable. Such a cable has one female DB-9 connector and one male DB-9 connector. The male DB-9 connector plugs into the female DB-9 connector on the clock. These cables also connect the proper RX and TX pins on each side of the cable (crossover cable.)

 

Q: What baud rate do I set for the Serial interface to my computer (or some other terminal)?

A: The Sparkfun O-Clock uses a default baud rate of 19,200. Other values are default (8 bits, 1 stop bit, no parity, and no handshaking). You can change the baud rate using the on-screen menu.

 

Q: How do I change the baud rate on the Serial Interface?

A: Use the on-screen menu (S1 short push) to change the baud rate: Menu-Baud:value. Supported values are 19200 (default), 28800, 38400, 57600, 115200, 250000, 4800, 9600, 14400. The Sparkfun O-Clock will remember the current baud rate and automatically set the baud rate to 4800 bps when enabling GPS input mode but you can then change it to another value, if so desired. The Sparkfun O-Clock will restore the remembered baud rate when disabling GPS input mode.  The selected baud rate value is persistent, meaning the value is retained after a reboot or power cycle.

 

Q: How can I check the current baud rate setting on the Serial Interface?

A: Select the on-screen menu (S1 short push) and the current baud rate is shown in the field called "Baud"). Use S2 short pushes to quickly exit the menu.

 

Q: How do I communicate with the Sparkfun O-Clock using the Serial interface?

A: Using the proper serial cable, as described above, you can use your favorite terminal program, such as HyperTerminal or Bray’s Terminal, and set it to use a 19,200 baud rate, 8 char, 1 stop, no parity, and no handshaking (default baud rate). Make sure you select the proper COM port, where the cable is plugged in, usually COM1. If the connection is good, the Sparkfun O-Clock will display a sign-on message when it starts. You can communicate by using the ‘x’ key. The Sparkfun O-Clock will show a command prompt with all available commands. Type 'h' for more details. All command keys can be either upper or lower case; the Sparkfun O-Clock will treat them as identical. Prompts will time out after 30 seconds.

Note that the Serial Command Line interface is not available when the GPS NMEA parsing option is enabled since that feature uses the same serial port. The same applies when running other applications like the Terminal or the miniDDS function generator since these applications use the serial ports themselves.

 

Q: How do I send commands to the Sparkfun O-Clock using HyperTerminal?

A: HyperTerminal sends each character typed immediately to the Sparkfun O-Clock, which will prompt you for the next character, if needed. You can always type another ‘X’ to cancel a command. Please double check that hardware handshaking is turned off because it is the default in HyperTerminal.

 

Q: How do I send commands to the Sparkfun O-Clock using Bray’s Terminal?

A: Bray’s Terminal does not send each character typed immediately, as HyperTerminal does. You must select the white “send” line near the bottom of the window (transmit section) with the mouse and type the characters to send there. Do not add any CR or LF characters. Use the “send” button to transmit the characters, one at a time or all at once, whatever you prefer. The Sparkfun O-Clock can buffer up to 128 characters at a time. For example to change the clock to 2PM, you can type “XT140000” in the send line and then hit the ->send button.

Bray’s Terminal also allows you to assign macros containing multiple characters. If you use those, you can send multiple commands in rapid succession. You’ll see that the Sparkfun O-Clock is incredibly responsive without affecting the display.

 

Q: Can I send commands to the Sparkfun O-Clock any other way?

A: Sure, you can use the "copy" command in a DOS box to control the clock. For example, you can make a script to pull the current time from the internet (using an NTP server), create a text file with a clock command and send that file to the Sparkfun O-Clock to set the time, like this:

  

        copy settime.txt com1:

 

Where settime.txt would look like this:

 

        xt12:00:00

 

Using this technique, you can also use the Sparkfun O-Clock to display a text based slide show. Check out the file below for an example

 

      ClockMessage.zip

 

Please note that there are trailing spaces in the files line1.txt to line7.txt

 

Q: My laptop does not provide an Serial interface. What can I do?

A: The best solution is to use an FTDI USB to serial converter cable or the Sparkfun FTDI breakout boardOne thing to keep in mind with the USB interface is the fact that you will need to communicate with a USB Host, usually a computer. The USB interface cannot be used to communicate with another USB client (aka slave), unless you use some kind of bridging device. A USB only GPS device cannot be directly interfaced; use a serial GPS receiver instead.

 

The use of the RS-232 interface is optional. It can be used for firmware upgrades, a very fast user interface, GPS device input and other applications.

 

Q: If my oscilloscope is not near my computer, what should I do?

If you want to use the serial interface away from your oscilloscope, you can disconnect the Sparkfun O-Clock from the oscilloscope and check its operation near the computer independently (except for the Calibration Screen). The LED on the Sparkfun O-Clock will blink every second if it is operating properly. The Sparkfun O-Clock will also communicate its status through the RS-232 interface; you don’t need a hookup to an oscilloscope to change settings using the serial interface.

 

Q: What commands are available using the Serial interface?

A: Once the cable is connected properly, the clock will display a sign-on message on the terminal when it powers up. The command 'X' is used to get the clock's attention (interactive mode). A prompt will show:

 

 

Command(A,B,C,D,F,G,H,I,K,L,M,N,P,R,S,T,U,V,W):

A: Change Application (Clock, Calibrate, Term, Func, Demo, Boot).

B: Change Burn-in Prevention Frequency

C: Toggle Alarm

D: Set Date

F: Set Clock Face Mode

G: Toggle GPS NMEA input Parsing
   Currently it is not possible to set the Time Zone Offset in command mode.

H: Show extended Help

I: Set IOCLT customization word

K: Toggle the Fractional Seconds Display

L: Set LED Mode

M: Toggle 1PPS Trigger Mode

N: Set Numeric Display Mode

P: Set Clock Play Mode

R: Reset the EEProm Configuration Data

S: Show Status info

T: Set Time

U: Set Automatic Daylight Saving Time Adjustment

V: Toggle Verbose Output

W: Enter User Name
   Currently it is not possible to select the "Day of the Week"
   or "O" option in command mode

 

Execution of any of these commands, or another 'X' will end the interactive mode. Prompts will time out after 30 seconds. Note that the commands can be given in either upper or lower case.

 

Q: How do I tell the Sparkfun O-Clock to change the Clock Face?

A: Use the 'F' command followed by a 1 digit numeric value.

The full list of options is:

        0    12 hr dial
        1    24 hr dial    (can show numbers 13..23 on the dial)
        2    Roman Numerals Dial
        3    Digital Clock Display
        4    Binary Clock Display
        5    Minimal dial

 

Q: How do I tell the Sparkfun O-Clock to change the Numeric Display?

A: Use the 'N' command followed by a 1 digit numeric value.

The full list of options is:

        0    12 hr (AM-PM)
        1    24 hr (International/Military Time)
        2    Hexadecimal
        3    Date
        4    Alarm
        5    No Numeric Field

 

Q: How do I tell the Sparkfun O-Clock to display just the dial on the analog clock?

A: Use the ‘F5’ command to select a dial with just 4 numbers. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to display the Numeric Display in AM/PM mode?

A: Use the ‘N0’ command to set the Numeric Display to AM/PM mode. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to start and stop blinking the LED?

A: Use the ‘L’ command followed by a 1 digit numeric value to control the LED.

The full list of options is:

        0    turn LED blinking ON

        1    make LED show the current time using Morse code

        2    make LED show debug information, specifically when serial input buffer overflow occurs

        3    turn LED blinking OFF

Turning the LED off will also suppress the 'G' notifications on the screen when a valid $GPRMC record has been received (in GPS mode). This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to send the current time and date to the Serial interface every minute?

A: Use the ‘V’ command to toggle Verbose mode. This mode is persistent.

 

Q: How do I tell the Sparkfun O-Clock to send the current time and date to the Serial interface every minute?

A: Use the ‘V’ command to toggle Verbose mode. This mode is persistent.

 

Q: How do I align the clock properly on my scope?

A: Select the Calibration Mode, command ‘C’, which will toggle between the regular clock and a Calibration Pattern on the scope, to adjust the display. While in Calibration Mode, use the Volts/Div VAR knobs together with the position knobs to get the best square possible; this screen can also be used to fine-tune the probe compensation adjustments.

 

Q: How do I set the time on the Sparkfun O-Clock using the Serial interface

A: Type ‘X’ on the terminal. Once you get a command prompt, type ‘T’. The Sparkfun O-Clock will prompt you for the time. The hours info must be entered in the 24-hour format. Here is the conversion from the US standard to 24-hour format:

 

US Regular Time

24 Hour Time

US Regular Time

24 Hour Time

12:00 a.m.

00:00

12:00 p.m.

12:00

1:00 a.m.

01:00

1:00 p.m.

13:00

2:00 a.m.

02:00

2:00 p.m.

14:00

3:00 a.m.

03:00

3:00 p.m.

15:00

4:00 a.m.

04:00

4:00 p.m.

16:00

5:00 a.m.

05:00

5:00 p.m.

17:00

6:00 a.m.

06:00

6:00 p.m.

18:00

7:00 a.m.

07:00

7:00 p.m.

19:00

8:00 a.m.

08:00

8:00 p.m.

20:00

9:00 a.m.

09:00

9:00 p.m.

21:00

10:00 a.m.

10:00

10:00 p.m.

22:00

11:00 a.m.

11:00

11:00 p.m.

23:00

 

You can also send the new time in one command, for example 'xt130000 will set the time to 1:00 PM

 

Q: How do I change the Clock Face to something more serene?

A: The Sparkfun O-Clock provides 3 different controls to change the clock face, providing a total of 30 different combinations. Use the ‘N’ command to select the Numeric Display mode (0-5). Use the ‘F’ command to select the Dial Display mode (0-5).

The combination of No Numeric Display and Minimal dial (XN5XF5) provides an serene display.

 

Q: How do I change the Triggering method for the 1PPS signal?

A: The AVR triggers by default (when in a clean state) on the falling edge of the 1PPS signal because the Real Time Clock, which is the default 1PPS signal generator, produces a negative going signal. An external 1PPS signal may require a trigger on the rising edge of the signal, for example if it is a long positive going signal or the return to GND level is very slow. You can toggle the 1PPS trigger mode using the 'M' command. The Sparkfun O-Clock will reboot after this command since the INT0 interrupt needs to be reinitialized.

 

Q: How do enter a User Name using the Serial Interface?

A: Use the 'W' command. You will be prompted for a the name. Enter the desired name followed by 2 spaces, a CR, an LF or use all 20 available characters. Trailing spaces will automatically be removed.

 

Q: How do I change application using the Serial Interface?

A: Use the 'A' command. You will be prompted for a 1 digit value (0..5). 0 selects the Clock application,  1 the Calibration Mode, 2 the Terminal application, 3 the Function Generator application, 4 the Demo mode and 5 reboots the clock.

 

Q: What does the IOCTL option do?

A: IOCTL is a short hand for IO Control, a term used to name a control word. Using the IOCTL it is possible to customize the clock more. The customizations provided are pretty rare and no separate menu entries are available for them. Each option is either ON or OFF, indicated by a bit in the 16-bit IOCTL word. To change the IOCTL word, use the 'I' command, followed by 4 hex digits; all 4 digits are required. For example to set bit 2, enter "XI0004"; to set bits 2 and 3, enter "XI000C". There are currently 7 options available:

IOCTL_EASYOMODE   

bit 0 (0x0001) Allow the 'O' option in NAME Field

IOCTL_SAVEOMODE   

bit 1 (0x0002) Save the value of 'O' option in NAME Field to EEPROM

IOCTL_NODIALDOTS   

bit 2 (0x0004) Do not show a moving dot in the Digital Clock Face

IOCTL_12HRDIG         

bit 3 (0x0008) Show time in Digital Clock Face as a 12 hour clock

IOCTL_NUMOFFTERM    

bit 4 (0x0010) Do not show Numeric Field in Terminal

IOCTL_USRNAMETERM   

bit 5 (0x0020) Show Name Field in Terminal, not Numeric Field

IOCTL_BURNINTERM   

bit 6 (0x0040) Allow Burn-in prevention in Terminal

IOCTL_SECSOMODE   

bit 8 (0x0100) Update the 'O' value every second.

Q: What is the 'O' option about?

A: If you feel the need to see some depressing information, enable the 'O' option with the IOCTL customization word in the Serial Interface, then select the 'O' option in the "NAME" field using the on screen Menu. It is actually possible to select the 'O' option in the "NAME" field on the menu without enabling it in the IOCTL word, but that is left as an exercise to the user. By default, this is a non-persistent option but that too can be changed using the IOCTL customization word. This option is somewhat hidden because not every user will be able to handle this information.

 

Q: Why can't I use the Serial Interface when the Sparkfun O-Clock is in Terminal Mode?

A: Because the Terminal Mode uses the Serial Interface.

 

Q: Why can't I use the Serial Interface when the GPS mode is active?

A: Because the Sparkfun O-Clock uses the Serial Interface to communicate with the GPS device.

 

Q: Why can't I use the Serial Interface when the Clock Menu is active?

A: Because the Clock Menu and the Serial Commands would want to change the clock settings simultaneously.

 

 Sparkfun O-Clock Warnings

 

Q: Why does the Sparkfun O-Clock display a flashing letter P?

A: This happens when the Sparkfun O-Clock is in back-up mode, i.e., it does not receive the proper PPS signal (Pulse per Second) from the RTC (or another external source). The Sparkfun O-Clock has a countdown timer that is activated after roughly 1 1/30 second (based on its own crystal oscillator), and it advances the time if no PPS signal was received.

This will most likely happen when a GPS device feeds the 1PPS signal and the device looses its satellite lock. The clock will keep going in that case, though running a little slow. If you have the NMEA output of the GPS device connected to the Serial Port (and the GPS option is selected with the proper local time zone offset), the Sparkfun O-Clock will automatically set the proper time and date once the GPS device gets another lock. A flashing letter "G" indicates the the time or date was changed based on the incoming NMEA records.

The RTC has its own backup battery and is always powered. To reset the RTC, please remove the battery temporarily (with the power disconnected, of course)  The time and date will be random if this happens, so please Reset the EEProm configuration data or set the correct time and date immediately.

 

Q: Why does the Sparkfun O-Clock display a flashing letter G?

A: This happens when the Sparkfun O-Clock determines that its time and/or date is different from the time/date obtained from the NMEA output of a GPS device connected to the Serial Port (and the GPS option is selected with the proper local time zone offset). The Sparkfun O-Clock will update its time (and the on board Real Time Clock) to the time/date obtained from the GPS device and will display a flashing letter "G" for 5 seconds.

 

Q: Why does the Sparkfun O-Clock display the letter G once?

A: This only applies when the NMEA output from a GPS device is connected to the Serial Port and the GPS option in the menu is enabled. When the Sparkfun O-Clock receives valid NMEA data from the GPS device (but no more frequent than once every 5 seconds), it will display the letter G for 1 second.

 

Multiple Applications

 

Q: How do I run one of the other preloaded applications ?

A: Select the menu (S1 short push), move to the "App" field (S2 short push), advance to the application of your choice (S1 short push) and activate it (S2 short push). You can choose from Terminal ("Term"), Calibration Screen ("Cal"), Function Generator ("Gen"), Clock ("Clock"), Demo ("Demo") or reboot the Sparkfun O-Clock ("Boot").

 

Q: How do I exit the other applications?

A: When running the terminal program, just select the menu again (S1 short push) and go to one of the other apps, as described above. From the Function Generator, you must power cycle the board. Trick: pushing S2 while sending data using the DDSControl.exe program will also reboot the Sparkfun O-Clock.

 

Q: Which application runs when the Clock board starts up?

A: The Clock and Terminal application are persistent, meaning the board will start them again after a reboot (incl. a power cycle.) The Function Generator application is not persistent since the only way to exit it is through a reboot (incl. a power cycle)

 

Q: How do I operate the Terminal Application?

A: Please read this page.

 

Q: How do I operate the Function Generation Application?

A: Please read this page.

 

Q: How do I reboot the Sparkfun O-Clock from the menu?

A: The "App" field has a choice "boot" which will reboot the Sparkfun O-Clock when selected. You can also do a long push on switch S2 to reboot at any time.

 

Q: Will the clock lose time when running one of the other applications?

A: No, the internal time tracking mechanism is active for all applications except the Function Generator. The on-board Real Time Clock (RTC) keeps accurate time while the Function Generator is running; The Sparkfun O-Clock will reload the current time from this RTC when starting the clock application again.

 

Sparkfun O-Clock Hardware Issues

 

Q: Why are there 3 pins on the connector marked Ground?

A: These three pins are all Ground pins. They are there to give you more freedom hooking up ground wires.

 

Q: The clock dial and or digits seem distorted. Is there a way to fix this?

A: This can happen if you are using 10x probes and the probes aren't properly compensated for your scope. Find the adjustment screws on each probe and adjust them until the image is clean. This should not happen with 1X probes or direct wires (incl. BNC cables)

 

Q: How does the Sparkfun O-Clock trigger on the 1 PPS signal?

A: By default the Sparkfun O-Clock uses a 1PPS signal generated by the on-board RTC. This is a negative going pulse so the Sparkfun O-Clock triggers on the negative going edge.  Most GPS units have a TIMEKEEP signal that is normally low and pulses high for 200 mSecs every second; by default, the Sparkfun O-Clock triggers on the negative edge at the end of this pulse. You can use the Serial Command 'M' to toggle the trigger mode of the Sparkfun O-Clock.

Please note the following. The Sparkfun O-Clock has an internal pull-up resistor enabled on this pin so that the pin is HIGH when not connected (e.g., when the shunt is removed from JP6). If your 1 PPS signal is normally low, it will have to PULL DOWN the signal to LOW, and a small current will run from the AVR to your signal source.

 

Q: What is the purpose of the push button switches S1 and S2 on the Sparkfun O-Clock?

A: It is the user input interface. As S1 short push will enter the Menu mode. An S1 long Push will enter the Change Mode.  An S2 short push will display the Help Screen. The S1 push button switch is also used to allow firmware upgrades using your PC (see firmware upgrade).

 

Q: What is the purpose of the ‘Z’ pin on the Sparkfun O-Clock?

A: The Z (Intensity) output on the Sparkfun O-Clock dims the beam at the appropriate moments. This output will decrease its voltage towards 5V to decrease the scope intensity. Please connect this signal to your oscilloscope intensity control input, if present. It is very effective in suppressing highlighted dots on the screen.

 

Q: What is the purpose of the ‘ZINV’ pin on the Sparkfun O-Clock?

A: The ZINV (Inverted Intensity) output on the Sparkfun O-Clock dims the beam at the appropriate moments. This output will increase its voltage towards 5V to decrease the scope intensity (Tektronix 400 scopes convention). Please connect this signal to your oscilloscope intensity control input, if present. It is very effective in suppressing highlighted dots on the screen.

 

Q: What are the voltage levels present on the CH1 and CH2 terminals?

A: The voltage levels on the CH1 (X) and CH2 (Y) terminals range from 0 to 5 Volts. This range can be reduced using the on-board trimpot R8 TO BE UPDATED.

 

Q: I’m seeing a pattern on my scope but no clock display. What is wrong?

A: Make sure your scope is in X-Y mode and that the proper Vertical Mode is selected. On many Tektronix scopes this is the CH2 Vertical Mode. Also double check the probe connections, as well as their Ground.

 

Q: I’m seeing an uneven line at the edge of the scope screen. What is wrong?

A: You have only one channel properly connected to the scope. Make sure both channels are properly connected to the Sparkfun O-Clock CH1 and CH2 terminals.

 

Q: My Tektronix 7000 series oscilloscope and its plug-ins have no X-Y mode. Can I still use it with the Sparkfun O-Clock?

A: Yes, but you will need two separate vertical plug-ins, one in the usual vertical slots on the left and one in one of the horizontal slots (on the right).

 

Q: Is the oscilloscope I use permanently dedicated to this clock?

A: No, the only connections are the 2 BNC cables or probes and possibly the Intensity Control. Just unhook the probes/cables (and Intensity Control cable), and you can use your scope for its intended purpose.

 

AVR specific Issues

 

Q: How do I update the firmware of my Sparkfun O-Clock?

A: Please read this page.

 

Q: How do I know which firmware version my Sparkfun O-Clock is running?
A: The current firmware version is shown on the help screen and options menu, top line. Show the Help screen using a short S2 push. Enter the menu using a short push (push and release) on the S1 button switch.

 

Q: Where can I find the firmware for the Sparkfun O-Clock 4.0ds?

A: The firmware for version 4.0ds is available on the main Sparkfun O-Clock page, under "Sparkfun O-Clock Links", link "Flash Image V4.0ds (Serial Download)". This firmware version is the clock application itself (excluding the boot loader) and can be downloaded to the clock using the serial cable, as described here.

 

Q: Can I use my official AVR programmer (like the STK-500) to reprogram the AVR?

The flash memory on this ATmega328p AVR is configured into two areas, the clock application (word address 0x0000-03DFF) and the boot-loader (word address 0x3E00-0x3FFF). Using the boot-loader to reprogram the AVR will ONLY update the first area, which is all you need to get an updated clock version.

Programming the flash memory using this "clock only" firmware with an official AVR programmer, will reprogram all the flash memory, in effect clearing the boot-loader area. Turn off the "Boot Reset Vector Enabled" fuse (BOOTRST) and the clock will work just fine. However, you won't be able to update the firmware using the serial link anymore (you still can use the AVR programmer.)  To maintain the ability to update the flash memory using the serial link, you will need a flash image of the combined "clock+boot loader", which is available on request.

You are advised to first save a copy of the entire Flash area and store this copy in a safe place before updating to another application without a boot-loader. This way you can restore the Sparkfun O-Clock incl. the boot-loader later.

 

Q: My AVR fuses are set incorrectly. How should they be set?

A: First of all, be very careful because you may make the AVR inoperable by setting the wrong fuse, especially the “Use External Clock” fuse. Finally, in the AVR world, UNPROGRAMMED fuses (i.e., disabled) have a ‘1’ value, whereas PROGRAMMED fuses (i.e., enabled) have a 0 value. It’s easy to get confused, depending on the program being used to modify the fuses. Here is a list of PROGRAMMED fuses for the Atmega328p AVR used in this scope clock:

 

bullet

Boot Flash size=512 words (BOOTSZ)

bullet

Boot Reset Vector Enabled (BOOTRST)

bullet

SPI (Serial Program downloading) enabled (SPIEN)

bullet

Preserve EEPROM memory through the Chip Erase cycle (EESAVE)

bullet

Brown-out detection level at VCC=2.7V (BODLEVEL)

bullet

Ext. Crystal Osc; Frequency >= 8.00 MHz. 16K CK/14 CK + 65 ms. (SUT_CKSEL)

 

Programming an AVR microcontroller and setting the fuses need to be done using an AVR programmer. Popular models are the STK-500 compatible types, a USB based programmer like the USBTinyISP or the AVR Dragon from Atmel (highly recommended for its in-circuit emulation support). Check out the Atmel or AVRfreaks websites for more information.

 

Fun

 

Q: This Sparkfun O-Clock is too serious. Can’t it do anything fun?

A: Do you wish time was passing faster, or do you want to go back in time? Try the Play Rev or Play FF menu options (or use the P command (00-03)). You’ll see the clock obeying your wishes! Try them together using Play FR! Note that for either of these fun modes, the Real Time Clock (RTC) will not be updated; once you exit the Play Mode, the Sparkfun O-Clock will read the actual time and date back from the RTC.

 

Q: How do I show the capabilities of this Sparkfun O-Clock to my spouse?

A: Run the clock in DEMO mode. You can select this form the on-screen menu: S1 short push to select the menu, advance to the App field by issuing S2 short pushes, select the Demo option using S1 short pushes, then activate it with a short S2 push.  The Sparkfun O-Clock will enter demo mode. No user settings will be changed by the demo, nor will the time in the Real Time Clock be changed. At the end of the demo, the clock will automatically restart in normal operation mode.

 

 

Back to Sparkfun O-Clock

horizontal rule

Up Next