一、 main.c(35): warning: #128-D: loop is not reachable from preceding code 原因,前面有一個while(1){ …….} 二、 main.c(54): warning: #1-D: last line of file ends without a newline 少了一個回車在}之后
上傳時間: 2014-12-26
上傳用戶:sjb555
為解決當(dāng)前計算機(jī)串行通訊接口只有USB,難以滿足舊型號設(shè)備或某些單片機(jī)要求RS232通訊的問題,設(shè)計出兩款RS232/USB電路。采用CH341A與MAX223集成電路芯片構(gòu)建標(biāo)準(zhǔn)9線RS232/USB通用接口轉(zhuǎn)換器,無需編程。采用CH341A與PIC16F877A構(gòu)建單片機(jī)與計算機(jī)之間的USB通訊電路,軟件遵循RS232通訊協(xié)議,硬件進(jìn)行電平轉(zhuǎn)換。實(shí)際使用表明,這兩款產(chǎn)品與計算機(jī)端Windows 操作系統(tǒng)下的串口應(yīng)用程序完全兼容,且通訊過程中無握手失敗現(xiàn)象。 Abstract: To solve the problem that current computer serial communication only with USB interface can not satisfy with the old type equipments or MCU to communicate with RS232, two kinds of RS232/USB circuit were designed.CH341A and MAX223 integrated circuit chips were used to create a standard 9-line RS232/USB universal interface convertor without programme. CH341A and PIC16F877A chips were adopted to build the USB communication circuit between computers and MCU. The software follows RS232 communication protocol, and the hardware converts electrical levels. Actual practices indicate that the two manufactures are compatible with serial application program of Windows operation system completely,and get avoid of handshake lost.
上傳時間: 2013-11-03
上傳用戶:siying
提出一種基于凌陽單片機(jī)的步進(jìn)電機(jī)加減速的控制方法。采用凌陽科技推出的16位結(jié)構(gòu)工控單片機(jī)SPMC75F2413A為控制器,由Allegro公司生產(chǎn)的兩相步進(jìn)電機(jī)專用驅(qū)動器件SLA7042M構(gòu)成步進(jìn)電機(jī)的驅(qū)動電路,在傳統(tǒng)的3段直線加減速控制算法基礎(chǔ)上增加至7段S形曲線加減速過程,控制步進(jìn)電機(jī)的啟動和停止。實(shí)驗結(jié)果表明,該控制方法克服了直線加減速中不連續(xù)、易造成系統(tǒng)沖擊的問題,整個系統(tǒng)實(shí)現(xiàn)柔性控制,電機(jī)啟動、停止連續(xù)性能提高30%。 Abstract: The method of controlled stepping motor is referred based on SPMC75F2413A MCU, which adopts the 16 knots SPMC75F2413A MCU as the controller. The special-purpose actuation chip SLA7042M of two stepping motor produced by Allegro Corporation constituted to actuation electric circuit. The purpose of increasing to seven section of S shape curve based on the traditional three sections of straight line is to control the start and stop process of stepping motor. The experimental results show that the control method solves easy to pull-out and overshot problems. The overall system realizes flexible control, and the performance of motor start or stop continuity is increased 30%
標(biāo)簽: 凌陽單片機(jī) 步進(jìn)電機(jī) 減 控制方法
上傳時間: 2013-12-08
上傳用戶:jiangfire
單片機(jī)作為一種微型計算機(jī),其內(nèi)部具有一定的存儲單元(8031除外),但由于其內(nèi)部存儲單元及端口有限,很多情況下難以滿足實(shí)際需求。為此介紹一種新的擴(kuò)展方法,將數(shù)據(jù)線與地址線合并使用,通過軟件控制的方法實(shí)現(xiàn)數(shù)據(jù)線與地址線功能的分時轉(zhuǎn)換,數(shù)據(jù)線不僅用于傳送數(shù)據(jù)信號,還可作為地址線、控制線,用于傳送地址信號和控制信號,從而實(shí)現(xiàn)單片機(jī)與存儲器件的有效連接。以單片機(jī)片外256KB數(shù)據(jù)存儲空間的擴(kuò)展為例,通過該擴(kuò)展方法,僅用10個I/O端口便可實(shí)現(xiàn),與傳統(tǒng)的擴(kuò)展方法相比,可節(jié)約8個I/O端口。 Abstract: As a micro-computer,the SCM internal memory has a certain units(except8031),but because of its internal storage units and the ports are limited,in many cases it can not meet the actual demand.So we introduced a new extension method,the data line and address lines combined through software-controlled approach to realize the time-conversion functions of data lines and address lines,so the data lines not only transmited data signals,but also served as address lines and control lines to transmit address signals and control signals,in order to achieve an effective connection of microcontroller and memory chips.Take microcontroller chip with256KB of data storage space expansion as example,through this extension method,with only10I/O ports it was achieved,compared with the traditional extension methods,this method saves8I/O ports.
標(biāo)簽: 單片機(jī) P0口 數(shù)據(jù)存儲器 擴(kuò)展
上傳時間: 2014-12-26
上傳用戶:adada
數(shù)字信號處理器dsPIC33F集多通道高精度A/D轉(zhuǎn)換、多通訊模式、看門狗、CMOS Flash技術(shù)等于一體,其內(nèi)部可完成所有數(shù)據(jù)操作,實(shí)現(xiàn)總線不出芯片技術(shù)。將該處理器應(yīng)用于微機(jī)保護(hù)裝置,提出基于dsPIC33F微處理器的微機(jī)保護(hù)裝置的設(shè)計方案,給出相應(yīng)的接口電路與軟件流程。該設(shè)計方案結(jié)構(gòu)簡單,性價比及可靠性高,開發(fā)周期短,具有一定的實(shí)用推廣價值。所研制的微機(jī)保護(hù)裝置現(xiàn)場運(yùn)行效果良好。 Abstract: The dsPIC33F microprocessor has a plentiful interior resource which contains multi-channel,high precision A/D converters,multi-communication module,watchdog,CMOS Flash technology,and so on.All data manipulations is accomplished interiorly.What is more,it makes the technology that bus does not go beyond the chip comes into practice.The paper put forwards a design scheme based on dsPIC33F microprocessor.The scheme has the advantages of simple structure,high reliability and shortened exploitation cycle.What is more,it has definite practicality and reference.The microcomputer protection device has been put into operation with excellent effects.
上傳時間: 2013-11-16
上傳用戶:開懷常笑
以89S52單片機(jī)和EP1C6Q240C8型FPGA為控制核心的多功能計數(shù)器,是由峰值檢波、A/D轉(zhuǎn)換、程控放大、比較整形、移相網(wǎng)絡(luò)部分組成,可實(shí)現(xiàn)測量正弦信號的頻率、周期和相位差的功能。多功能計數(shù)器采用等精度的測量方法,可實(shí)現(xiàn)頻率為1Hz~10MHz、幅度為0.01~5Vrms的正弦信號的精確測頻,以及頻率為10Hz~100kHz、幅度為0.5~5Vrms的正弦信號精確測相。液晶顯示器能夠?qū)崟r顯示當(dāng)前信號的頻率、周期和相位差。該多功能計數(shù)器精度高,界面友好,實(shí)用性強(qiáng)。 Abstract: A multi-function counter,which uses89S52MCU and EP1C6Q240C8FPGA as a control core,consists of peak detector,A/D conversion,program-controlled amplification,compared shaping and phase-shifting network part.The counter measures the frequency,period and phase of sinusoidal signal.With the equal precision method,the multi-function counter achieves the precise frequency measurement of the sinusoidal signal which its frequency is from1Hz to10MHz,its amplitude is from0.01Vrms to5Vrms,as well as the accurate phase measurement of the sinusoidal signal which its frequency is from10Hz to100kHz,its amplitude is from0.5Vrms to5Vrms.The LCD monitor real-time displays the frequency,period and phase difference of current signal.The multi-function counter features high precision,friendly interface,and strong practical.
標(biāo)簽: FPGA 單片機(jī) 多功能 計數(shù)器
上傳時間: 2013-11-15
上傳用戶:gy592333
介紹了一種基于C8051F020單片機(jī)的多路壓力測量儀。該測量儀選用電阻應(yīng)變式壓力傳感器采集壓力信號,并經(jīng)放大電路處理后送入C8051F020單片機(jī),再由C8051F020單片機(jī)內(nèi)部的A/D轉(zhuǎn)換器將采集到的壓力信號進(jìn)行模數(shù)轉(zhuǎn)化,然后分別對數(shù)據(jù)進(jìn)行存儲和顯示。該測量儀能測量6路壓力信號,并且各測量點(diǎn)都能單獨(dú)檢測和設(shè)置。由于采用了C8051F020單片機(jī),簡化了硬件電路,增強(qiáng)了抗干擾能力,使得測量儀具有測量精度高,沖擊小等特點(diǎn)。 Abstract: A measurement apparatus for multi-channel pressure based on single chip microcomputer is introduced.It can measure 6 channels signal of the pressure,and the pressure measure points can be detection and located individually.The pressure signal sampling is obtained by resistor stress-type pressure sensors,the digital signals of 6 channels are collected through amplifying and adjustment circuit of pressure signals and internal integrated A/D converter of MCU.Finally,and it realizes the function to store and display data separately.C8051F020 was used to made hardware circuit simple,and it also enhanced the anti-interference ability.It features high precision and little impact.
標(biāo)簽: C8051F020 單片機(jī) 多路 壓力
上傳時間: 2013-11-16
上傳用戶:yare
量測/測試所面臨之問題 此測試驗證上,要使用NI公司之LAB VIEW及DAQ CARD來取代AUDIO PRECISION及其所附軟體ATS。首先需克服硬體解析度上的差異,再來是FFT(FAST FOURIER TRANSFORM,快速傳立業(yè)轉(zhuǎn)換)演算未予的撰寫,這將會影響MULTI-TONE訊號上PEAK值的偵測。另外,以RS-232為I/O介面,并呼叫客戶所提供之DLL檔來與DUT內(nèi)的IC溝通,但因LAB VIEW無法直接呼叫其STRUCTURE,故需用VC++再編譯一層新的DLL來供LAB VIEW使用。
上傳時間: 2013-12-13
上傳用戶:longlong12345678
Mega16是一款采用先進(jìn)RISC精簡指令,內(nèi)置A/D的8位單片機(jī),可支持低電壓聯(lián)機(jī) Flash和EEPROM 寫入功能;同時還支持 Basic和C 等高級語言編程。用它設(shè)計電子時鐘不僅成本低,硬件簡單,而且很容易實(shí)現(xiàn)系統(tǒng)移植。介紹了如何利用AVR系列單片機(jī)Mega16及1602字符液晶來設(shè)計電子時鐘的方法,同時給出了相應(yīng)的電路原理及部分語言程序。 Abstract: ?Mega16 is a high-performance, low power consumption, the use of advanced RISC concise instructions, built-in A/D 8-bit microcontrollers, the on-line support for low-voltage Flash, EEPROM write function. Except Mega16 also support the Basic, C, and other high-level language programming.The electronic clock which is deisgned by Mega16 is not only low-cost, simple hardware, but easy to achieve system migration.The design method of electrioic clock based on the AVR Mega16 and character LCD1602 is introduced in this paper,and the corresponding circuit electrionic and some language program are given.
上傳時間: 2014-12-27
上傳用戶:zl5712176
The PCF8578 is a low power CMOS1 LCD row and column driver, designed to drive dotmatrix graphic displays at multiplex rates of 1:8, 1:16, 1:24 or 1:32. The device has40 outputs, of which 24 are programmable and configurable for the following ratios ofrows/columns: 32¤8, 24¤16, 16¤24 or 8¤32. The PCF8578 can function as a stand-alone LCDcontroller and driver for use in small systems. For larger systems it can be used inconjunction with up to 32 PCF8579s for which it has been optimized. Together these twodevices form a general purpose LCD dot matrix driver chip set, capable of driving displaysof up to 40960 dots. The PCF8578 is compatible with most microcontrollers andcommunicates via a two-line bidirectional bus (I2C-bus). Communication overhead isminimized by a display RAM with auto-incremented addressing and display bankswitching.
標(biāo)簽: 8578 PCF LCD 圖形點(diǎn)陣
上傳時間: 2013-10-23
上傳用戶:頂?shù)弥?/p>
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1