Lesson 23--Microduino Digital Tube Clock

来自Microduino Wikipedia
跳转至: 导航搜索
Language English

Objective

This tutorial will teach you use the Microduino RTC module to dispaly 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, the following is the video that how to test:

http://v.youku.com/v_show/id_XNjg0NTk4Njky.html

  • Step 2:

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

RTCTime
  • Step 3:

Stack the Microduino FT232, Microduino Core and Microduino RTC together.

RTCTime
  • Step 4:Download program

Before download program, can't overlay digital tube. Becuase 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 dispaly time.

RTCTime
RTCTime

Video

http://v.youku.com/v_show/id_XNjg4MzcyNDIw.html