429 views|2 replies

1455

Posts

1

Resources
The OP
 

[Yichuang ET6001 Review] RTC Electronic Clock [Copy link]

 

The YiChuang ET6001 development board has an RTC timing function. When using serial port 0 to connect an external USB to TTL module, the RTC timing effect can be viewed, as shown in Figure 2.

Figure 1 Serial port 0 interface

Figure 2 Test results

If RTC is combined with the serial digital tube display module, the timing effect of the electronic clock can be achieved. The main program is:

int main(void)
{
    rtcDatetime calendar;
    uint8_t tick = 0;
    RTC_Calendar_init();
    EVB_SMG_Init();
	Init_MAX7219();
    Write_Max7219(1,1);
    Write_Max7219(2,0);
	Write_Max7219(3,10);
    Write_Max7219(4,0);
    Write_Max7219(5,0);
    Write_Max7219(6,10);
    Write_Max7219(7,0);
    Write_Max7219(8,0);
    while (1)
    {
        RTC_GetDatetime(&calendar);
        if(tick != calendar.second)
        {
            tick = calendar.second;
		    Write_Max7219(1,calendar.second%10);
            Write_Max7219(2,calendar.second/10);
			Write_Max7219(4,calendar.minute%10);
            Write_Max7219(5,calendar.minute/10);
			Write_Max7219(7,calendar.hour%10);
            Write_Max7219(8,calendar.hour/10);
        }
    }
}

After compiling and running the program, the effect is shown in Figure 3.

Figure 3 Electronic clock effect

Demo video:

VID_20241024_130839

This post is from Domestic Chip Exchange

Latest reply

Excellent, thumbs up   Details Published on 2024-11-5 17:40
 
 

2

Posts

0

Resources
2
 

Excellent, thumbs up

This post is from Domestic Chip Exchange

Comments

Thanks for your support!!!  Details Published on 2024-11-8 20:59
 
 
 

1455

Posts

1

Resources
3
 
kouko posted on 2024-11-5 17:40 Excellent, thumbs up

Thanks for your support!!!

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list