logo elektroda
logo elektroda
X
logo elektroda

LED vintage watch on a breadboard with AT90S8535 and DS1302

_._ 5298 9

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.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • 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. ;)

    Cool? Ranking DIY
    About Author
    _._
    Level 11  
    Offline 
    _._ wrote 46 posts with rating 247. Been with us since 2013 year.
  • ADVERTISEMENT
  • #2 20941206
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    I wonder how long this watch will work without failure on the contact board. Congratulations on installing this system :)
  • #3 20941293
    MikeC
    Level 32  
    Posts: 1391
    Help: 201
    Rate: 969
    _._ wrote:
    Design "for fun", vintage watch à la 90s

    In the 1990s, contact sheets were not used, they used universal ones.
  • ADVERTISEMENT
  • #4 20941488
    maliniak80
    Level 17  
    Posts: 283
    Help: 2
    Rate: 376
    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:

    Black Dallas DS12887 integrated circuit with visible pins.
  • #5 20942076
    SuMariok
    Level 9  
    Posts: 39
    Rate: 18
    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 display cathodes on the substrate/board and add a photosensitive element to control the brightness of the LEDs under the lighting,
    and cover it in some plexiglass to protect it. To prevent corrosion of the contacts, you can spray some technical Vaseline. and enclose it in plexiglass :)

    maliniak80 wrote:
    This DS would look nice here:

    If these clocks were, for example, pistachio and not black, it would be perfect, but it would spoil the picture.
  • #6 20942396
    gulson
    System Administrator
    Posts: 29234
    Help: 148
    Rate: 5984
    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 gift.
  • ADVERTISEMENT
  • #7 20945526
    rb401
    Level 39  
    Posts: 3000
    Help: 750
    Rate: 980
    _._ wrote:
    however, mounting on a breadboard involves a bit of modeling to make it work and look good :)


    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, for information, I would like to mention that there are interesting boards that allow you to "consolidate" such a project with little effort, rearranging the elements and connections exactly as they are and soldering them:

    Set of Perma-Proto prototype boards on AliExpress page.

    https://www.aliexpress.com/item/4000372753001.html

    I just bought them from this Chinese company and I can say that these boards are made very carefully (e.g. gold-plated soldering points), you can choose from a variety of colors, and using them is pleasant. And it saves time, compared to, for example, transferring a concept proven on a contact sheet to a normal universal PCB. And the price is acceptable.
    As a side note to this digression, this is a minor problem, because while the "half" contact sheets match exactly those PCBs (30 columns here and there), there is a discrepancy in the case of long contact sheets. Contact sheets (at least the ones I have) have 64 columns and PCB ones only have 60.
  • #8 20953278
    jarekgol
    Level 40  
    Posts: 5113
    Help: 641
    Rate: 1132
    @_._ 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.
  • ADVERTISEMENT
  • #9 20962745
    _._
    Level 11  
    Posts: 46
    Rate: 247
    It hasn`t worked for that long, but it has already made a difference of a few seconds, so it`s probably not the most accurate, but it`s still pleasing to the eye.
  • #10 21012904
    arrakiszexelon
    Level 1  
    Posts: 1
    >>20940542

    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, I would just design a PCB.
📢 Listen (AI):

Topic summary

✨ A user designed a vintage-style watch using an AT90S8535 microcontroller and a DS1302 real-time clock (RTC) on a breadboard, aiming for a nostalgic aesthetic reminiscent of the 1990s. The project involves controlling a multiplexed display with a timer interrupt for segment activation. Responses from the community express concerns about the reliability of breadboard constructions over time, suggesting soldering components onto a universal PCB for durability. Some users recommend enhancing the design with protective elements like plexiglass and photosensitive components for LED brightness control. Additionally, inquiries were made about programming the AT90S8535 and sourcing the necessary code for the clock functionality.
Generated by the language model.

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.
ADVERTISEMENT