RC_Ch08(1)
- 格式:pdf
- 大小:118.78 KB
- 文档页数:6
CRC源码大全〖文章转载或出处〗≡中国电子技术信息网≡网址:CRC源码大全循环冗余校验码(Cylclic Redundancy Check Code),简称CRC码。
常用的CRC数有8,16,32,CRC位数越大,数据越不易受干扰,但运算时间加长。
一般关于通信的书籍都有介绍。
简单原理是将要传输的数据视为一堆连续位组成的一整个数值,并将此数值除一个特定的除数,通常以二进制表示,此除数称为衍生多项式(Generation Polynomial).一般数据量不大时,使用Checksume验错方式就行了;数据量大时,就用CRC了;据理论统计,用CRC16时,超过17个连续位的错误侦测率为99。
9969%,小于此的为100%。
1、CRC-12 的生成多项式为:P(x)=X^12+X^11+X^3+X^2+12、CRC MOV DPH, #table ; 指向余式表下半区MOV DPL, R0 ; 指向对应单元CLR A ;MOVC A, @A+DPTR ; 读余式的高字节XRL A, R1 ; 计算余式的高字节MOV R0, A ; 存入R0INC DPH ; 指向余式表上半区CLR A ;MOVC A, @A+DPTR ; 读余式的低字节XRL A, R2 ; 计算余式的低字节MOV R1, A ; 存入R1RET这个是对于三字节的东东,你自己还要造张余式表3、很简单的查表法unsigned int UpdateCRC(unsigned char byte,unsigned int crc);#include <stdio.h>#include "crc16.h"static code unsigned int Crc16Table[256] ={0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 };unsigned int UpdateCrc16(unsigned char Octet,unsigned int CRC) {return Crc16Table[ (CRC >> 8) & 255] ^ (CRC << 8) ^ Octet;}unsigned int UpdateCRC(unsigned char Octet,unsigned int CRC) {return (CRC << 8) ^ Crc16Table[ (CRC >> 8) ^ Octet ];}4、_CRC:MOV A,R7 ;CRC INPUT POINTERMOV R1,AMOV B,R5MOV DPH,R6;#SRCADR ;CRC INPUT PAGE ADDRESS MOV DPL,R1MOV RCRC2L,#0MOV RCRC1H,#0MOV RCRC1L,#0CRCA:MOVX A,@DPTRXRL A,RCRC1HXRL A,RCRC2LMOV RXTEMP,AMOV RCRC2L,RCRC1LMOV DPTR,#CRCTAB1MOVC A,@A+DPTRMOV RCRC1H,AMOV A,RXTEMPINC DPHMOVC A,@A+DPTRMOV RCRC1L,AMOV DPH,R6;#SRCADR ;CRC INPUT PAGE ADDRESS INC R1MOV DPL,R1MOV A,R1CJNE A,B,CRCAMOV A,RCRC1HXRL A,RCRC2LCPL AMOV RCRC1H,AMOV A,RCRC1LCPL AMOV RCRC1L,AMOV R6,RCRC1HMOV R7,RCRC1LRET;-------------------------------------------CRCTAB1:DB 000H,089H,012H,09BH,024H,0ADH,036H,0BFHDB 048H,0C1H,05AH,0D3H,06CH,0E5H,07EH,0F7H DB 081H,008H,093H,01AH,0A5H,02CH,0B7H,03EHDB 0C9H,040H,0DBH,052H,0EDH,064H,0FFH,076H DB 002H,08BH,010H,099H,026H,0AFH,034H,0BDH DB 04AH,0C3H,058H,0D1H,06EH,0E7H,07CH,0F5H DB 083H,00AH,091H,018H,0A7H,02EH,0B5H,03CH DB 0CBH,042H,0D9H,050H,0EFH,066H,0FDH,074H DB 004H,08DH,016H,09FH,020H,0A9H,032H,0BBH DB 04CH,0C5H,05EH,0D7H,068H,0E1H,07AH,0F3H DB 085H,00CH,097H,01EH,0A1H,028H,0B3H,03AH DB 0CDH,044H,0DFH,056H,0E9H,060H,0FBH,072H DB 006H,08FH,014H,09DH,022H,0ABH,030H,0B9H DB 04EH,0C7H,05CH,0D5H,06AH,0E3H,078H,0F1H DB 087H,00EH,095H,01CH,0A3H,02AH,0B1H,038H DB 0CFH,046H,0DDH,054H,0EBH,062H,0F9H,070H DB 008H,081H,01AH,093H,02CH,0A5H,03EH,0B7H DB 040H,0C9H,052H,0DBH,064H,0EDH,076H,0FFH DB 089H,000H,09BH,012H,0ADH,024H,0BFH,036H DB 0C1H,048H,0D3H,05AH,0E5H,06CH,0F7H,07EH DB 00AH,083H,018H,091H,02EH,0A7H,03CH,0B5H DB 042H,0CBH,050H,0D9H,066H,0EFH,074H,0FDH DB 08BH,002H,099H,010H,0AFH,026H,0BDH,034H DB 0C3H,04AH,0D1H,058H,0E7H,06EH,0F5H,07CH DB 00CH,085H,01EH,097H,028H,0A1H,03AH,0B3H DB 044H,0CDH,056H,0DFH,060H,0E9H,072H,0FBH DB 08DH,004H,09FH,016H,0A9H,020H,0BBH,032H DB 0C5H,04CH,0D7H,05EH,0E1H,068H,0F3H,07AH DB 00EH,087H,01CH,095H,02AH,0A3H,038H,0B1H DB 046H,0CFH,054H,0DDH,062H,0EBH,070H,0F9H DB 08FH,006H,09DH,014H,0ABH,022H,0B9H,030H DB 0C7H,04EH,0D5H,05CH,0E3H,06AH,0F1H,078HCRCTAB2:DB 000H,011H,023H,032H,046H,057H,065H,074HDB 08CH,09DH,0AFH,0BEH,0CAH,0DBH,0E9H,0F8H DB 010H,001H,033H,022H,056H,047H,075H,064HDB 09CH,08DH,0BFH,0AEH,0DAH,0CBH,0F9H,0E8H DB 021H,030H,002H,013H,067H,076H,044H,055HDB 0ADH,0BCH,08EH,09FH,0EBH,0FAH,0C8H,0D9H DB 031H,020H,012H,003H,077H,066H,054H,045HDB 0BDH,0ACH,09EH,08FH,0FBH,0EAH,0D8H,0C9H DB 042H,053H,061H,070H,004H,015H,027H,036HDB 0CEH,0DFH,0EDH,0FCH,088H,099H,0ABH,0BAH DB 052H,043H,071H,060H,014H,005H,037H,026HDB 0DEH,0CFH,0FDH,0ECH,098H,089H,0BBH,0AAH DB 063H,072H,040H,051H,025H,034H,006H,017HDB 0EFH,0FEH,0CCH,0DDH,0A9H,0B8H,08AH,09BH DB 073H,062H,050H,041H,035H,024H,016H,007HDB 0FFH,0EEH,0DCH,0CDH,0B9H,0A8H,09AH,08BH DB 084H,095H,0A7H,0B6H,0C2H,0D3H,0E1H,0F0H DB 008H,019H,02BH,03AH,04EH,05FH,06DH,07CH DB 094H,085H,0B7H,0A6H,0D2H,0C3H,0F1H,0E0H DB 018H,009H,03BH,02AH,05EH,04FH,07DH,06CH DB 0A5H,0B4H,086H,097H,0E3H,0F2H,0C0H,0D1H DB 029H,038H,00AH,01BH,06FH,07EH,04CH,05DH DB 0B5H,0A4H,096H,087H,0F3H,0E2H,0D0H,0C1H DB 039H,028H,01AH,00BH,07FH,06EH,05CH,04DH DB 0C6H,0D7H,0E5H,0F4H,080H,091H,0A3H,0B2H DB 04AH,05BH,069H,078H,00CH,01DH,02FH,03EH DB 0D6H,0C7H,0F5H,0E4H,090H,081H,0B3H,0A2H DB 05AH,04BH,079H,068H,01CH,00DH,03FH,02EH DB 0E7H,0F6H,0C4H,0D5H,0A1H,0B0H,082H,093H DB 06BH,07AH,048H,059H,02DH,03CH,00EH,01FH DB 0F7H,0E6H,0D4H,0C5H,0B1H,0A0H,092H,083H DB 07BH,06AH,058H,049H,03DH,02CH,01EH,00FHend5、uint crc(uchar * byte,uchar nbyte) //CRC校验{uint data itemp=0;uchar data i,j;bit flag;for(i=0;i<nbyte;i++){itemp^=(byte[i]<<8);for (j=0;j<8;j++){flag=itemp&0x8000;itemp<<=1;if(flag){itemp^=0x1021;}}}return itemp;}6、CREATCRC: ; ----- CRC-16 ----- MOV R2,#00HMOV R3,#00HCRCATER2: MOV A,@R0XRL A,R3LCALL CRCCRT1XRL A,R2MOV R3,AMOV R2,BINC R0DJNZ R5,CRCA TER2MOV @R0,BINC R0MOV @R0,ARETCRCCRT1:MOV R7,#08HMOV B,#00HCRT1LOP1: CLR CPUSH ACCMOV A,BRLC AMOV B,APOP ACCRLC AJNC CRT1LOP2PUSH ACCMOV A,BXRL A,#CRCGENLMOV B,APOP ACCXRL A,#CRCGENHCRT1LOP2: DJNZ R7,CRT1LOP1 RETRECEIVE:SETB F0LCALL CREATCRCMOV A,CCRC1XRL A,@R0JNZ ERRORCRCINC R0MOV A,CCRC2XRL A,@R0JNZ ERRORCRCLJMP EENDERRORCRC: CLR F0EEND: RET7、1) 求CRC码的运算采用模2运算, 所谓模2运算就是不带进位和借位, 因此加法和减法等价,实际上就是逻辑上的异或运算, 除法可以用多次模2减法实现.2) 所谓CRC码, 就是把数据块左移16位, 然后除以0x11021所得到的余数(由CCITT推荐).3) 据此写出以下的CRC的C程序. *ptr指向发送数据块的首地址, len是数据块以字节为单位的长度.uint cal_crc(uchar *ptr, uchar len) {uint crc;uchar i;crc=0;while(len--!=0) {for(i=0x80; i!=0; i/=2) {if((crc&0x8000)!=0) {crc*=2; crc^=0x1021;}else crc*=2;if((*ptr&i)!=0) crc^=0x1021;}ptr++;}return(crc);}7、;CRC校验算法START EQU 2000H ;数据区首址(任意设置128字节数据)。
I-7017R - 8-ch Voltage and Current Input DAQ Module - QuickStart (May/2020)ICP DAS USA, Inc. | | 1-310-517-9888 | 24309 Narbonne Ave. Suite 200. Lomita, CA 90717I-7017R8 Channels Voltage & Current InputData Acquisition ModuleQuick Start GuideProduct Website:https:///i_7017_r.html/dcon_utility_pro.htmlIntroductionThe I-7017R is an 8-channel analog input module with an extremely high quality protection mechanism where the overvoltage protection is 240 Vrms. The input type includes both voltage and current. The sampling rate of the I-7017R is adjustable, meaning that either fast mode or normal mode can be selected. The I-7017R also has 4 kV ESD protection as well as 3000 VDC intra-module isolation. The I-7017R-A5 is an 8-channel analog input module that is especially designed for high voltage input, and has an input range of between -50 V ~ +50 V or -150 V ~ +150 V.Packing ListI-7017RPlastic RailCDQuick Start GuideI-7017R - 8-ch Voltage and Current Input DAQ Module - QuickStart (May/2020)ICP DAS USA, Inc. | | 1-310-517-9888 | 24309 Narbonne Ave. Suite 200. Lomita, CA 90717⏹Internal I/O Structure < I-7017R >⏹Pin Assignments < I-7017R, I-7017R >⏹Internal I/O Structure (I-7017R)⏹Modbus Table (M-7017R only)Address Description R/W 10129 ~Over/under range status of channel 0R 10136to 7 for 4 ~ 20mA or 0 ~ 20mA ranges 00129 ~0013630001 ~Analog input value of channel 0 to 7R 3000840001 ~4000840481Firmware version (low word)R 40482Firmware version (high word)R 40483Module name (low word)R 40484Module name (high word)R 40485Module address, valid range: 1 ~ 247R/W 40486Bits 5:0R/WBaud rate, 0x03 ~ 0x0ACode0x030x040x050x06Baud1200240048009600Code0x070x080x090x0ABaud192003840057600115200Bits 7:600: no parity, 1 stop bit01: no parity, 2 stop bit10: even parity, 1 stop bit11: odd parity, 1 stop bit40487Type code R/W Address Description R/W 40488Modbus response delay time in ms,R/W valid range: 0 ~ 3040489Host watchdog timeout value, 0 ~R/W 255, in 0.1s40490Channel enable/disable, 00h ~ FFh R/W 40492Host watchdog timeout count, write 0R/W to clear00257Protocol, 0: DCON, 1: Modbus RTU R/W 00259Filter setting, 0: 60Hz rejection, 1:R/W 50Hz rejection002611: enable, 0: disable host watchdog R/W 00269Modbus data format, 0: hex, 1:R/W engineering00270Host watch dog timeout status, write R/W1 to clear host watch dog timeoutstatus002711: enable, 0: disable fast mode R/W 00273Reset status, 1: first read after R powered on, 0: not the first read afterpowered on⏹DCON ProtocolFunctions Command Response NotesRead module name$AAM!AA(Data)AA: address number Read module firmware version$AAF!AA(Data)Read all analog input data#aa>(data)Read analog input data of each channel (<=16 channel)#aai>(data)i: channel number (Hex) Read analog input data of each channel (>16 channel)#aaii>(data)ii: channel number (Hex) If you want to know the detail DCON protocol, please check it from CD or webCD path: \\napdos\7000\manual\Web: ftp:///pub/cd/8000cd/napdos/7000/manual/I-7017R - 8-ch Voltage and Current Input DAQ Module - QuickStart (May/2020)ICP DAS USA, Inc. | | 1-310-517-9888 | 24309 Narbonne Ave. Suite 200. Lomita, CA 90717I-7017R - 8-ch Voltage and Current Input DAQ Module - QuickStart (May/2020)ICP DAS USA, Inc. | | 1-310-517-9888 | 24309 Narbonne Ave. Suite 200. Lomita, CA 90717⏹Module test and configurationStep 1: INIT switch Operation Step 2: Install & Run DCON Utility 1. Please Install DCON Utility firstYou can find the software in the CD.CD path:<Driver>:\napdos\driver\dcon_utility\Web link:/pub/cd/8000cd/napdos/driver/dcon_utility/ 2. Run DCON utility1. Find out the INIT switch( back of the module),and turn to INIT.2. Reboot the moduleStep 3: Set search configuration & search module Select COM Port Number1. Click “COM Port”2. Assign the communication information and click“OK”Module Default Setting COM Port Refer converter Port Number Baud Rate 9600ProtocolDCON for I-7000Modbus RTU for M-7000Parity Option N,8,13. Click “Search” and select “Start Searching”Software will search the modules from COM Port 4. Click “Search“ and select “stop searching”Manual stop when the modules searchedNote:When no module can be searched, please check the wire and communication informationStep 4: Select Module for testing and configurationDouble click “select module”Step 5: Configuration Settings & Channel SettingsChannel StatusModule SettingsProtocol DCON / ModbusAddress1~255 (0:INIT)Baud rate1200~115200Parity option N,8,1Input range Depends on signalsourcesStep 6: Change to normal mode and keep the settings1.Turn the INIT Switch to Normal.2.Reboot the moduleI-7017R - 8-ch Voltage and Current Input DAQ Module - QuickStart (May/2020)ICP DAS USA, Inc. | | 1-310-517-9888 | 24309 Narbonne Ave. Suite 200. Lomita, CA 90717Trouble ShootingQ1. How to do when forgot module address or baud rate?Please turn to INIT mode, and run DCON Utility to search.The module supports DCON protocol at the INIT mode.And the address is 0. The communication setting is “9600,N,8,1”.Q2. How to configure the I-7000 and M-7000 modules?ICP DAS provide DCON Utility to configure I-7000 and M-7000 modules.Please download the last version from: /pub/cd/8000cd/napdos/driver/dcon_utility/Q3. How to calibrate the analog input module?Usually it is not necessary to calibrate the analog input module.However, in case you need to perform this operation, we provide a function to calibrate the module.Please refer to user manual 1.10.Notice:1.Please update DCON Utility to version 5.2.3 or more.2.Keep the module running more than 30 minutes to warm-up.Q4. How to measure the current?I-7017R and I-7017R require optional external resistance (125Ω) for current measurement.Please refer wired connections diagram.And then select a suitable input range by DCON Utility.Or please use our I-7017RC or I-7017RC modules.Q5. How to programming with I-7000 or M-7000 by C#, VB, VC?ICP DAS I-7000 and M-7000 series both support DCON protocol. And Only M-7000 series supports Modbus protocol.For DCON protocol, please download SDK and Demo from:/pub/cd/8000cd/napdos/driver/dcon_dll_new/For Modbus protocol, please refer this web link:/products/PAC/i-8000/modbus.htmIfthereisanyotherquestion,pleasefeelfreetocontactus.Email:******************Website: /contact_us/contact_us.htmlI-7017R - 8-ch Voltage and Current Input DAQ Module - QuickStart (May/2020)ICP DAS USA, Inc. | | 1-310-517-9888 | 24309 Narbonne Ave. Suite 200. Lomita, CA 90717。
HC-08蓝牙串口通信模块用户手册V3.3版本信息软件版本:HC-08V3.3硬件版本:V2.0/V2.6发布日期2021年03月01日修改记录1.更新“A T+VERSION”指令。
(2014.08.22)2.更新“A T+BAUD”指令。
(2014.08.22)3.增加“A T+RX”指令。
(2014.08.22)4.增加“A T+DEFAUL T”指令。
(2014.08.22)5.增加“A T+RESET”指令。
(2014.08.22)6.增加“A T+ROLE”指令,取消原34引脚设置角色功能。
(2014.08.22)7.增加“A T+ADDR”指令。
(2014.08.22)8.增加“A T+MODE”指令,增加低功耗、超低功耗模式。
(2014.08.22)9.增加“A T+RFPM”指令。
(2014.08.22)10.增加“A T+CONT”指令。
(2014.08.22)11.增加“A T+A VDA”指令。
(2014.08.22)12.增加“A T+TIME”指令。
(2014.08.22)13.增加“A T+CLEAR”指令。
(2015.07.30)14.增加“A T+LED”指令。
(2016.09.15)15.增加“A T+AINT”指令。
(2016.09.15)16.增加“A T+CINT”指令。
(2016.09.15)17.增加“A T+CTOUT”指令。
(2016.09.15)18.增加“A T+LUUID”指令。
(2016.09.15)19.增加“A T+SUUID”指令。
(2016.09.15)20.增加“A T+TUUID”指令。
(2016.09.15)21.删除“A T+TIME”指令。
(2016.09.15)22.修改低功耗模式的描述。
(2017.04.18)23.修复不能自动进入低功耗的问题。
(2017.07.07)24.增加17脚(P1.1)作为连接指示输出。
(2017.07.07)25.增加“AT+AUST”指令。
Oracle的to_d ate函数日期格式参数含义说明D 一周中的星期几DAY天的名字,使用空格填充到9个字符DD 月中的第几天DDD 年中的第几天DY天的简写名IW ISO标准的年中的第几周IYYY ISO标准的四位年份YYYY四位年份YYY,YY,Y年份的最后三位,两位,一位HH 小时,按12小时计HH24 小时,按24小时计MI 分SS 秒MM 月Mon 月份的简写注:在不同的语言下显示出来的数据不同,在中文下显示为5月,在英文下显示为MAYMonth月份的全名W 该月的第几个星期WW 年中的第几个星期1.日期时间间隔操作当前时间减去7分钟的时间select sysdat e,sysdat e - interv al’7’MINUTE from dual当前时间减去7小时的时间select sysdat e - interv al’7’hourfromdual当前时间减去7天的时间select sysdat e - interv al’7’dayfromdual当前时间减去7月的时间select sysdat e,sysdat e - interv al’7’monthfrom dual当前时间减去7年的时间select sysdat e,sysdat e - interv al’7’yearfromdual时间间隔乘以一个数字select sysdat e,sysdat e - 8 *interv al’2’hourfromdual2.日期到字符操作select sysdat e,to_cha r(sysdat e,’yyyy-mm-ddhh24:mi:ss’)fromdualselect sysdat e,to_cha r(sysdat e,’yyyy-mm-ddhh:mi:ss’)fromdualselect sysdat e,to_cha r(sysdat e,’yyyy-dddhh:mi:ss’)fromdualselect sysdat e,to_cha r(sysdat e,’yyyy-mm iw-dhh:mi:ss’)fromdual参考orac le的相关关文档(ORACLE901DO C/SERVER.901/A90125/SQL_EL EMENT S4.HTM#48515)3. 字符到日期操作select to_dat e(’2003-10-1721:15:37’,’yyyy-mm-dd hh24:mi:ss’)fromdual具体用法和上面的to_char差不多。
南京凌鸥创芯电子有限公司LKS32MC08X Datasheet© 2020, 版权归凌鸥创芯所有机密文件,未经许可不得扩散1概述1.1功能简述LKS32MC08X系列MCU是32位内核的面向电机控制应用的专用处理器,集成了常用电机控制系统所需要的所有模块。
⚫性能➢96MHz 32位Cortex-M0内核➢集成自主指令集电机控制专用DSP➢超低功耗休眠模式,低功耗休眠电流10uA➢工业级工作温度范围➢超强抗静电和群脉冲能力⚫工作范围➢ 2.2V~5.5V电源供电,内部集成1个LDO,为数字部分电路供电➢工作温度: -40~105℃,LKS32MC085工作温度: -40~125℃⚫时钟➢内置4MHz高精度RC时钟,-40~105℃范围内精度在±1%之内➢内置低速32KHz 低速时钟,供低功耗模式使用➢可外挂4MHz外部晶振➢内部PLL可提供最高96MHz时钟⚫外设模块➢两路UART➢一路SPI,支持主从模式➢一路IIC,支持主从模式➢一路CAN(部分型号不带CAN)➢2个通用16位Timer,支持捕捉和边沿对齐PWM功能➢2个通用32位Timer,支持捕捉和边沿对齐PWM功能;支持正交编码输入,CW/CCW输入,脉冲+符号输入➢电机控制专用PWM模块,支持8路PWM输出,独立死区控制➢Hall信号专用接口,支持测速、去抖功能➢硬件看门狗➢最多4组16bit GPIO。
P0.0/P0.1/P1.0/P1.1 4个GPIO可以作为系统的唤醒源。
P0.15 ~ P0.0 共16个GPIO可以用作外部中断源输入。
⚫模拟模块➢集成1路12bit SAR ADC,同步双采样,3Msps采样及转换速率,最多支持13通道➢集成4路运算放大器,可设置为差分PGA模式➢集成两路比较器,可设置滞回模式➢集成12bit DAC 数模转换器➢内置±2℃温度传感器➢内置1.2V 0.5%精度电压基准源➢内置1路低功耗LDO和电源监测电路➢集成高精度、低温飘高频RC时钟➢集成晶体起振电路1.2性能优势➢高可靠性、高集成度、最终产品体积小、节约BOM成本;➢内部集成4路高速运放和两路比较器,可满足单电阻/双电阻/三电阻电流采样拓扑架构的不同需求;➢内部高速运放集成高压保护电路,可以允许高电压共模信号直接输入芯片,可以用最简单的电路拓扑实现MOSFET电阻直接电流采样模式;➢应用专利技术使ADC和高速运放达到最佳配合,可处理更宽的电流动态范围,同时兼顾高速小电流和低速大电流的采样精度;➢整体控制电路简洁高效,抗干扰能力强,稳定可靠;➢单电源2.2V~5.5V供电,确保了系统供电的通用性;适用于有感BLDC/无感BLDC/有感FOC/无感FOC及步进电机、永磁同步、异步电机等控制系统。
The chemically-resistant, microprocessor-controlled series FEM 08__.18/S and FEM 08__.18/RC diaphragm metering pumps meter the smallest volumes continuously and evenly. Thanks to a special drive technology, these pumps feature a remarkably wide metering range of 1:1000.Metering Pumps STEPDOS ®08:FEM 08 __.18/S,FEM 08 __.18/RCMaterial in contact with the pumped media Type Pump Diaphragm Valves OrderNo.head FEM 08 KT .18/S PP PTFE-coated FFPM FEM 08 TT .18/S PVDF PTFE-coated FFPM FEM 08 FT .18/S PTFE PTFE-coated FFPM FEM 08 ST .18/S Stainless Steel PTFE-coated FFPM FEM 08 KT .18/RC PP PTFE-coated FFPM FEM 08 TT.18/RC PVDF PTFE-coated FFPM FEM 08 FT .18/RC PTFEPTFE-coated FFPM FEM 08 ST .18/RC Stainless SteelPTFE-coatedFFPM˾Reproducibility +/- 1%˾Integrated solenoid valve ensures the liquid does notdrip or flow back during stopDescription OrderNo.Foot switch069875Accessories1)Water at 20°C and zero pressure headT echnical data:Flow rate 1)0.08-80 ml/min Pressure head 20 mWg (2 bar)Suction head4 mWgMetering volumes 80 µl-115.2 l Time metering0.34 s - 24h Repeated metering 1-65000Pause time 1 s-24 h Reproducibility+/- 1 %Permissible liquid temperature 5-80 °C Permissible ambient temperature 5-40 °CConnectorsfor tube 4/6 mmm (KT , TT)and NPT 1/8“ inside thread (FT , ST)Mains 100-230V , 50/60Hz Weight approx. 1.5 kgHousingIP 65 (splash proof)Dimensions (LxHxW)185/115/82 mmSupply with software and PC cableKNF FLODOS AG, Wassermatte 2, CH-6210 Sursee, T el.++41(0)419250025,Fax++41(0)419250035,www.knf-flodos.ch,E-Mail:******************Dimensions (mm)Dimensions and performance characteristicsFlow rateFunction of the diaphragm metering pump STEPDOS 081 Solenoid valve2 Outlet valve3 Diaphragm4 Head5 Drive housingT echnology with long-term precisionA stepper motor and integrated solenoid valve conti-nuously ensure controlled movement in the pump head.The result is exact, practically pulsation-free, careful mete-ring. The liquid is released slowly and evenly, while the suction stroke always occurs at maximum speed. Thus,the liquid is metered virtually continuously and very quiet-ly, without pressure peaks.Pump performance characteristics for a dose of 1 ml/minVolumeTime3 2 1 0 0,5 1 1,5 2F l o w r a t e (m l /m i n )Suction height (mWg)Pressure head (mWg)。
单元一(1)HC08单片机介绍及Codewarrior使用一、单片机基本概念1.何谓单片机一台能够工作的计算机要有这样几个部份构成:CPU(进行运算、控制)、RAM(数据存储)、ROM(程序存储)、输入/输出设备(例如:串行口、并行输出口等)。
在个人计算机上这些部份被分成若干块芯片,安装一个称之为主板的印刷线路板上。
而在单片机中,这些部份,全部被做到一块集成电路芯片中了,所以就称为单片(单芯片)机,而且有一些单片机中除了上述部份外,还集成了其它部份如A/D,D/A等。
PC中的CPU一块就要卖几百块钱,这么多东西做在一起,是不是很贵?说这块芯片体积是不是很大呢?恰恰相反,单片机的价格并不高,从几元人民币到几十元人民币,体积也不大,一般用40脚封装,当然功能多一些单片机也有引脚比较多的,如68,84,100引脚,功能少的10多个或20多个引脚,有的甚至只有8个引脚。
为什么会这样呢?因为功能有强弱。
比如,市场上面有的组合音响一套才卖几百块钱,可是有的一台功放机就要卖好几千。
另外这种芯片的生产量很大,技术也很成熟,如51系列的单片机已经做了十几年,所以价格就很低了。
单片机的功能肯定不强,干吗要学它呢?实际工作中并不是任何需要计算机的场合都要求计算机有很高的性能,一个控制电冰箱温度的计算机难道要用PIII?应用的关键是看是否够用,是否有很好的性能价格比。
所以8051出来十多年,依然没有被淘汰,还在不断的发展中。
2.常用的单片机(1)51系列51系列单片机是Intel公司在20世纪80年代初研制出来的,很快就在我国得到推广和广泛的应用。
20多年来,51系列单片机在教学、工业控制、仪器仪表和信息通信中发挥着重要的作用,并在交通、航运和家用电器等领域取得了大量的应用成果。
20世纪80年代中期以后,Intel公司以专利转让的形式把8051内核给了许多半导体厂家,如Arotel、Philps、Ananog Devlces和Dallas等。
Chapter 8 Foundations of PlanningTRUE/FALSE QUESTIONSWHAT IS PLANNING?2. Organizational planning is concerned with how objectives are to be accomplished, not what is to beaccomplished.(False; easy; p. 158)3. If a manager refuses to write anything down or share his plans with others in the organization, he is not trulyplanning.(False; moderate; p. 158)WHY DO MANAGERS PLAN?5. According to the textbook, research indicates that nonplanning organizations generally outperform planningorganizations.(False; moderate; p. 159)6. Planning establishes the goals and standards by which managers control their organization.(True; difficult; p. 159)HOW DO MANAGERS PLAN?8. Operational planning is usually performed by upper management.(False; moderate; p. 168)9. Operational plans specify the details of how the achievement of the overall objectives is to be obtained.(True; difficult; p. 162)10. Directional plans have clearly defined objectives.(False; moderate; p. 163)11. Standing plans create guidance for regularly occurring activities and events.(True; moderate; p. 163)ESTABLISHING GOALS AND DEVELOPING PLANS13. In traditional goal settings, goals often lose clarity and unity as they make their way from the top to thebottom of the organization.(True; moderate; p. 164)14. In a rapidly changing environment, well-defined and precisely developed action plans enhance organizationalperformance.(False; moderate; p. 163)15. Planning is a waste of time in a volatile environment.(False; easy; p. 163)20. In a typical MBO program, successful achievement of objectives is reinforced by performance-based rewards.(True; difficult; p. 165)23. A well-designed goal should be written in terms of outcomes, not actions, and the goals should be measurable.(True; easy; p. 166)MULTIPLE-CHOICE QUESTIONSFor each of the following, choose the answer that most completely answers the question.WHAT IS PLANNING?28.Planning involves defining the organization’s goals, establishing an overall strategy for achieving thosegoals, and developing a comprehensive set of plans _____________.a.as to which shift will perform what work functionsb.to determine which manager will be over which departmentc.to integrate and coordinate organizational workd.to establish the quality and quantity of work to be accomplished(c; difficult; P. 158)rmal planning is _________.a.performed at the lowest organizational levelb.general and lacks continuityc.developed in informal meetings at a resortd.specific and is developed by the middle managers for their department(b; easy; p. 158)30.In formal planning, _________.a.specific goals covering a period of years are definedb.specific goals are developed and not writtenc.general goals are developed and not writtend.general goals covering an unspecified period of years are defined(a; easy; p. 158)32. In informal planning, __________ sharing of goals with others in the organization.a. everything may be written down, but there is little or nob. everything is written down, and there isc. nothing is written down, and there is little or nod. nothing is written down, therefore management does a lot of(c; difficult; p. 158)WHY DO MANAGERS PLAN?33.Planning gives direction, reduces the impact of change, minimizes waste and redundancy, and __________.a.establishes the workloads for each of the departmentsb.sets the basis used for promotion of individuals within the organizationc.eliminates departments that are found to not be needed within the pland.sets the standards used in controlling(d; moderate; p. 159)34.The quality of the planning process and the appropriate implementation of the plans probably ___________.a.don’t contribute to high performance nearly as much as the extent of planningb.contribute more to high performance than does the extent of planningc.contribute less to high performance than does the extent of planningd.should be studied more to factually determine which contributes the most(b; difficult; p. 159)HOW DO MANAGERS PLAN?42. Planning involves two important elements: ___________.a. goals and decisionsb. goals and plansc. plans and decisionsd. goals and actions(b; moderate; p. 160)43. Official statements of what an organization says and what it wants its various stakeholders to believe arereferred to as ___________.a. real goalsb. stated goalsc. committed goalsd. comprehensive goals(b; moderate; p. 161)45. What should a person do to understand what the real objectives of the organization are?a. observe organizational member actionsb. attend a stockholders’ annual meetingc. read their annual reportd. watch television news reports(a; moderate; p. 162)46. When we categorize plans as being directional versus specific, we are categorizing them by ____________.a.breadthb.specificitya.frequency of used. depth(b; easy; p. 163)47. When we categorize plans as being single use versus standing, we categorize them by ____________.a. breadthb. specificityc.frequency of used. time frame(c; easy; p. 163)50. Which of the following is true concerning standing plans?a.They provide guidance for activities repeatedly performed in the organization.b.They provide guidance for 1–3 years.c.They specify general guidelines.d.They are specifically designed to meet the needs of a unique situation.(a; moderate; p. 163)51. A city’s policy concerning skateboarding on downtown sidewalks that provides guidance for police actionwould be considered what type of plan?a.standingb.contingencyc. directionald. single use(a; difficult; p. 163)54. Goals are objectives, __________.a. and we use the two terms interchangeablyb. but goals are long-term and objectives are short-termc. and goals are used by top management and objectives are used by first-level managementd. but goals are used in reference to profits, and objectives are used in reference to production output(a; easy; p. 160)55. Plans are documents that outline how goals are going to be met and ___________.a. define which department has what responsibilities needed to accomplish the goalsb. tell what materials and processes are necessary to fulfill the goalsc. identify how much capital is required to complete the goalsd. describe resource allocations, schedules, and other necessary actions to accomplish the goals(d; difficult; p. 160)59. The most popular ways to describe organizational plans are by their breadth, time frame, ____________.a. depth, and urgencyb. frequency, and urgencyc. specificity, and frequencyd. depth, and specificity(c; difficult; p. 162)60. Strategic plans are plans that apply to the entire organization, establish the organization’s overall goals, and____________.a. guide the organization toward maximizing organizational profits for the stockholdersb. attempt to satisfy all government regulations while maximizing profitsc. satisfy the organization’s stakeholdersd. seek to position the organization in terms of its environment(d; difficult; p. 162)63. Specific plans are clearly defined and ____________.a. allow managers to their interpretation for flexibilityb. leave no room for interpretationc. give the managers authority to interpret the plans for their area of responsibilityd. keep the stakeholders inform of the organization’s objectives(b; moderate; p. 163)64. Directional plans are ___________.a. flexible plans that set out general guidelinesb. stringent plans that establish specific directions for manager to followc. formal plans that provide the directions of how to assemble the productd. general plans that allow the workers to change the schedule of production(a; easy; p. 163)65. Standing plans are ongoing plans that provide ____________.a. general directions of how to accomplish an identifiable taskb. stakeholders identifiable goals that the organization will always strive to achievec. the stockholders identifiable goals that the organization will always strive to achieved. guidance for activities performed repeatedly(d; moderate; p. 163)68. The conflict in stated goals exists because organizations respond to a variety of _______________.a. stakeholdersb. external environmentsc. governmental regulationsd. stockholders(a; difficult; p. 161)71. __________ is a one-time plan specifically designed to meet the needs of a unique situation.a. Multipurpose planb. Strategic planc. Operational pland. Single-use plan(d; easy; p. 163)ESTABLISHING GOALS AND DEVELOPING PLANS75. Management by objectives is a management system in which the first steps are setting specific performancegoals that are _____________.a. established that can be easily accomplishedb. jointly determined by employees and their managersc. determined by top management with clarity so that the objective are clear to even the most incompetentemployeed. developed in such a manner that the employees are self-directed and do not need supervision(b; moderate; p. 165)77. According to the textbook, one of the potential problems of MBO programs is that ____________.a. there may be an overemphasis on the employee accomplishing their goals without regards to others inthe work unitb. they may not be as effective in times of dynamic environmental changec. employees do not take goal setting seriously enoughd. all of the above(d; moderate; p. 165)80. A well-designed goal should be measurable, have a specified time frame, and be ____________.a.written downb.nearly unattainable, so that even if the unit or employee misses their goal, performance is still very highmunicated to anyone who needs to knowd.both a and c(d; moderate; p. 166)82. When the hierarchy of organizational goals is clearly defined, it forms an integrated network of goals,or ____________.a. hierarchical-link chainb. means-ends chainc. weakest-link chaind. level-level chain(b; easy; p. 164)87. In the traditional approach to planning, planning was done entirely by top-level managers who were oftenassisted by ____________.a.business level managersb.functional level managersc. a mixture of managers from the line, functional, and business leveld. a group of planning specialists(d; easy; p. 169)CONTEMPORARY ISSUES IN PLANNING92. According to your textbook, in an uncertain environment, managers want to develop _________ plans.a.general and flexibleb.specific but flexiblec.formald.contingency(b; moderate; p. 172)94. In an uncertain environment, managers want to develop plans that are ____________.a. flexible but manageableb. specific and long rangingc. directional but flexibled. specific but flexible(d; moderate; p. 171)96. According to your textbook, in order to manage effectively in dynamic environment, managers mustrecognize that planning is _____________.a. an ongoing processb. not renewable from one planning period to the nextc. best left to the formal planning departmentd. best done at the beginning of a new year(a; easy; p. 172)。