Presentation is loading. Please wait.

Presentation is loading. Please wait.

切換時區.

Similar presentations


Presentation on theme: "切換時區."— Presentation transcript:

1 切換時區

2 主要功能 提供切換時區的功能,將RTC和alarm output的時間做時區處理
將經過時區處理的time data加上欲顯示的時區代碼後傳送給LCD

3 設計要點 先挑選出一定數量的時區代表城市作為對換資料,判斷現在時間的城市時區,與要變換的城市時區做比較,將其作時差的加減對應而換算到新城市的時間 留意進位、退位和前後天(如超過24小時)的時間換算顯示 1 000001 UTC-11 Niue 2 000010 UTC-10 Hawaii 3 000011 UTC-9:30 POM 4 000100 UTC-9 Alaska 5 000101 UTC-8 PST 6 000110 UTC-7 Texas 7 000111 UTC-6 Florida 8 001000 UTC-5 New York 9 001001 UTC-4:30 Venezuela 10 001010 UTC-4 Paraguay 11 001011 UTC-3:30 Labrador 12 001100 UTC-3 Argentina 13 001101 UTC-2 SSI 14 001110 UTC-1 Praia 15 001111 UTC London 16 010000 UTC+1 Paris 17 010001 UTC+2 Alexandria 18 010010 UTC+3 Moscow 19 010011 UTC+3:30 Iran 20 010100 UTC+4 Baku 21 010101 UTC+4:30 Herat 22 010110 UTC+5 Pakistan 23 010111 UTC+5:30 India 24 011000 UTC+5:45 Nepal 25 011001 UTC+6 Bengal 26 011010 UTC+6:30 Myanmar 27 011011 UTC+7 Thailand 28 011100 UTC+8 Taiwan 29 011101 UTC+8:45 Caiguna 30 011110 UTC+9 Japan 31 011111 UTC+9:30 Broken Hill 32 100000 UTC+10 Guam 33 100001 UTC+10:30 LordHoweIsl. 34 100010 UTC+11 Solomon 35 100011 UTC+11:30 NorfolkIsl. 36 100100 UTC+12 New Zealand 37 100101 UTC+12:45 ChathamIsl. 38 100110 UTC+13 Tonga

4 簡單流程示意 Input reset time data Reset time New time data no reset change
New city time data Original city time data no change reset Reset time no reset Change city change

5 testbench Input time data:UTC+4 Baku 7:49:38
Case 1:change to UTC-4:30 Venezuela Output time data1: 23:19:38 ----時區大換時區小(+ 24小時制變換) Case 2:change to UTC+12:45 Chathamlsl Output time data2: 16:34:38 ----時區小換時區大(+ 時、分的進退位)

6 Reset:city0  20 010100 UTC+4 Baku Output: City TH H TM M TS S
[010100][000000] [00] [0111] [100] [1001] [011] [1000] Reset 32’b0

7 Case 1:UTC+4 Baku  UTC-4:30 Venezuela 7:49:38  23:19:38
Output: city TH H TM M TS S [001001] [000000] [10] [0011] [001] [1001] [011] [1000] New minute New hour

8 Case 2:UTC+4 Baku  UTC-4:30 Chathamlsl 7:49:38  16:34:38
Output: city TH H TM M TS S [100101] [000000] [01] [0110] [011] [0100] [011] [1000] New minute New hour


Download ppt "切換時區."

Similar presentations


Ads by Google