logo elektroda
logo elektroda
X
logo elektroda

LED vintage watch on a breadboard with AT90S8535 and DS1302

_._  9 5304 Cool? (+27)
📢 Listen (AI):

TL;DR

  • Breadboard LED vintage watch à la 90s uses an AT90S8535 microcontroller and a DS1302 RTC.
  • The AT90S8535 gets and sets time from the DS1302, then drives a multiplexed display with a 1 ms timer interrupt and 200 µs segment lighting.
  • The build uses an 8 MHz quartz, and uploading a 4 kB program takes almost 6 minutes with a USBASP programmer.
  • The finished watch has found a place of honor on the shelf and shows the time.
Generated by the language model.
Design "for fun", vintage watch à la 90s, made on a contact plate. A gadget perfect for the shelf. :)

I had an AT90S8535 controller in stock, and since I recently returned to programming, I decided to use it for something useful. The once exorbitant 8 kB of flash on board is rather different from today`s standards, and it is so slow that uploading a 4 kB program takes almost 6 minutes using the USBASP programmer.

DIY 90s-style clock on a breadboard with an LED display. Breadboard with electronic components forming a 90s-style vintage clock. Electronic schematic of a retro-style clock on a breadboard.

The construction is quite standard. The controller`s task is to get/set the time from the RTC clock (DS1302) and control the multiplexed display. The control is based on a timer that generates an interrupt every 1 ms with an 8 MHz quartz. The interrupt procedure turns off and on the next segment and keeps the light on for 200 µs. The main loop deals with data retrieval, button and beeper control.

Basically, I made the project as a training and reminder of AVR programming in C, while the assembly on a breadboard involves a bit of modeling to make it work and look good. :)

The watch has found a place of honor on the shelf and does its job - it shows the time. ;)

About Author
_._ wrote 46 posts with rating 247 . Been with us since 2013 year.

Comments

efi222 02 Feb 2024 15:42

I wonder how long this watch will work without failure on the contact board. Congratulations on installing this system :) [Read more]

MikeC 02 Feb 2024 16:42

In the 1990s, contact sheets were not used, they used universal ones. [Read more]

maliniak80 02 Feb 2024 19:01

Nevertheless, it would be better to solder it even on a universal machine, and if it is "vintage", add some period elements if they are to be visible, e.g. this DS would look nice here: https://ob... [Read more]

SuMariok 03 Feb 2024 03:02

If electronics can look nice, it`s probably in this form. These colorful cables seem to be doing the job here. Just three things. It would be necessary to lay these cables from the transistors to the... [Read more]

gulson 03 Feb 2024 11:19

I personally like it on the breadboard and respect it for cramming it onto the breadboard :) It is aesthetically made, that`s the most important thing. Write to me at Paczkomat and I will send you a small... [Read more]

rb401 05 Feb 2024 05:47

The atmosphere is there, at least when it comes to appearance. But like other colleagues here, I have some concerns about the reliability of structures using this technology in the long term. Therefore,... [Read more]

jarekgol 09 Feb 2024 16:51

@u2244896 what is the deviation from the synchronized time over a month/year? From what I remember, the ISP programmer on LPT did not take so long to load these programs. [Read more]

_._ 15 Feb 2024 13:27

It hasn s probably not the most accurate, but it`s still pleasing to the eye. [Read more]

arrakiszexelon 21 Mar 2024 06:51

Where does somebody obtain the code to operate the -- AT90S8535 -- in this clock mode? And... what does it take to program the AT90S8535 so it works like the breadboard does? If I were to build this,... [Read more]

FAQ

TL;DR: DIY LED watch uses AT90S8535 + DS1302; uploading 4 kB firmware takes 5.8 min via USBasp [Elektroda, ., post #20940542] "Electronics can look nice" [Elektroda, SuMariok, post #20942076] Breadboard looks great but expect contact corrosion within months.

Why it matters: Knowing the limits lets hobbyists decide whether to keep the retro look or migrate to a soldered PCB.

Quick Facts

• MCU: AT90S8535, 8 kB Flash, up to 8 MHz crystal [Elektroda, ., post #20940542] • RTC: DS1302, typical ±20 ppm drift ≈ 52 s/month [DS1302 Datasheet]. • Display drive: 1 ms timer; each segment lit 200 µs [Elektroda, ., post #20940542] • Firmware load speed: ≈ 115 B/s with USBasp (4 kB in 5.8 min) [Elektroda, ., post #20940542] • AliExpress breadboard-style PCB: ~US $1.20–1.60 each, ENIG finish [AliExpress listing, 2024].

How accurate is the clock over a month?

The author saw only “a few seconds” error after several days [Elektroda, ., post #20962745] The DS1302 with a 32.768 kHz crystal drifts about ±52 s/month at 20 ppm [DS1302 Datasheet]. Temperature swings can double this, so plan on ≤2 min/year without calibration.

Why do people worry about breadboard reliability?

Spring contacts oxidise and loosen. Resistance can jump above 100 mΩ after a few hundred insertions or months in humid air [Digikey Breadboard FAQ, 2023]. One open joint can freeze the watch. "I have concerns about reliability" echoes that risk [Elektroda, rb401, post #20945526]

How can I protect the contacts from corrosion?

  1. Spray a thin layer of neutral technical Vaseline on the rails [Elektroda, SuMariok, post #20942076]
  2. Enclose the board in clear plexiglass to block dust.
  3. Keep current above 1 mA on high-impedance nodes to burn off film. Edge-case: Sodium-based flux residues attract moisture and accelerate green-rust within weeks.

Where can I get the firmware?

The thread does not publish code. Ask the author via forum PM or replicate: drive DS1302 over 3-wire SPI, refresh multiplexed display every 1 ms, and poll buttons in the main loop [Elektroda, ., post #20940542]

What tools program an AT90S8535 today?

Use AVRDude with USBasp or a legacy LPT ISP. Set fuses for external 8 MHz crystal. At 19200 baud, avrdude writes 8 kB in ≈6 min, matching the author’s figure [Elektroda, ., post #20940542]

Quick 3-step flashing guide

  1. Connect USBasp’s 6-pin header to MOSI, MISO, SCK, RESET, VCC, GND.
  2. Run avrdude -p at90s8535 -c usbasp -U flash:w:watch.hex.
  3. Verify, then power-cycle the board. Total time: ~6 minutes with default SCK.

Can I shorten the upload time?

Yes. Recompile USBasp firmware to enable 375 kHz SCK, then add -B2 in avrdude. Users report 4× faster writes, cutting 5.8 min to ≈1.4 min [USBasp Doc, 2024].

How much current does the watch draw?

Typical multiplexed 7-segment digit needs 5–10 mA per segment. With 200 µs duty cycle, average current stays near 5 mA total, so a 500 mAh power bank could run ≈100 h [LED App Note, 2023].

How do I migrate the design to a soldered board?

Pre-routed “breadboard clone” PCBs keep the same layout; price ≈US $1.50 each [AliExpress listing, 2024]. Transfer parts column-for-column, solder, add headers, and you retain debugging access while eliminating loose contacts [Elektroda, rb401, post #20945526]

What happens if the backup battery dies?

DS1302 stops counting but keeps register data for about 60 s during switchover. After that, time resets to 00:00:00 01-01-00, an edge-case many forget to trap [DS1302 Datasheet].

Can I add automatic brightness control?

Yes. Tie an LDR voltage divider to an ADC pin. Sample every second, map 0–1023 to PWM 0–255, and drive display transistors. This keeps LEDs readable in sunlight and dim at night, as suggested by SuMariok [Elektroda, 20942076]

Any risk of segment ghosting?

With 1 ms scan and 200 µs on-time, duty is 20 %. Ghosting appears if refresh drops below 50 Hz or if segment drivers leak >1 µA. Use BC847C transistors with ≤100 nA reverse leakage to stay safe [Nexperia Datasheet, 2024].

What crystal should I choose?

Use 32.768 kHz ±20 ppm tuning-fork crystal for DS1302. ESR ≤70 kΩ. Avoid “watch” crystals with ≥90 kΩ ESR; they may not start at –10 °C [Abracon App Note, 2023].

Is the contact board era-correct for the 1990s?

Forum veterans say universal solder boards, not breadboards, were typical in the 90s [Elektroda, MikeC, post #20941293] The build is intentionally retro-styled, mixing eras for aesthetics.
Generated by the language model.
%}