The C500 microcontroller family usually provides only one on-chip synchronous serialchannel (SSC). If a second SSC is required, an emulation of the missing interface mayhelp to avoid an external hardware solution with additional electronic components.The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using optimized SW routines with a performance up to 25KBaud in Slave Mode with half duplex transmission and an overhead less than 60% atSAB C513 with 12 MHz. Due to the implementation in C this performance is not the limitof the chip. A pure implementation in assembler will result in a strong reduction of theCPU load and therefore increase the maximum speed of the interface. In addition,microcontrollers like the SAB C505 will speed up the interface by a factor of two becauseof an optimized architecture compared with the SAB C513.Moreover, this solution lays stress on using as few on-chip hardware resources aspossible. A more excessive consumption of those resources will result in a highermaximum speed of the emulated interface.Due to the restricted performance of an 8 bit microcontroller a pin compatible solution isprovided only; the internal register based programming interface is replaced by a set ofsubroutine calls.The attached source files also contain a test shell, which demonstrates how to exchangeinformation between an on-chip HW-SSC and the emulated SW-SSC via 5 external wiresin different operation modes. It is based on the SAB C513 (Siemens 8 bit microcontroller).A table with load measurements is presented to give an indication for the fraction of CPUperformance required by software for emulating the SSC.
標簽: synchronous Emulating serial
上傳時間: 2014-01-31
上傳用戶:z1191176801
AVR高速嵌入式單片機原理與應用(修訂版)詳細介紹ATMEL公司開發的AVR高速嵌入式單片機的結構;講述AVR單片機的開發工具和集成開發環境(IDE),包括Studio調試工具、AVR單片機匯編器和單片機串行下載編程;學習指令系統時,每條指令均有實例,邊學習邊調試,使學習者看得見指令流向及操作結果,真正理解每條指令的功能及使用注意事項;介紹AVR系列多種單片機功能特點、實用程序設計及應用實例;作為提高篇,講述簡單易學、適用AVR單片機的高級語言BASCOMAVR及ICC AVR C編譯器。 AVR高速嵌入式單片機原理與應用(修訂版) 目錄 第一章ATMEL單片機簡介1.1ATMEL公司產品的特點11.2AT90系列單片機簡介21.3AT91M系列單片機簡介2第二章AVR單片機系統結構2.1AVR單片機總體結構42.2AVR單片機中央處理器CPU62.2.1結構概述72.2.2通用寄存器堆92.2.3X、Y、Z寄存器92.2.4ALU運算邏輯單元92.3AVR單片機存儲器組織102.3.1可下載的Flash程序存儲器102.3.2內部和外部的SRAM數據存儲器102.3.3EEPROM數據存儲器112.3.4存儲器訪問和指令執行時序112.3.5I/O存儲器132.4AVR單片機系統復位162.4.1復位源172.4.2加電復位182.4.3外部復位192.4.4看門狗復位192.5AVR單片機中斷系統202.5.1中斷處理202.5.2外部中斷232.5.3中斷應答時間232.5.4MCU控制寄存器 MCUCR232.6AVR單片機的省電方式242.6.1休眠狀態242.6.2空閑模式242.6.3掉電模式252.7AVR單片機定時器/計數器252.7.1定時器/計數器預定比例器252.7.28位定時器/計數器0252.7.316位定時器/計數器1272.7.4看門狗定時器332.8AVR單片機EEPROM讀/寫訪問342.9AVR單片機串行接口352.9.1同步串行接口 SPI352.9.2通用串行接口 UART402.10AVR單片機模擬比較器452.10.1模擬比較器452.10.2模擬比較器控制和狀態寄存器ACSR462.11AVR單片機I/O端口472.11.1端口A472.11.2端口 B482.11.3端口 C542.11.4端口 D552.12AVR單片機存儲器編程612.12.1編程存儲器鎖定位612.12.2熔斷位612.12.3芯片代碼612.12.4編程 Flash和 EEPROM612.12.5并行編程622.12.6串行下載662.12.7可編程特性67第三章AVR單片機開發工具3.1AVR實時在線仿真器ICE200693.2JTAG ICE仿真器693.3AVR嵌入式單片機開發下載實驗器SL?AVR703.4AVR集成開發環境(IDE)753.4.1AVR assembler編譯器753.4.2AVR Studio773.4.3AVR Prog783.5SL?AVR系列組態開發實驗系統793.6SL?AVR*.ASM源文件說明81第四章AVR單片機指令系統4.1指令格式844.1.1匯編指令844.1.2匯編器偽指令844.1.3表達式874.2尋址方式894.3數據操作和指令類型924.3.1數據操作924.3.2指令類型924.3.3指令集名詞924.4算術和邏輯指令934.4.1加法指令934.4.2減法指令974.4.3乘法指令1014.4.4取反碼指令1014.4.5取補指令1024.4.6比較指令1034.4.7邏輯與指令1054.4.8邏輯或指令1074.4.9邏輯異或指令1104.5轉移指令1114.5.1無條件轉移指令1114.5.2條件轉移指令1144.6數據傳送指令1354.6.1直接數據傳送指令1354.6.2間接數據傳送指令1374.6.3從程序存儲器直接取數據指令1444.6.4I/O口數據傳送指令1454.6.5堆棧操作指令1464.7位指令和位測試指令1474.7.1帶進位邏輯操作指令1474.7.2位變量傳送指令1514.7.3位變量修改指令1524.7.4其它指令1614.8新增指令(新器件)1624.8.1EICALL-- 延長間接調用子程序1624.8.2EIJMP--擴展間接跳轉1634.8.3ELPM--擴展裝載程序存儲器1644.8.4ESPM--擴展存儲程序存儲器1644.8.5FMUL--小數乘法1664.8.6FMULS--有符號數乘法1664.8.7FMULSU--有符號小數和無符號小數乘法1674.8.8MOVW--拷貝寄存器字1684.8.9MULS--有符號數乘法1694.8.10MULSU--有符號數與無符號數乘法1694.8.11SPM--存儲程序存儲器170 第五章AVR單片機AT90系列5.1AT90S12001725.1.1特點1725.1.2描述1735.1.3引腳配置1745.1.4結構縱覽1755.2AT90S23131835.2.1特點1835.2.2描述1845.2.3引腳配置1855.3ATmega8/8L1855.3.1特點1865.3.2描述1875.3.3引腳配置1895.3.4開發實驗工具1905.4AT90S2333/44331915.4.1特點1915.4.2描述1925.4.3引腳配置1945.5AT90S4414/85151955.5.1特點1955.5.2AT90S4414和AT90S8515的比較1965.5.3引腳配置1965.6AT90S4434/85351975.6.1特點1975.6.2描述1985.6.3AT90S4434和AT90S8535的比較1985.6.4引腳配置2005.6.5AVR RISC結構2015.6.6定時器/計數器2125.6.7看門狗定時器 2175.6.8EEPROM讀/寫2175.6.9串行外設接口SPI2175.6.10通用串行接口UART2175.6.11模擬比較器 2175.6.12模數轉換器2185.6.13I/O端口2235.7ATmega83/1632285.7.1特點2285.7.2描述2295.7.3ATmega83與ATmega163的比較2315.7.4引腳配置2315.8ATtiny10/11/122325.8.1特點2325.8.2描述2335.8.3引腳配置2355.9ATtiny15/L2375.9.1特點2375.9.2描述2375.9.3引腳配置2395 .10ATmega128/128L2395.10.1特點2405.10.2描述2415.10.3引腳配置2435.10.4開發實驗工具2455.11ATmega1612465.11.1特點2465.11.2描述2475.11.3引腳配置2475.12AVR單片機替代MCS51單片機249第六章實用程序設計6.1程序設計方法2506.1.1程序設計步驟2506.1.2程序設計技術2506.2應用程序舉例2516.2.1內部寄存器和位定義文件2516.2.2訪問內部 EEPROM2546.2.3數據塊傳送2546.2.4乘法和除法運算應用一2556.2.5乘法和除法運算應用二2556.2.616位運算2556.2.7BCD運算2556.2.8冒泡分類算法2556.2.9設置和使用模擬比較器2556.2.10半雙工中斷方式UART應用一2556.2.11半雙工中斷方式UART應用二2566.2.128位精度A/D轉換器2566.2.13裝載程序存儲器2566.2.14安裝和使用相同模擬比較器2566.2.15CRC程序存儲的檢查2566.2.164×4鍵區休眠觸發方式2576.2.17多工法驅動LED和4×4鍵區掃描2576.2.18I2C總線2576.2.19I2C工作2586.2.20SPI軟件2586.2.21驗證SLAVR實驗器及AT90S1200的口功能12596.2.22驗證SLAVR實驗器及AT90S1200的口功能22596.2.23驗證SLAVR實驗器及具有DIP40封裝的口功能第七章AVR單片機的應用7.1通用延時子程序2607.2簡單I/O口輸出實驗2667.2.1SLAVR721.ASM 2667.2.2SLAVR722.ASM2677.2.3SLAVR723.ASM2687.2.4SLAVR724.ASM2707.2.5SLAVR725.ASM2717.2.6SLAVR726.ASM2727.2.7SLAVR727.ASM2737.3綜合程序2747.3.1LED/LCD/鍵盤掃描綜合程序2747.3.2LED鍵盤掃描綜合程序2757.3.3在LED上實現字符8的循環移位顯示程序2757.3.4電腦放音機2777.3.5鍵盤掃描程序2857.3.6十進制計數顯示2867.3.7廉價的A/D轉換器2897.3.8高精度廉價的A/D轉換器2947.3.9星星燈2977.3.10按鈕猜數程序2987.3.11漢字的輸入3047.4復雜實用程序3067.4.110位A/D轉換3067.4.2步進電機控制程序3097.4.3測脈沖寬度3127.4.4LCD顯示8字循環3187.4.5LED電腦時鐘3247.4.6測頻率3307.4.7測轉速3327.4.8AT90S8535的A/D轉換334第八章BASCOMAVR的應用8.1基于高級語言BASCOMAVR的單片機開發平臺3408.2BASCOMAVR軟件平臺的安裝與使用3418.3AVR I/O口的應用3458.3.1LED發光二極管的控制3458.3.2簡易手控廣告燈3468.3.3簡易電腦音樂放音機3478.4LCD顯示器3498.4.1標準LCD顯示器的應用3498.4.2簡單游戲機--按鈕猜數3518.5串口通信UART3528.5.1AVR系統與PC的簡易通信3538.5.2PC控制的簡易廣告燈3548.6單總線接口和溫度計3568.7I2C總線接口和簡易IC卡讀寫器359第九章ICC AVR C編譯器的使用9.1ICC AVR的概述3659.1.1介紹ImageCraft的ICC AVR3659.1.2ICC AVR中的文件類型及其擴展名3659.1.3附注和擴充3669.2ImageCraft的ICC AVR編譯器安裝3679.2.1安裝SETUP.EXE程序3679.2.2對安裝完成的軟件進行注冊3679.3ICC AVR導游3689.3.1起步3689.3.2C程序的剖析3699.4ICC AVR的IDE環境3709.4.1編譯一個單獨的文件3709.4.2創建一個新的工程3709.4.3工程管理3719.4.4編輯窗口3719.4.5應用構筑向導3719.4.6狀態窗口3719.4.7終端仿真3719.5C庫函數與啟動文件3729.5.1啟動文件3729.5.2常用庫函數3729.5.3字符類型庫3739.5.4浮點運算庫3749.5.5標準輸入/輸出庫3759.5.6標準庫和內存分配函數3769.5.7字符串函數3779.5.8變量參數函數3799.5.9堆棧檢查函數3799.6AVR硬件訪問的編程3809.6.1訪問AVR的底層硬件3809.6.2位操作3809.6.3程序存儲器和常量數據3819.6.4字符串3829.6.5堆棧3839.6.6在線匯編3839.6.7I/O寄存器3849.6.8絕對內存地址3849.6.9C任務3859.6.10中斷操作3869.6.11訪問UART3879.6.12訪問EEPROM3879.6.13訪問SPI3889.6.14相對轉移/調用的地址范圍3889.6.15C的運行結構3889.6.16匯編界面和調用規則3899.6.17函數返回非整型值3909.6.18程序和數據區的使用3909.6.19編程區域3919.6.20調試3919.7應用舉例*3929.7.1讀/寫口3929.7.2延時函數3929.7.3讀/寫EEPROM3929.7.4AVR的PB口變速移位3939.7.5音符聲程序3939.7.68字循環移位顯示程序3949.7.7鋸齒波程序3959.7.8正三角波程序3969.7.9梯形波程序396附錄1AT89系列單片機簡介398附錄2AT94K系列現場可編程系統標準集成電路401附錄3指令集綜合404附錄4AVR單片機選型表408參 考 文 獻412
上傳時間: 2013-11-08
上傳用戶:xcy122677
8051 Absolute Encoder Positioner How to connect and drive absolute position encoder with SSI serial interface. The encoder has been made by Siemens (6FX2001-5FS12). Archive contains: 1) schematic, 2) source in C and assembler
標簽: Positioner Absolute absolute position
上傳時間: 2015-01-13
上傳用戶:6546544
Many many developers all over the net respect NASM for what i s - a widespread (thus netwide), portable (thus netwide!), very flexible and mature assembler tool with support for many output formats (thus netwide!!). Now we have good news for you: NASM is licensed under LGPL. This means its development is open to even wider society of programmers wishing to improve their lovely assembler. The NASM project is now situated at SourceForge.net, the most famous Open Source development center on The Net. Visit our development page at http://nasm.2y.net/ and our SF project at http://sf.net/projects/nasm/
標簽: developers widespread netwide respect
上傳時間: 2014-01-20
上傳用戶:2404
CBC下寫的串口編程,API函數實例 I wish this site had been around when I was trying to figure out how to make serial communications work in Windows95. I, like many programmers, was hit with the double-whammy of having to learn Windows programming and Win95 serial comm programming at the same time. I found both tasks confusing at best. It was particularly frustrating because I had, over the years, written so much stuff (including lots of serial comm software) for the DOS environment and numerous embedded applications. Interrupt driven serial comm, DMA transfer serial comm, TSR serial comm, C, assembler, various processors... you name it, it had written it. Yet, everything I knew seemed upside-down in the message-driven-callback world of Windows.
上傳時間: 2014-06-20
上傳用戶:cccole0605
EXAMPLE SOURCE CODE FOR TASM FILTER his filter accepts input through the standard input stream, converts it and outputs it to the standard output stream. The streams are linked through pipes, such that the input stream is the output from the assembler being invoked, and the output stream is connected to the message window of the IDE, ie.
標簽: input standard EXAMPLE accepts
上傳時間: 2014-01-13
上傳用戶:小碼農lz
This a simple example project for the MSP430 series MCU and the GCC port of the mspgcc project. The project contains a makefile and uses assembler and C sources. It shows a clock on an character LCD.
標簽: project the example simple
上傳時間: 2015-10-19
上傳用戶:waitingfy
OllyMachine是在VC 6.0下開發的,請打開OllyMachine.dsp,然后按F7編譯。它大約有10000行源代碼,主要分成兩個大類:assembler和VM。
標簽: OllyMachine 6.0
上傳時間: 2015-11-26
上傳用戶:1159797854
The programming port of all the FP PLC’s support OPEN MEWTOCOL-COM. This is very useful when you want to monitor PLC values/bits or to set PLC values or bits via your COMPUTER. You can use any language such as Basic, C, Pascal, assembler or even if other suppliers of PLCs can send ASCII strings, they can talk to our PLCs to exchange data.
標簽: MEWTOCOL-COM programming support useful
上傳時間: 2015-12-08
上傳用戶:youmo81
由三星的2442修改而來,正確引導eboot,請注意用三星公版的硬件配置,具體可以參考QQ2440,因為我在些平臺上跑過,具體操作 1.target settings : post-linker:選擇為 ARM fromELF 2.ARM assembler與 ARM c Compiler 的 architecture or processor 選擇為:ARM920T 3.ARM linker的 output:RO base為 0x00000000 (當仿真時為:0x30000000),layout的 object/sysmbol:為2440init.o section:Init 4.ARM fromELF 的 output:format:plain binary , output file name:nboot.bin 下面為全部源碼,注意用ADS編譯 2442addr.h 2442addr.inc 2442init.s 2442lib.c 2442lib.h 2442loader-1208.c 2442slib.h 2442slib.s Def.h k9s1208_s.s Memcfg.inc Nand.h Nand_mini.c Option.h Option.inc
標簽: post-linker settings target eboot
上傳時間: 2016-05-06
上傳用戶:moshushi0009