一乐电子

 找回密码
 请使用微信账号登录和注册会员

QQ登录

只需一步,快速开始

微信扫码登录

手机号码,快捷登录

手机号码,快捷登录

搜索
查看: 5210|回复: 16

大家看看这东西怎么玩

  [复制链接]
发表于 2011-4-22 08:47 | 显示全部楼层 |阅读模式
DCF77模拟器http://www.sundgren.se/3_recreation/electronics/dcf77_simulator.htm


/* FILE / DATE:     dcf_sim_.c / 2010-05-03
   DESCRIPTION:     DCF Simulator
   MICRO-PROCESSOR: PIC16F886
   COMPILER:        B Knudsen Cc5x C-compiler - not ANSI-C
   EXTERNAL HW:     LCD Display
                    4 pushbuttons with LED
                    Rotating encoder
                    2 LEDs
   DESIGNER:        Hans Sundgren dcf77_sim_1_2000px.jpg dcf77_sim_2_2000px.jpg dcf77_sim_4_2000px.jpg dcf77_sim_10_2000px.jpg dcf77_sim_14_2000px.jpg dcf77_sim_30_2000px.jpg dcf77_sim_19_2000px.jpg
   CREDIT:          William Sandqvist for rotary encoder reading
   RAM usage:       172 bytes (12 local), 196 bytes free
   CODE WORDS:      4450 code words (54 %)
   
CHIP CONNECTIONS ********************************************
                      _________  ________           
                     |         \/        |         
                     |       16F886      |   
                    -|RE3   1     28  RB7|-   
     Output.PULSE--<-|RA0   2     27  RB6|-  
     LCD.backlight-<-|RA1   3     26  RB5|-<-Btn.START      
      LED.SET------<-|RA2   4     25  RB4|-<-Btn.TRANSMIT
      LED.VIEW-----<-|RA3   5     24  RB3|-<-Btn.VIEW
      LED.TRANSMIT-<-|RA4   6     23  RB2|-<-Btn.SET
      LED.START----<-|RA5   7     22  RB1|-<-Encoder.A
               GND---|Vss   8     21  RB0|-<-Encoder.B
           LED.one-<-|RA7   9     20  Vdd|---+5V   
          LED.null-<-|RA6  10     19  Vss|---GND
   XTAL 32,768 kHz---|OSO  11     18  RC7|->-LCD.D7
   XTAL 32,768 kHz---|OSI  12     17  RC6|->-LCD.D6
            LCD.RS-<-|RC2  13     16  RC5|->-LCD.D5
            LCD.EN-<-|RC3  14     15  RC4|->-LCD.D4
                     |___________________|         

DISPLAY VIEWS, 1 -> 2 -> 3 -> 4 -> 1 -> ...
_____________________________________________
| View | Shows                | LCD backlight |
|------|----------------------|---------------|
| 1    | Time and bit display | No            |
| 2    | Time and bit display | Yes           |
| 3    | Bit overview         | Yes           |
| 4    | Bit description      | Yes           |
|______|______________________|_______________|

PUSH-BUTTONS
____________________________________________________________
| Button     | Color  | Pin | Lamp, pin: lit                 |
|------------|--------|-----|--------------------------------|
| Start/Stop | Green  | RB5 | RA5 | On during clock running  |
| Transmit   | Red    | RB4 | RA4 | Blink on output signal   |
| View       | Blue   | RB3 | RA3 | Blink when pressed       |
| Set        | Yellow | RB2 | RA2 | On during set clock      |
|____________|________|_____|________________________________|

LED INDICATORS
____________________________________________________________
| LED        | Color  | Pin | Lit during...                  |
|------------|--------|-----|--------------------------------|
| 0          | Yellow | RA7 | Output = 0                     |
|            |        |     | Decrement during clock setting |
|            |        |     |                                |
| 1          | Green  | RA6 | Output = 1                     |
|            |        |     | Increment during clock setting |
|____________|________|_____|________________________________|

ROTATING DIALS
____________________________________________________________
| Type           |  Function                       | Pin     |
|----------------|-------------------------------------------|
| Rotary encoder | Increase/decrease clock setting | RB0/RB1 |              
|________________|_________________________________|_________|

                                    
PROGRAM OVERVIEW  *******************************************
    Interrupt: 1 Hz ----------------------------------------
   |  If start_mode = 1                                     |
   |     Update clock (step up one second)                  |
   |     Output pulse-value                                 |
   |  Update display                                        |
   |  Check buttons                                         |
   |     If VIEW-button                                     |
   |        Step up display mode 0->1->2->3->0              |
   |     If SET-button                                      |
   |        Setting > 0                                     |
   |         Stop interrupt, jump out to setting sequence   |
    --------------------------------------------------------
    Interrupt: Rotary encoder, during "set clock" ----------
   |  Read encoder                                          |
   |     If increase                                        |
   |        up = 1 and blink LED0                           |
   |     If decrease                                        |
   |        down = 1 and blink LED1                         |
    --------------------------------------------------------
    Main ---------------------------------------------------
   |  Initialization                                        |
   |  Read stored time from EEPROM                          |
   |  Interrupt is active 1 Hz, but the clock is stopped    |
   |  Loop                                                  |
   |     Check START-button                                 |
   |        If START-button                                 |
   |           Toggle start_mode                            |
    --------------------------------------------------------
    Set clock sequence  ------------------------------------
   |  Disable 1 Hz interrupt                                |
   |  Enable rotary encoder interrupt                       |
   |  Step through set sequence, read rotary encoder        |
   |     Update and display time values                     |
   |  Store set time in EEPROM                              |
   |  Enable 1 Hz interrupt                                 |
    --------------------------------------------------------
   */
dcf77_sim_2_2000px.jpg
dcf77_sim_4_2000px.jpg
dcf77_sim_10_2000px.jpg
dcf77_sim_14_2000px.jpg
dcf77_sim_17_2000px.jpg
dcf77_sim_18_2000px.jpg
dcf77_sim_35_2000px.jpg
发表于 2011-4-22 09:13 | 显示全部楼层
我靠!!!
外壳自己弄的?这可真是牛人啦!!
回复

使用道具 举报

发表于 2011-4-22 09:17 | 显示全部楼层
我靠!!!
外壳自己弄的?这可真是牛人啦!!
markliang 发表于 2011-4-22 09:13 https://www.yleee.com.cn/images/common/back.gif



    同感!!!
回复

使用道具 举报

发表于 2011-4-22 09:39 | 显示全部楼层
这个好像是老外做的吧?
回复

使用道具 举报

发表于 2011-4-22 09:40 | 显示全部楼层
画面板的软件不错,请问是什么软件
回复

使用道具 举报

 楼主| 发表于 2011-4-22 10:52 | 显示全部楼层
不知他是使用何种软件做的,不过我们应该可以画出那样的效果的
回复

使用道具 举报

发表于 2011-4-22 11:04 | 显示全部楼层
佩服啊,绝对牛人啊
回复

使用道具 举报

发表于 2011-4-22 11:22 | 显示全部楼层
这东西做什么用的?
回复

使用道具 举报

发表于 2011-4-22 12:12 | 显示全部楼层
外壳的确很牛,可是看洞洞板的飞线可就不咋地了
回复

使用道具 举报

发表于 2011-4-22 12:34 | 显示全部楼层
我看中那个外壳
回复

使用道具 举报

本版积分规则

QQ|一淘宝店|手机版|商店|一乐电子 ( 粤ICP备09076165号 ) 公安备案粤公网安备 44522102000183号

GMT+8, 2025-11-24 18:58 , Processed in 0.035605 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表