sbit CS = P1^0 sbit SCK = P1^6 sbit SIN = P1^7 sbit SOUT = P1^5 sbit WP = P1^1 void XReady(void) void XSendByte(unsigned char b) unsigned char XGetByte(void) void XWriteEn(void) void XWriteDis(void) unsigned char XReadStatus(void) void XWipPoll(void) void XWriteStatus(unsigned char b) void XReadData(unsigned char *m,unsigned char x,unsigned char n) void XWriteData(unsigned char *m,unsigned char x,unsigned char n) #define XResetDog() {CS=0 CS=1 } void InitX5045(void)
上傳時間: 2014-01-17
上傳用戶:lijinchuan
1. This BSP can support 2443EVT0 board. If you want to use EVT0 BSP, set followings. In smdk2443\smdk2443.bat file set BSP_EVT1=1 -> set BSP_EVT1= In smdk2443\src\inc\bsp_cfg.h file #define EVT1 -> #define EVT0 2. Default system tick mode is changed. The value is fixed tick. Fixed tick means that tick interrupt is occurred every 1ms. Variable tick means that timer interrupt period is changed when power mode is in idle. For changing to variable tick In smdk2443\src\inc\bsp_cfg.h file #define FIXEDTICK -> #define VARTICK In smdk2443\src\Common\Timer\Sources file SOURCES= timer_fixedtick.c watchdog.c -> SOURCES= timer_vartick.c watchdog.c
標簽: EVT0 followings BSP support
上傳時間: 2014-01-27
上傳用戶:fnhhs
include <stdio.h> /*標準輸入輸出定義*/ #include <stdlib.h> /*標準函數庫定義*/ #include <unistd.h> /*Unix標準函數定義*/ #include <sys/types.h> /**/ #include <sys/stat.h> /**/ #include <fcntl.h> /*文件控制定義*/ #include <termios.h> /*PPSIX終端控制定義*/ #include <errno.h> /*錯誤號定義*/ #define TRUE 1 #define FALSE 0 /***@brief 設置串口通信速率 *@
標簽: include stdlib inclu stdio
上傳時間: 2017-05-07
上傳用戶:ljt101007
基于單片機的10根線束線纜檢測器的源程序 #pragma sfr #pragma DI #pragma EI #pragma NOP //#pragma interrupt INTTM010 isr_INTTM000 #pragma interrupt INTTM80 isr_INTTM80 //#pragma interrupt INTTMH1 isr_INTTMH1 #pragma section @@CNST OPT AT 80H const char OPTION=0x94 typedef unsigned char uchar typedef unsigned int uint //==PORT define== #define SEND1_P P4.1 #define SEND2_P P4.2 #define SEND3_P P4.3 #define SEND4_P P4.4 #define SEND5_P P4.5 #define SEND6_P P4.6 #define SEND7_P P4.7 #define SEND8_P P13.0 #define SEND9_P P2.3 #define SEND10_P P2.2
標簽: pragma interrupt INTTM 010
上傳時間: 2017-05-25
上傳用戶:sunjet
10種軟件濾波方法的示例程序 1、限副濾波 /* A值可根據實際情況調整 value為有效值,new_value為當前采樣值 濾波程序返回有效的實際值 */ #define A 10 char value char filter() { char new_value new_value = get_ad() if ( ( new_value - value > A ) || ( value - new_value > A ) return value return new_value } 2、中位值濾波法 /* N值可根據實際情況調整 排序采用冒泡法*/
上傳時間: 2017-05-31
上傳用戶:270189020
BP神經網絡程序,C語言源代碼 如下: #include "iostream.h" #include "iomanip.h" #include "stdlib.h" #include "math.h" #include "stdio.h" #include "time.h" #include "fstream.h" #define N 120 //學習樣本個數 #define IN 3 //輸入層神經元數目 #define HN 2 //隱層神經元數目 #define ON 2 //輸出層神經元數目 #define Z 20000 //舊權值保存-》每次study的權值都保存下來 double P[IN] //單個樣本輸入數據 double T[ON] //單個樣本教師數據 double U11[IN][HN] //輸入層至第一隱層權值 double V[HN][ON] //隱層至輸出層權值 double X1[HN] //第一隱層的輸入 double Y[ON] //輸出層的輸入 double H1[HN] //第一隱層的輸出 double O[ON] //輸出層的輸出 double YU_HN1[HN] //第一隱層的閾值 double YU_ON[ON] //輸出層的閾值 double err_m[N] //第m個樣本的總誤差 double a //學習效率 double alpha //動量因子
標簽: include iostream iomanip stdlib
上傳時間: 2017-06-15
上傳用戶:xinzhch
移植uip-1.0到Atmega32 1)把 uip-1.0 的所有文件加入到工程,包括 uip 目錄的文件(除uip-split.c)、unix 目錄的文件、lib 目錄的文件; 2)修改 uip/uip-neighbor.c 文件的 void uip_neighbor_add(uip_ipaddr_t ipaddr, struct uip_neighbor_addr *addr) 函數,一般注釋掉 printf 語句即可,或者改為你自己的串口格式化打印實現。 3)uip 目錄里的源文件除 uipopt.h 外一般都無需修改;uipopt.h 包含了 uip-conf.h ,所以大部分修改可以在 uip-conf.h 里進行。 uip-conf.h 里加入如下定義,可以減少編譯的警告: #define notdef 0 #define UIP_CONF_IPV6 0 #define UIP_ARCH_ADD32 0 #define UIP_ARCH_CHKSUM 0 #define UIP_NEIGHBOR_CONF_ADDRTYPE 0 4)移植工作主要是 定時器中斷程序 與 網絡驅動 的編寫
上傳時間: 2013-12-20
上傳用戶:csgcd001
Capabilities of the latest version of MultiSpec include the following. Import data Display multispectral images Histogram Reformat Create new channels Cluster data define classes via designating rectangular Determine the best spectral features Classify a designated area in the data file List classification results
標簽: Capabilities MultiSpec following the
上傳時間: 2013-12-02
上傳用戶:源碼3
* TFTP client compatible with RFC-1350 * compile under visiual c++ or borland c++ * author email: yuyushine@163.com ***************************************************/ #define _VC /* if compile under visiual c++ else undefine this*/ #include <stdio.h> #include <winsock.h> #include <conio.h> #ifndef MAKEWORD #define MAKEWORD(l,h) ((WORD)(((BYTE)(l))|(((WORD)(BYTE)(h))<<8))) #endif #define WSA_MAJOR_VERSION 1 #define WSA_MINOR_VERSION 1 #define WSA_VERSION MAKEWORD(WSA_MAJOR_VERSION, WSA_MINOR_VERSION)
標簽: compatible borland compile visiual
上傳時間: 2014-01-15
上傳用戶:yuchunhai1990
Description Scientific calculator. Allows to perform caclulation with high precicion and implements most populatr mathematical functions: sin, cos, tan, asin, acon, atan, exp, log, sqr, floor and ceil. Also it make it possible to define your own function, store results in variables and use variable sin expressions. Calculator store al formuls you have entered. Plot function can be used to draw graph of function with single argument. More detailed description of calculator is here.
標簽: Description caclulation Scientific calculator
上傳時間: 2014-01-25
上傳用戶:familiarsmile