AT89C2051驅動步進電機的電路和源碼:AT89C2051驅動步進電機的電路和源碼 程序:stepper.c stepper.hex/* * STEPPER.C * sweeping stepper's rotor cw and cww 400 steps * Copyright (c) 1999 by W.Sirichote */#i nclude c:\mc5151io.h /* include i/o header file */ #i nclude c:\mc5151reg.hregister unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n;unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400/* flag1 mask byte 0x01 run cw() 0x02 run ccw() */main(){ flag1=0; serinit(9600); disable(); /* no need timer interrupt */ cw_n = n; /* initial step number for cw */ flag1 |=0x01; /* initial enable cw() */while(1){ { tick_wait(); /* wait for 10ms elapsed */energize(); /* round-robin execution the following tasks every 10ms */ cw(); ccw(); } }}cw(){ if((flag1&0x01)!=0) { cw_n--; /* decrement cw step number */ if (cw_n !=0) j++; /* if not zero increment index j */ else {flag1&=~0x01; /* disable cw() execution */ ccw_n = n; /* reload step number to ccw counter */ flag1 |=0x02; /* enable cww() execution */ } }
上傳時間: 2013-11-21
上傳用戶:boyaboy
本文檔將深入介紹內部時鐘源模塊(Internal ClockSource, ICS),該模塊可以在部分HCS08 系列微控制器中找到。對HCS08 MCU 來說, ICS 模塊不但是一個非常靈活的時鐘源,而且對于該系列中更小、更低成本的MCU來說非常經濟。ICS 包括鎖頻環、內部時鐘參考、外部振蕩器和時鐘選擇子模塊。這些子模塊組合可以提供多種時鐘模式和頻率,以滿足任何應用的需要。本應用筆記詳細描述ICS 的7 種工作模式、ICS 模塊與其他HCS08 MCU 的內部時鐘發生器(Internal ClockGenerator, ICG)模塊作比較、ICS 模塊從不同低功耗模式下恢復的特性及內部時鐘參考的校準方法。
上傳時間: 2013-11-08
上傳用戶:zhuoying119
本論文以MS320DM642數字信號處理器為核心,搭建了聲源定位及攝像頭自動控制的平臺。論文中論述了:McASP的原理和應用方法;聲波的A/D變換及采樣模塊設計以及該模塊與DSP的接口設計;通過擴展存儲器接口EMIF對DSP進行外部存儲器擴展的設計以及地址空間配置;利用CPLD作為地址、數據總線管理模塊的設計;UART串行傳輸模塊設計;對FLASH的分頁控制和程序代碼燒寫;以及通過RS485串行傳輸協議對攝像頭進行控制的原理和程序設計。
上傳時間: 2013-11-22
上傳用戶:rtsm07
04_使用Timequest約束和分析源同步電路
上傳時間: 2013-10-30
上傳用戶:ZJX5201314
This white paper discusses how market trends, the need for increased productivity, and new legislation have accelerated the use of safety systems in industrial machinery. This TÜV-qualified FPGA design methodology is changing the paradigms of safety designs and will greatly reduce development effort, system complexity, and time to market. This allows FPGA users to design their own customized safety controllers and provides a significant competitive advantage over traditional microcontroller or ASIC-based designs. Introduction The basic motivation of deploying functional safety systems is to ensure safe operation as well as safe behavior in cases of failure. Examples of functional safety systems include train brakes, proximity sensors for hazardous areas around machines such as fast-moving robots, and distributed control systems in process automation equipment such as those used in petrochemical plants. The International Electrotechnical Commission’s standard, IEC 61508: “Functional safety of electrical/electronic/programmable electronic safety-related systems,” is understood as the standard for designing safety systems for electrical, electronic, and programmable electronic (E/E/PE) equipment. This standard was developed in the mid-1980s and has been revised several times to cover the technical advances in various industries. In addition, derivative standards have been developed for specific markets and applications that prescribe the particular requirements on functional safety systems in these industry applications. Example applications include process automation (IEC 61511), machine automation (IEC 62061), transportation (railway EN 50128), medical (IEC 62304), automotive (ISO 26262), power generation, distribution, and transportation. 圖Figure 1. Local Safety System
上傳時間: 2013-11-05
上傳用戶:維子哥哥
FPGA_DIY撥碼開關實驗源碼
上傳時間: 2013-10-09
上傳用戶:liu123
該信號源可輸出正弦波、方波和三角波,輸出信號的頻率以數控方式調節,幅度連續可調。與傳統信號源相比,該信號源具有波形質量好、精度高、設計方案簡潔、易于實現、便于擴展與維護的特點。
上傳時間: 2013-10-11
上傳用戶:ippler8
設計了一種由直接數字頻率合成(DDS)、倍頻鏈構成的三次變頻直接頻率合成方案,實現了低相噪捷變頻高分辨率毫米波雷達頻率合成器設計。利用直接頻率合成器的倍頻輸出取代傳統三次變頻毫米波頻率源的鎖相環(PLL),同時提供線性調頻(LFM)信號,優化DDS和變頻方案的頻率配置關系。利用FPGA電路進行高速控制,較好地解決了毫米波頻率合成器各技術指標之間的矛盾。實測結果表明,采用該方案的毫米波頻率合成器在本振跳頻帶寬為160 MHz時,線性調頻頻率分辨率可達0.931 Hz,最大頻率轉換時間小于2 ?滋s,最大雜散低于-60 dBc,相位噪聲優于-90 dBc/Hz。
上傳時間: 2014-01-06
上傳用戶:brain kung
反輻射導彈是現代戰爭條件下通信設備等電磁輻射源所面對的最具威脅性的武器之一,而有源誘偏是對抗反輻射導彈攻擊的一種相對簡單而有效的方法。基于有源相參和有源非相參條件下的幾種模型,從反輻射導彈的攻擊過程入手,得到Matlab仿真結果。最后根據仿真彈著點位置分布和位置分布的概率統計曲線,為通信輻射源的布設提供理論依據。
上傳時間: 2013-11-16
上傳用戶:solmonfu
VC 基于UDP協議的網絡文件傳輸源碼
上傳時間: 2013-10-19
上傳用戶:gtzj