單片機C語言(for)延時計算
上傳時間: 2013-10-28
上傳用戶:maizezhen
利用LPC微控制器進行低成本的模/數轉換 AN10187 datasheet 要想利用數字計算機來處理連續變化的數據,就必須將模擬值轉換成數字量。模/數轉換器(ADC)根據不同的原理工作,其性能、效果和成本都會發生變化。某些微控制器具有能夠提供10位及更高分辨率的集成ADC,但所需的芯片面積和為了保證要求精度而進行的全面試驗增加了此類裝置的成本。
上傳時間: 2013-12-26
上傳用戶:清山綠水
Keil C51使用詳解Keil C51 是美國Keil Software 公司出品的51 系列兼容單片機C 語言軟件開發系統,與匯編相比,C 語言在功能上、結構性、可讀性、可維護性上有明顯的優勢,因而易學易用。用過匯編語言后再使用C 來開發,體會更加深刻。Keil C51 軟件提供豐富的庫函數和功能強大的集成開發調試工具,全Windows界面。另外重要的一點,只要看一下編譯后生成的匯編代碼,就能體會到Keil C51生成的目標代碼效率非常之高,多數語句生成的匯編代碼很緊湊,容易理解。在開發大型軟件時更能體現高級語言的優勢。下面詳細介紹 Keil C51 開發系統各部分功能和使用。第二節 Keil C51 單片機軟件開發系統的整體結構C51 工具包的整體結構,如圖(1)所示,其中uVision 與Ishell 分別是C51 forWindows 和for Dos 的集成開發環境(IDE),可以完成編輯、編譯、連接、調試、仿真等整個開發流程。開發人員可用IDE 本身或其它編輯器編輯C 或匯編源文件。然后分別由C51 及A51 編譯器編譯生成目標文件(.OBJ)。目標文件可由LIB51 創建生成庫文件,也可以與庫文件一起經L51 連接定位生成絕對目標文件(.ABS)。ABS 文件由OH51 轉換成標準的Hex 文件,以供調試器dScope51 或tScope51 使用進行源代碼級調試,也可由仿真器使用直接對目標板進行調試,也可以直接寫入程序存貯器如EPROM 中。圖(1) C51 工具包整體結構圖第三節 Keil C51 工具包的安裝81. C51 for Dos在 Windows 下直接運行軟件包中DOS\C51DOS.exe 然后選擇安裝目錄即可。完畢后欲使系統正常工作須進行以下操作(設C:\C51 為安裝目錄):修改 Autoexec.bat,加入path=C:\C51\BinSet C51LIB=C:\C51\LIBSet C51INC=C:\C51\INC然后運行Autoexec.bat2. C51 for Windows 的安裝及注意事項:在 Windows 下運行軟件包中WIN\Setup.exe,最好選擇安裝目錄與C51 for Dos相同,這樣設置最簡單(設安裝于C:\C51 目錄下)。然后將軟件包中crack 目錄中的文件拷入C:\C51\Bin 目錄下。第四節 Keil C51 工具包各部分功能及使用簡介1. C51 與A51(1) C51C51 是C 語言編譯器,其使用方法為:C51 sourcefile[編譯控制指令]或者 C51 @ commandfile其中 sourcefile 為C 源文件(.C)。大量的編譯控制指令完成C51 編譯器的全部功能。包控C51 輸出文件C.LST,.OBJ,.I 和.SRC 文件的控制。源文件(.C)的控制等,詳見第五部分的具體介紹。而 Commandfile 為一個連接控制文件其內容包括:.C 源文件及各編譯控制指令,它沒有固定的名字,開發人員可根據自己的習慣指定,它適于用控制指令較多的場合。(2) A51A51 是匯編語言編譯器,使用方法為:9A51 sourcefile[編譯控制指令]或 A51 @ commandfile其中sourcefile 為匯編源文件(.asm或.a51),而編譯控制指令的使用與其它匯編如ASM語言類似,可參考其他匯編語言材料。Commandfile 同C51 中的Commandfile 類似,它使A51 使用和修改方便。2. L51 和BL51(1) L51L51 是Keil C51 軟件包提供的連接/定位器,其功能是將編譯生成的OBJ 文件與庫文件連接定位生成絕對目標文件(.ABS),其使用方法為:L51 目標文件列表[庫文件列表] [to outputfile] [連接控制指令]或 L51 @Commandfile源程序的多個模塊分別經 C51 與A51 編譯后生成多個OBJ 文件,連接時,這些文件全列于目標文件列表中,作為輸入文件,如果還需與庫文件(.LiB)相連接,則庫文件也必須列在其后。outputfile 為輸文件名,缺少時為第一模塊名,后綴為.ABS。連接控制指令提供了連接定位時的所有控制功能。Commandfile 為連接控制文件,其具體內容是包括了目標文件列表,庫文件列表及輸出文件、連接控制命令,以取代第一種繁瑣的格式,由于目標模塊庫文件大多不止1 個,因而第2 種方法較多見,這個文件名字也可由使用者隨意指定。(2) Bl51BL51 也是C51 軟件包的連接/定位器,其具有L51 的所有功能,此外它還具有以下3 點特別之處:a. 可以連接定位大于64kBytes 的程序。b. 具有代碼域及域切換功能(CodeBanking & Bank Switching)c. 可用于RTX51 操作系統RTX51 是一個實時多任務操作系統,它改變了傳統的編程模式,甚至不必用main( )函數,單片機系統軟件向RTOS 發展是一種趨勢,這種趨勢對于186 和38610及68K 系列CPU 更為明顯和必須,對8051 因CPU 較為簡單,程序結構等都不太復雜,RTX51 作用顯得不太突出,其專業版軟件PK51 軟件包甚至不包括RTX51Full,而只有一個RTX51TINY 版本的RTOS。RTX51 TINY 適用于無外部RAM 的單片機系統,因而可用面很窄,在本文中不作介紹。Bank switching 技術因使用很少也不作介紹。3. DScope51,Tscope51 及Monitor51(1) dScope51dScope51 是一個源級調試器和模擬器,它可以調試由C51 編譯器、A51 匯編器、PL/M-51 編譯器及ASM-51 匯編器產生的程序。它不需目標板(for windows 也可通過mon51 接目標板),只能進行軟件模擬,但其功能強大,可模擬CPU 及其外圍器件,如內部串口,外部I/O 及定時器等,能對嵌入式軟件功能進行有效測試。
上傳時間: 2013-11-01
上傳用戶:zhouxuepeng1
如何導入ASM文件到工程(視頻教程)
上傳時間: 2013-10-22
上傳用戶:胡蘿卜醬
The μPSD32xx family, from ST, consists of Flash programmable system devices with a 8032 MicrocontrollerCore. Of these, the μPSD3234A and μPSD3254A are notable for having a complete implementationof the USB hardware directly on the chip, complying with the Universal Serial Bus Specification, Revision1.1.This application note describes a demonstration program that has been written for the DK3200 hardwaredemonstration kit (incorporating a μPSD3234A device). It gives the user an idea of how simple it is to workwith the device, using the HID class as a ready-made device driver for the USB connection.IN-APPLICATION-PROGRAMMING (IAP) AND IN-SYSTEM-PROGRAMMING (ISP)Since the μPSD contains two independent Flash memory arrays, the Micro Controller Unit (MCU) can executecode from one memory while erasing and programming the other. Product firmware updates in thefield can be reliably performed over any communication channel (such as CAN, Ethernet, UART, J1850)using this unique architecture. For In-Application-Programming (IAP), all code is updated through theMCU. The main advantage for the user is that the firmware can be updated remotely. The target applicationruns and takes care on its own program code and data memory.IAP is not the only method to program the firmware in μPSD devices. They can also be programmed usingIn-System-Programming (ISP). A IEEE1149.1-compliant JTAG interface is included on the μPSD. Withthis, the entire device can be rapidly programmed while soldered to the circuit board (Main Flash memory,Secondary Boot Flash memory, the PLD, and all configuration areas). This requires no MCU participation.The MCU is completely bypassed. So, the μPSD can be programmed or reprogrammed any time, anywhere, even when completely uncommitted.Both methods take place with the device in its normal hardware environment, soldered to a printed circuitboard. The IAP method cannot be used without previous use of ISP, because IAP utilizes a small amountof resident code to receive the service commands, and to perform the desired operations.
標簽: Demonstration 3200 USB for
上傳時間: 2014-02-27
上傳用戶:zhangzhenyu
The 87LPC76X Microcontroller combines in a small package thebenefits of a high-performance microcontroller with on-boardhardware supporting the Inter-Integrated Circuit (I2C) bus interface.The 87LPC76X can be programmed both as an I2C bus master, aslave, or both. An overview of the I2C bus and description of the bussupport hardware in the 87LPC76X microcontrollers appears inapplication note AN464, Using the 87LPC76X Microcontroller as anI2C Bus Master. That application note includes a programmingexample, demonstrating a bus-master code. Here we show anexample of programming the microcontroller as an I2C slave.The code listing demonstrates communications routines for the87LPC76X as a slave on the I2C bus. It compliments the program inAN464 which demonstrates the 87LPC76X as an I2C bus master.One may demonstrate two 87LPC76X devices communicating witheach other on the I2C bus, using the AN464 code in one, and theprogram presented here in the other. The examples presented hereand in AN464 allow the 87LPC76X to be either a master or a slave,but not both. Switching between master and slave roles in amultimaster environment is described in application note AN435.The software for a slave on the bus is relatively simple, as theprocessor plays a relatively passive role. It does not initiate bustransfers on its own, but responds to a master initiating thecommunications. This is true whether the slave receives or transmitsdata—transmission takes place only as a response to a busmaster’s request. The slave does not have to worry about arbitrationor about devices which do not acknowledge their address. As theslave is not supposed to take control of the bus, we do not demandit to resolve bus exceptions or “hangups”. If the bus becomesinactive the processor simply withdraws, not interfering with themaster (or masters) on the bus which should (hopefully) try toresolve the situation.
上傳時間: 2013-11-19
上傳用戶:shirleyYim
CodeWarrior Development Studio for Microcontrollers v10.2 集成了 RS08, HCS08, ColdFire, ColdFire+, Kinetis, Qorivva MPC56xx和 DSC 架構的開發工具于一個基于Eclipse的開放開發工具平臺上。這次課程將介紹關于Eclipse的基礎知識和CodeWarrior for MCU v10.2的一些新特性。
標簽: Microcontrollers CodeWarrior Development Studio
上傳時間: 2013-11-17
上傳用戶:6546544
proteus7.10 Proteus VSM for ARM Cortex
標簽: proteus Proteus Cortex 7.10
上傳時間: 2013-11-16
上傳用戶:13160677563
The #1 Step-by-Step Guide to labviewNow Completely Updated for labview 8! Master labview 8 with the industry's friendliest, most intuitive tutorial: labview for Everyone, Third Edition. Top labview experts Jeffrey Travis and Jim Kring teach labview the easy way: through carefully explained, step-by-step examples that give you reusable code for your own projects! This brand-new Third Edition has been fully revamped and expanded to reflect new features and techniques introduced in labview 8. You'll find two new chapters, plus dozens of new topics, including Project Explorer, AutoTool, XML, event-driven programming, error handling, regular expressions, polymorphic VIs, timed structures, advanced reporting, and much more. Certified labview Developer (CLD) candidates will find callouts linking to key objectives on NI's newest exam, making this book a more valuable study tool than ever. Not just what to d why to do it! Use labview to build your own virtual workbench Master labview's foundations: wiring, creating, editing, and debugging VIs; using controls and indicators; working with data structures; and much more Learn the "art" and best practices of effective labview development NEW: Streamline development with labview Express VIs NEW: Acquire data with NI-DAQmx and the labview DAQmx VIs NEW: Discover design patterns for error handling, control structures, state machines, queued messaging, and more NEW: Create sophisticated user interfaces with tree and tab controls, drag and drop, subpanels, and more Whatever your application, whatever your role, whether you've used labview or not, labview for Everyone, Third Edition is the fastest, easiest way to get the results you're after!
上傳時間: 2013-10-14
上傳用戶:shawvi
When I started writing the first edition of RF Power Amplifiers for Wireless Communications,some time back in 1997, it seemed that I was roaming a largely uninhabitedlandscape. For reasons still not clear to me there were few, if any, otherbooks dedicated to the subject of RF power amplifiers. Right at the same time, however,hundreds of engineers were being assigned projects to design PAs for wirelesscommunications products. It was not, therefore, especially difficult to be successfulwith a book that was fortuitously at the right place and the right time.
標簽: Communications Amplifiers Wireless Edition
上傳時間: 2013-11-12
上傳用戶:YYRR