Lesson 23--Microduino Digital Tube Clock

From Microduino Wiki
Jump to: navigation, search
Language: English  • 中文

Objective

This tutorial will teach you use the Microduino RTC module to display time on 4 digit tubes.

Equipment

RTCTime

Program

Digit tube program download:

Debug

  • Step 1:

Measure the four digital tube clock pin. Digital tube has different specification.


  • Step 2:

Insert the digital tube to Microduino core. Installation method is top row connect to D0 - D6, button row connect to D7 - D13.

RTCTime
  • Step 3:

Stack the Microduino-USBTTL, Microduino Core and Microduino RTC together.

RTCTime
  • Step 4: Download program

Before download program, can't overlay digital tube. Because if the digital tube connect to the serial port pin, keep the serial port pin voltage as low level, will be about 0.7 V, which will cause the program download fail. Because digital tube pin may be different, so you may need to change the program.

    • Program uses common anode clock digital tube, if want to light the common cathode digital tube, need to change the LOW to HIGH and HIGH to LOW in function duanma(). And in the daytime() function, add a "~" before the data, such as leddisplay(data[timehours]), it need to be changed to leddisplay(~ data[timehours]);
    • Control of four digital tube pin is Duan1, Duan2, Duan3, Duan4, control of two pins is Colon1, Colon2, need according to the measured result to define the pin. Control pin for digita tube's a ~ f are defined in function leddisplay().
    • Set time in function vosettime(). After download, delete the function vosettime() in setup() function. After this change, power off, it can't timing again from the initial setting time, and also can run when power supply off.

Result

After download program, the digit tube will display time.

RTCTime
RTCTime

Video