Nios 的用戶定義接口邏輯實例 有許多人問我使用 Nios 的用戶定義接口邏輯怎么用,想了幾天決定設計一個實例來說明。該例為一個使用 user to interface logic 設計的 PWM 實例,其中包括三個文件: plus32.v 是一個為 32bit nios 設計的 pwm 實例。 plus16.v 是一個為 16bit nios 設計的 pwm 實例。 test.s 是一個使用中斷調用 pwm 的匯編語言測試程序。以上模塊和程序均調試通過,并可穩定工作。這里讓大家參考是使大家通過該例來真正理解 user to interface logic 設計方法,和nios 中通過匯編調用中斷的方法,所以超值喔。另外熱烈歡迎大家的指導。 注:在設計 Nios 時,將你調用的 user to interface logic 插件重命名為 plus_0,這樣我的 test.s 可不作任何改動,你就可用示波器通過 nios 的 plus 管腳觀察到一個要求的輸出。
上傳時間: 2013-11-15
上傳用戶:cc1915
The PCA9544A provides 4 interrupt inputs, one for each channeland one open drain interrupt output. When an interrupt is generated byany device, it will be detected by the PCA9544A and the interruptoutput will be driven LOW. The channel need not be active fordetection of the interrupt. A bit is also set in the control byte.Bits 4 – 7 of the control byte correspond to channels 0 – 3 of thePCA9544A, respectively. Therefore, if an interrupt is generated byany device connected to channel 2, the state of the interrupt inputs isloaded into the control register when a read is accomplished.Likewise, an interrupt on any device connected to channel 0 wouldcause bit 4 of the control register to be set on the read. The mastercan then address the PCA9544A and read the contents of thecontrol byte to determine which channel contains the devicegenerating the interrupt. The master can then reconfigure thePCA9544A to select this channel, and locate the device generatingthe interrupt and clear it. The interrupt clears when the deviceoriginating the interrupt clears.
標簽: 4channel multiple 9544A 9544
上傳時間: 2014-12-28
上傳用戶:潛水的三貢
Designing Boards with Atmel AT89C51, AT89C52, AT89C1051, and AT89C2051 for Writing Flash at In-Circuit Test:Recent improvements in chips andtesters have made it possible for thetester to begin taking over the role traditionallyassigned to the PROM programmer.Instead of having a PROM programmerwrite nonvolatile memoriesbefore assembling the board, the in-circuittester writes them during in-circuittesting operations. Many Teradyne Z18-series testers are now in use loadingcode into nonvolatile memories, microcontrollersand in-circuit programmable logic devices. The purpose of this note is to explain how the Z18 approaches the writing task for Atmel AT89C series IC’s,so that designers of boards using these chips can get the best results.
標簽: Designing Boards Atmel with
上傳時間: 2013-11-20
上傳用戶:lijianyu172
SPCE061A采用的內核 SPCE061A采用的內核(CPU)為μ‘nSP。 μ‘nSP(讀做micro-n-S-P)是凌陽科技推出的16位微處理器,它的突出特點是較高的處理速度,這就使其有能力進行復雜的數字信號處理(DSP,Digital Signal Processing)。 μ‘nSP內核由凌陽自主開發,因而也具備它自己的指令系統。 指令系統.61 3.1 指令系統的概述及符號約定.61 3.2 數據傳送指令62 3.3 算術運算..66 3.3.1 加法運算..67 3.3.2 減法運算..68 3.3.3 帶進位的加減運算.70 3.3.4 取補運算..70 3.3.5 SPCE061A的乘法指令.71 3.3.6 SPCE061A的n項內積運算指令.71 3.3.7 比較運算(影響標志位N,Z,S,C)..73 3.4 SPCE061A的邏輯運算.74 3.4.1 邏輯與..74 3.4.2 邏輯或..75 3.4.3 邏輯異或..76 3.4.4 測試(TEST).78 3.4.5 SPCE061A的移位操作.80 3.5 SPCE061A的控制轉移類指令..83 3.6 偽指令86 3.6.1 偽指令的語法格式及特點..87 3.6.2 偽指令符號約定..87 3.6.3 標準偽指令.87 3.6.4 宏定義與調用98 3.6.5 段的定義與調用101 3.6.6 結構的定義與調用..102 3.6.7 過程的定義與調用..106 3.6.8 偽指令的應用舉例..106
上傳時間: 2013-10-31
上傳用戶:xuanchangri
基于單片機控制的二氧化碳濃度測試計:基于CDM4161二氧化碳氣體濃度測試模塊以及ATtiny26單片機,提出了一種二氧化碳濃度測試計的設計方案。該方案具有硬件電路簡單、成本低、可靠性高、測量準確等優點,具有較高的實用價值。 Abstract: Abstract:A desigh scheme of CO2 concentration meter based on CDM4161carbon dioxide concentration test module and ATtiny26micro-controller is presented in this paper.The design scheme features simple hardware circuit,low-cost,high reli-ability,accurate measurement and it has a high practical value.
上傳時間: 2013-11-14
上傳用戶:zjwangyichao
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
The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using SW routines implemented in C. The code is focused onthe SAB C513, but will fit to all C500 derivatives.Beyond the low level software drivers a test shell is delivered. This shell allows a quicktest of the software drivers by an emulator or a starter kit demo board.
上傳時間: 2013-11-24
上傳用戶:363186
This application note shows how to write an Inter Integrated Circuit bus driver (I²C) for the Philips P90CL301micro-controller.It is not only an example of writing a driver, but it also includes a set of application interface software routines toquickly implement a complete I²C multi-master system application.For specific applications the user will have to make minimal changes in the driver program. Using the drivermeans linking modules to your application software and including a header-file into the application sourceprograms. A small example program of how to use the driver is listed.The driver supports i.a. polled or interrupt driven message handling, slave message transfers and multi-mastersystem applications. Furthermore, it is made suitable for use in conjunction with real time operating systems, likepSOS+.
上傳時間: 2013-11-23
上傳用戶:weixiao99
This application note demonstrates how to write an Inter Integrated Circuit bus driver (I2C) for the XA-S3 16-bitMicrocontroller from Philips Semiconductors.Not only the driver software is given. This note also contains a set of (example) interface routines and a smalldemo application program. All together it offers the user a quick start in writing a complete I2C system applicationwith the PXAS3x.The driver routines support interrupt driven single master transfers. Furthermore, the routines are suitable foruse in conjunction with real time operating systems.
上傳時間: 2013-11-02
上傳用戶:zw380105939
P C B 可測性設計布線規則之建議― ― 從源頭改善可測率PCB 設計除需考慮功能性與安全性等要求外,亦需考慮可生產與可測試。這里提供可測性設計建議供設計布線工程師參考。1. 每一個銅箔電路支點,至少需要一個可測試點。如無對應的測試點,將可導致與之相關的開短路不可檢出,并且與之相連的零件會因無測試點而不可測。2. 雙面治具會增加制作成本,且上針板的測試針定位準確度差。所以Layout 時應通過Via Hole 盡可能將測試點放置于同一面。這樣就只要做單面治具即可。3. 測試選點優先級:A.測墊(Test Pad) B.通孔(Through Hole) C.零件腳(Component Lead) D.貫穿孔(Via Hole)(未Mask)。而對于零件腳,應以AI 零件腳及其它較細較短腳為優先,較粗或較長的引腳接觸性誤判多。4. PCB 厚度至少要62mil(1.35mm),厚度少于此值之PCB 容易板彎變形,影響測點精準度,制作治具需特殊處理。5. 避免將測點置于SMT 之PAD 上,因SMT 零件會偏移,故不可靠,且易傷及零件。6. 避免使用過長零件腳(>170mil(4.3mm))或過大的孔(直徑>1.5mm)為測點。7. 對于電池(Battery)最好預留Jumper,在ICT 測試時能有效隔離電池的影響。8. 定位孔要求:(a) 定位孔(Tooling Hole)直徑最好為125mil(3.175mm)及其以上。(b) 每一片PCB 須有2 個定位孔和一個防呆孔(也可說成定位孔,用以預防將PCB反放而導致機器壓破板),且孔內不能沾錫。(c) 選擇以對角線,距離最遠之2 孔為定位孔。(d) 各定位孔(含防呆孔)不應設計成中心對稱,即PCB 旋轉180 度角后仍能放入PCB,這樣,作業員易于反放而致機器壓破板)9. 測試點要求:(e) 兩測點或測點與預鉆孔之中心距不得小于50mil(1.27mm),否則有一測點無法植針。以大于100mil(2.54mm)為佳,其次是75mil(1.905mm)。(f) 測點應離其附近零件(位于同一面者)至少100mil,如為高于3mm 零件,則應至少間距120mil,方便治具制作。(g) 測點應平均分布于PCB 表面,避免局部密度過高,影響治具測試時測試針壓力平衡。(h) 測點直徑最好能不小于35mil(0.9mm),如在上針板,則最好不小于40mil(1.00mm),圓形、正方形均可。小于0.030”(30mil)之測點需額外加工,以導正目標。(i) 測點的Pad 及Via 不應有防焊漆(Solder Mask)。(j) 測點應離板邊或折邊至少100mil。(k) 錫點被實踐證實是最好的測試探針接觸點。因為錫的氧化物較輕且容易刺穿。以錫點作測試點,因接觸不良導致誤判的機會極少且可延長探針使用壽命。錫點尤其以PCB 光板制作時的噴錫點最佳。PCB 裸銅測點,高溫后已氧化,且其硬度高,所以探針接觸電阻變化而致測試誤判率很高。如果裸銅測點在SMT 時加上錫膏再經回流焊固化為錫點,雖可大幅改善,但因助焊劑或吃錫不完全的緣故,仍會出現較多的接觸誤判。
上傳時間: 2014-01-14
上傳用戶:cylnpy