chx08_org04_isa_c4

合集下载

HCS08系列微控制器参考手册(中文)

HCS08系列微控制器参考手册(中文)

HCS08系列微控制器参考手册第一册苏州大学飞思卡尔嵌入式系统研发中心翻译 2009年11月目录第一章通用信息与结构框图 (1)1.1HCS08系列微控制器介绍 (1)1.2HCS08CPU编程模型 (2)1.3外设模块 (2)1.4MC9S08GB60的特点 (3)1.4.1 HCS08系列的共性 (3)1.4.2 MC9S08GB60的特点 (3)1.5MC9S08GB60的结构框图 (4)第二章引脚及其连接 (5)2.1简介 (5)2.2推荐的系统连接 (5)2.2.1 电源 (7)2.2.2 MC9S08GB60振荡器 (7)2.2.3 复位 (8)2.2.4 背景/模式选择(BKGD/MS) (8)2.2.5 通用I/O及外设端口 (8)第三章工作模式 (10)3.1简介 (10)3.2特征 (10)3.3运行模式 (10)3.4背景调试模式 (11)3.5等待模式 (12)3.6停止模式 (12)3.6.1 Stop1模式 (13)3.6.2 Stop2模式 (13)3.6.3 Stop3模式 (14)3.6.4 停止模式下激活BDM使能 (14)3.6.5 设置OSCSTEN位 (15)3.6.6 停止模式下LVD使能 (15)3.6.7 停止模式下的片上外设模块 (15)3.6.8 系统选择寄存器(SOPT) (17)3.6.9 系统电源管理状态和控制寄存器1(SPMSC1) (18)3.6.10 系统电源管理状态和控制寄存器2(SPMSC2) (19)第四章片上存储器 (21)4.1简介 (21)4.2HCS08核定义的存储器组织 (21)4.2.1 HCS08存储器组织 (21)4.2.2 MC9S08GB60存储映像 (22)4.2.3 复位和中断向量表 (23)4.3寄存器地址和位分配 (24)4.4RAM (29)4.560K字节的FLASH (29)4.5.1 特征 (30)4.5.2 写入、擦除和空白检测命令 (30)4.5.3 命令时间和突发模式写入 (32)4.5.3.1 行和FLASH的组织结构 (32)4.5.3.2 程序命令时序 (33)4.5.4 访问错误 (34)4.5.5 向量重定向 (34)4.5.6 FLASH块保护(MC9S08GB60) (34)4.6MC9S08GB60的安全性 (35)4.7MC9S08GB60的FLASH寄存器和控制位 (36)4.7.1 FLASH时钟分频寄存器(FCDIV) (36)4.7.2 FLASH选项寄存器(FOPT和NVOPT) (37)4.7.3 FLASH配置寄存器(FCNFG) (38)4.7.4 FLASH保护寄存器(FPROT和NVPROT) (38)4.7.5 FLASH状态寄存器(FSTAT) (39)4.7.6 FLASH命令寄存器(FCMD) (40)4.8FLASH存储器应用实例 (41)4.8.1 FLASH模块时钟的初始化 (41)4.8.2 擦除FLASH的一页(512字节) (42)4.8.3 DoOnStack子程序 (43)4.8.4 SpSub子程序 (45)4.8.5 FLASH的字节编程 (46)第五章复位和中断 (47)5.1简介 (47)5.2MC9S08GB60复位和中断的特征 (47)5.4计算机正常操作监控模块(COP)看门狗 (48)5.5中断 (48)5.5.1 中断堆栈结构 (49)5.5.2 外部中断请求(IRQ)引脚 (50)5.5.2.1 引脚配置选项 (50)5.5.2.2 边沿/电平触发 (50)5.5.3 中断向量、中断源和局部屏蔽 (51)5.6低电压检测系统(LVD) (52)5.6.1 上电复位操作 (52)5.6.2 LVD复位操作 (52)5.6.3 LVD中断操作 (53)5.6.4 低电压警告(LVW) (53)5.7实时中断(RTI) (53)5.8复位、中断以及系统控制寄存器和控制位 (53)5.8.1 中断请求状态和控制寄存器(IRQSC) (54)5.8.2 系统复位状态寄存器(SRS) (55)5.8.3 系统背景调试强制复位寄存器(SBDFR) (56)5.8.4 系统选项寄存器(SOPT) (56)5.8.5 系统设备识别寄存器(SDIDH、SDIDL) (57)5.8.6 系统实时中断状态和控制寄存器(SRTISC) (57)5.8.7 系统电源管理状态控制寄存器1(SPMSC1) (58)5.8.8 系统电源管理状态和控制寄存器2(SPMSC2) (59)第六章中央处理单元 (61)6.1简介 (61)6.2编程结构和CPU寄存器 (61)6.2.1 累加器(A) (62)6.2.2 变址寄存器(H:X) (63)6.2.3 堆栈指针(SP) (64)6.2.4 程序计数器(PC) (66)6.2.5 条件码寄存器(CCR) (66)6.3寻址方式 (70)6.3.1 隐含寻址方式(INH) (71)6.3.2 相对寻址方式(REL) (71)6.3.3 立即寻址方式(IMM) (72)6.3.4 直接寻址方式(DIR) (72)6.3.5 扩展寻址方式(EXT) (72)6.3.6.1 无偏移量变址方式(IX) (73)6.3.6.2 无偏移量变址、变址加1寻址方式(IX+) (73)6.3.6.3 8位偏移量变址方式(IX1) (73)6.3.6.4 8位偏移量变址、变址加1寻址方式(IX1+) (73)6.3.6.5 16位偏移量变址方式(IX2) (73)6.3.6.6 8位偏移量堆栈寻址方式(SP1) (74)6.3.6.7 16位偏移量堆栈寻址方式(SP2) (74)6.4特殊操作 (75)6.4.1 复位序列 (75)6.4.2 中断 (76)6.4.3 等待模式 (76)6.4.4 停止模式 (76)6.4.5 背景模式 (77)6.4.6 总线周期的用户观点 (77)6.5通过指令类别进行指令集描述 (78)6.5.1 数据传送指令 (78)6.5.1.1 加载与存储 (78)6.5.1.2 位的置位与清零 (81)6.5.1.3 存储器到存储器的传送 (82)6.5.1.4 寄存器传输和半字节交换 (82)6.5.2 算术运算指令 (83)6.5.2.1 加、减、乘和除指令 (83)6.5.2.2 加一、减一、清零和求补 (88)6.5.2.3 比较和测试 (88)6.5.2.4 BCD的计算 (88)6.5.3 逻辑操作指令 (89)6.5.3.1 与、或、异或与求补 (90)6.5.3.2 位测试指令 (91)6.5.4 移位类指令 (91)6.5.5 跳转、转移和循环控制指令 (93)6.5.5.1 无条件跳转和转移指令 (94)6.5.5.2 简单转移 (95)6.5.5.3 有符号转移 (95)6.5.5.4 无符号转移 (95)6.5.5.5 位条件转移 (96)6.5.5.6 循环控制 (96)6.5.6 相关堆栈指令 (97)6.6指令简表 (102)6.7汇编语言指南 (114)6.7.1 列表行 (115)6.7.2 汇编指令 (116)6.7.2.1 BASE——设定编译器的缺省数进制 (116)6.7.2.2 INCLUDE——指定附加源文件 (116)6.7.2.3 NOLIST/LIST——关闭或打开程序列表 (116)6.7.2.4 ORG——设置程序的起始位置 (117)6.7.2.5 EQU——把一个标号和一个数值相关联 (118)6.7.2.6 dc.b——定义存储器中字节化常量 (119)6.7.2.7 dc.w——在存储器中定义16位(字)常量 (119)6.7.2.8 ds.b——定义存储(保留)内存变量字节 (120)6.7.3 标号 (121)6.7.4 表达式 (122)6.7.5 通用文件协议 (123)6.7.6 目标代码(S19)文件 (125)第七章开发支持 (129)7.1介绍 (129)7.2特点 (130)7.3背景调试控制器(BDC) (130)7.3.1 BKGD引脚描述 (131)7.3.2 通信细节 (132)7.3.2.1 BDC通信速率考虑事项 (132)7.3.2.2 位时序细节 (133)7.3.3 BDC寄存器和控制位 (135)7.3.3.1 BDC状态和控制寄存器 (135)7.3.3.2 BDC断点匹配寄存器 (137)7.3.4 BDC命令 (137)7.3.4.1 SYNC——要求时序参考脉冲 (138)7.3.4.2 ACK_ENABLE (139)7.3.4.3 ACK_DISABLE (139)7.3.4.4 BACKGROUND (139)7.3.4.5 READ_STATUS (140)7.3.4.6 WRITE_CONTROL (140)7.3.4.7 READ_BYTE (141)7.3.4.8 READ_BYTE_WS (142)7.3.4.10 WRITE_BYTE (143)7.3.4.11 WRITE_BYTE_WS (143)7.3.4.12 READ_BKPT (144)7.3.4.13 WRITE_BKPT (144)7.3.4.14 GO (144)7.3.4.15 TRACE1 (145)7.3.4.16 TAGGO (145)7.3.4.17 READ_A (145)7.3.4.18 READ_CCR (145)7.3.4.19 READ_PC (146)7.3.4.20 READ_HX (146)7.3.4.21 READ_SP (147)7.3.4.22 READ_NEXT (147)7.3.4.23 READ_NEXT_WS (148)7.3.4.24 WRITE_A (148)7.3.4.25 WRITE_CCR (148)7.3.4.26 WRITE_PC (149)7.3.4.27 WRITE_HX (149)7.3.4.28 WRITE_SP (149)7.3.4.29 WRITE_NEXT (149)7.3.4.30 WRITE_ NEXT_WS (150)7.3.5 串行接口硬件握手协议 (150)7.3.6 取消握手协议 (152)7.3.7 BDC硬件断点 (155)7.3.8 与M68HC12BDM的不同之处 (155)7.3.8.1 8位体系结构 (156)7.3.8.2 命令格式 (156)7.3.8.3 状态位的读写 (156)7.3.8.4 BDM与停止和等待模式 (157)7.3.8.5 SYNC指令 (157)7.3.8.6 硬件断点 (157)7.4标识部分和BDC强制复位 (158)7.4.1 系统设备识别寄存器(SDIDH:SDIDL) (158)7.4.2 系统背景调试强制复位寄存器 (158)7.5片上调试系统(DBG) (159)7.5.1 比较器A和B (159)7.5.2总线信息捕捉和FIFO操作 (160)7.5.4 标记与强制断点和触发器 (161)7.5.5 CPU断点请求 (162)7.5.6 触发模式 (162)7.5.6.1 单独A触发模式 (163)7.5.6.2 A或B触发模式 (163)7.5.6.3 A然后B触发模式 (163)7.5.6.4 事件B触发模式(存储数据) (163)7.5.6.5 A然后事件B触发模式(存储数据) (163)7.5.6.6 A和B数据触发(全模式) (164)7.5.6.7 A与非B数据触发(全模式) (164)7.5.6.8 触发范围内:A≤地址≤B (164)7.5.6.9 触发范围外:地址<A 或者地址>B (164)7.5.7 DBG寄存器和控制位 (165)7.5.7.1 调试比较器A的高地址页寄存器(DBGCAH) (165)7.5.7.2 调试比较器A的低位寄存器(DBGCAL) (165)7.5.7.3 调试比较器B的高地址页寄存器(DBGCAH) (165)7.5.7.4 调试比较器B的低位寄存器(DBGCAL) (165)7.5.7.5 调试FIFO高地址页寄存器(DBGFH) (165)7.5.7.6 调试FIFO低位寄存器(DBGFL) (165)7.5.7.7 调试控制寄存器(DBGC) (166)7.5.7.8 调试触发寄存器(DBGT) (167)7.5.7.9 调试状态寄存器(DBGS) (168)7.5.8 应用信息与举例 (169)7.5.8.1 定向的调试器例子 (171)7.5.8.2 例1:终止对地址A的处理 (171)7.5.8.3 例2:终止对地址A指令的处理 (172)7.5.8.4 例3:终止在地址A或B上的指令处理 (172)7.5.8.5 例4:开始跟踪在地址A的指令 (173)7.5.8.6 例5:A到B顺序后停止的尾部跟踪 (173)7.5.8.7 例6:起始跟踪数据B写入地址A (174)7.5.8.8 例7:从地址B中读取被捕获的首八位数据 (174)7.5.8.9 例8:捕获在读地址A后写入到地址B的值 (175)7.5.8.10 例9:在一个例程中触发所有的执行命令 (175)7.5.8.11 例10:通过触发来试图处理外部FLASH (176)7.5.9 硬件断点和ROM修补 (176)附录A 指令集详述 (177)A.2命名规则 (177)A.3规范定义 (180)A.4指令集 (180)ADC Add with Carry(带进位位加) (180)ADD Add without Carry(无进位位加) (181)AIS Add Immediate Value to Stack Pointer(立即数加到SP) (182)AIX Add Immediate Value to Index Register(立即数加到HX) (182)AND Logical AND(逻辑与) (183)ASL Arithmetic Shift Left(算术左移) (184)ASR Arithmetic Shift Right(算术右移) (184)BCC Branch if Carry Bit Clear(C为0则转移) (185)BCLR n Clear Bit n in Memory(内存单元n位清零) (185)BCS Branch if Carry Bit Set(C为1则转移) (186)BEQ Branch if Equal(等于则转移) (187)BGE Branch if Greater Than or Equal To(大于或等于则转移) (187)BGND Background(进入背景调试模式) (188)BGT Branch if Greater Than(大于则转移) (188)BHCC Branch if Half Carry Bit Clear(H为0则转移) (189)BHCS Branch if Half Carry Bit Set(H为1则转移) (189)BHI Branch if Higher(大于则转移) (190)BHS Branch if Higher or Same(大于或等于则转移) (191)BIH Branch if IRQ Pin High(引脚IRQ为1则转移) (191)BIL Branch if IRQ Pin Low(引脚IRQ为0则转移) (192)BIT Bit Test(位测试) (192)BLE Branch if Less Than or Equal To(小于或等于则转移) (193)BLO Branch if Lower(小于则转移) (193)BLS Branch if Lower or Same(小于或等于则转移) (194)BLT Branch if Less Than(小于则转移) (195)BMC Branch if Interrupt Mask Clear(I为0则转移) (195)BMI Branch if Minus(结果为负则转移) (196)BMS Branch if Interrupt Mask Set(I为1则转移) (196)BNE Branch if Not Equal(不等于则转移) (197)BPL Branch if Plus(结果为正则转移) (197)BRA Branch Always(无条件短转移) (198)BRCLR n Branch if Bit n in Memory Clear(M位n为0则转移) (199)BRN Branch Never(三个总线周期的空操作) (200)BRSET n Branch if Bit n in Memory Set(M位n为1则转移) (200)BSET n Set Bit n in Memory(M位n置1) (201)BSR Branch to Subroutine(转移到子程序) (201)CBEQ Compare and Branch if Equal(比较,等于则转移) (202)CLC Clear Carry Bit(进位位C清零) (203)CLI Clear Interrupt Mask Bit(中断屏蔽位I清零) (203)CLR Clear(清零) (204)CMP Compare Accumulator with Memory(A与M比较) (204)COM Complement(按位取反) (205)CPHX Compare Index Register with Memory(HX与M比较) (206)CPX Compare X with Memory(X与M比较) (207)DAA Decimal Adjust Accumulator(A十进制调整) (208)DBNZ Decrement and Branch if Not Zero(减1不为0则转移) (209)DEC Decrement(自减1) (209)DIV Divide(无符号除法) (210)EOR Exclusive-OR Memory with Accumulator(M与A异或) (211)INC Increment(自加1) (211)JMP Jump(无条件跳转) (212)JSR Jump to Subroutine(跳转到子程序) (213)LDA Load Accumulator form Memory(取M内容到A) (213)LDHX Load Index Register form Memory(取M内容到HX) (214)LDX Load X from Memory(取M内容到X) (215)LSL Logical Shift Left(逻辑左移) (215)LSR Logical Shift Right(逻辑右移) (216)MOV Move(M单元间数据传送) (217)MUL Unsigned Multiply(无符号数乘法) (218)NEG Negate(Two’s Complement) (求补) (218)NOP No Operation(空操作) (219)NSA Nibble Swap Accumulator(A的高低4位对调) (219)ORA Inclusive-OR Accumulator and Memory(逻辑或) (220)PSHA Push Accumulator onto Stack(A进栈) (220)PSHH Push H onto Stack(H进栈) (221)PSHX Push X onto Stack(X进栈) (221)PULA Pull Accumulator from Stack(A出栈) (222)PULH Pull H from Stack(H出栈) (222)PULX Pull X from Stack(X出栈) (223)ROL Rotate Left through Carry(带进位位的循环左移) (223)ROR Rotate Right through Carry(带进位位的循环右移) (224)RSP Reset Stack Pointer(堆栈指针置$FF) (224)RTI Return from interrupt(中断返回) (225)RTS Return from Subroutine(子程序返回) (226)SBC Subtract with Carry(带借位减法) (226)SEC Set Carry Bit(进位位置位) (227)SEI Set Interrupt Mask Bit(中断屏蔽位置位) (227)STA Store Accumulator in Memory(A存入M) (228)STHX Store Index Register(HX存入M) (229)STOP Enable IRQ Pin, Stop Processing(停机) (229)STX Store X in Memory(X存入M) (230)SUB Subtract(无借位减法) (231)SWI Software Interrupt(软件中断) (231)TAP Transfer Accumulator to Processor Status Byte(写CCR) (232)TAX Transfer Accumulator to X(A复制到X) (233)TPA Transfer Processor Status Byte to Accumulator(读CCR) (233)TST Test for Negative or Zero(小于或等于0测试) (234)TSX Transfer Stack Pointer to index Register(复制SP到HX) (235)TXA Transfer X to Accumulator(复制X到A) (235)TXS Transfer Index Register Low to Stack Pointer(HX-1写入SP) (235)WAIT Enable Interrupts; Stop Processor(待机) (236)附录B 通用文件规范 (237)B.1引言 (237)B.2存储映射区域划分 (238)B.3中断向量定义 (238)B.4位定义的两种方式 (239)B.5MC9S08GB60完整的通用文件 (240)第一章通用信息与结构框图1.1 HCS08系列微控制器介绍新型的FreescaleHCS08系列微控制器,尽管包含新指令,可以执行快速调试和开发功能,但仍然和旧的M68HC08系列完全兼容。

GNU Toolchain for Atmel AVR8 Embedded Processors 4

GNU Toolchain for Atmel AVR8 Embedded Processors 4

RELEASE NOTES GNU Toolchain for Atmel AVR8 EmbeddedProcessorsIntroductionThe Atmel AVR 8-bit GNU Toolchain (3.5.3.1700) supports all AVR 8-bit devices. The AVR 8-bit Toolchain is based on the free and open-source GCC compiler. The toolchain includes compiler, assembler, linker and binutils (GCC and Binutils), Standard C library (AVR-libc) and GNU Debugger (GDB).Table of ContentsIntroduction (1)1.Installation Instructions (3)1.1.System requirements (3)1.1.1.Hardware requirements (3)1.1.2.Software Requirements (3)1.2.Downloading, Installing and Upgrading (3)1.2.1.Downloading/Installing on Windows (3)1.2.2.Downloading/Installing on Linux (3)1.2.3.Upgrading from previous versions (3)yout (3)2.Toolset Background (5)ponent Versions (5)piler (5)2.3.Assembler, Linker, Librarian and More (5)2.4. C Library (6)2.5.Debugging (6)2.6.Source Code (6)3.Bugs and New Features (7)3.1.New Features (7)3.2.Notable Bugs Fixed (7)3.3.Known Issues (7)4.Supported Devices (8)5.Contact Information and Disclaimer (10)5.1.Disclaimer (10)1.Installation Instructions1.1System requirements1.1.1Hardware requirements●Minimum processor Pentium 4, 1GHz●Minimum 512 MB RAM●Minimum 500 MB free disk spaceAVR 8-bit GNU Toolchain has not been tested on computers with less resources, but may run satisfactorilydepending on the number and size of the projects and the user's patience.1.1.2Software Requirements●Windows 2000, Windows XP, Windows Vista, Windows 7 (x86 or x86-64) or Windows 8 (x86 or x86-64)●AVR 8-bit GNU Toolchain is not supported on Windows 98, NT or ME.●The toolchain should work on the Linux distributions Fedora, RedHat Enterprise, Arch Linux and Ubuntu forboth 32-bits and 64-bits architecture. AVR 8-bit GNU Toolchain may very well work on other distributions.However those are untested and unsupported.1.2Downloading, Installing and UpgradingThe AVR8 GNU toolchain provided by Atmel is available for download and install in one of the following ways.1.2.1Downloading/Installing on Windows●If you want to try the Atmel AVR8 GNU toolchain alone, you can download it from here1●If you want to try the Atmel AVR8 GNU Toolchain along with Atmel Studio, you can download and installAtmel Studio 7 or (newer) which will also install the Atmel AVR8 GNU toolchain. See Atmel Studio releasenotes for more details.1.2.2Downloading/Installing on LinuxFor Linux, the Atmel AVR8 GNU Toolchain is available as a tar.gz archive which can be extracted using thetar utility. In order to install, simply extract to the location from where you want to run it from. Linux builds areavailable from here2.1.2.3Upgrading from previous versionsIf the Atmel AVR8 GNU Toolchain is installed by Atmel Studio installation, refer Atmel Studio documentation to upgrade.If the toolchain is installed separately using one of the (Windows, Linux, Mac) installers, upgrading is notsupported. You can install the new package side-by-side of the old package and use it.1.3LayoutListed below are some directories you might want to know about.`<install_dir>` = The directory where you installed AVR 8-bit GNU Toolchain.●<install_dir>\binThe AVR software development programs. This directory should be in your `PATH` environment variable.This includes:●GNU Binutils●GCC1 /tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx2 /tools/ATMELAVRTOOLCHAINFORLINUX.aspx●GDB●<install_dir>\avr\libavr-libc libraries, startup files, linker scripts,and stuff.●<install_dir>\avr\includeavr-libc header files for AVR 8-bit.●<install_dir>\avr\include\avrheader files specific to the AVR 8-bit MCU. This is where, for example, #include <avr/io.h> comes from.●<install_dir>\libGCC libraries, other libraries, headers and stuff.●<install_dir>\libexecGCC program components●<install_dir>\docVarious documentation.2.Toolset BackgroundAVR 8-bit GNU Toolchain is a collection of executable, open source software development tools for the Atmel AVR 8-bit series of microcontrollers. It includes the GNU GCC compiler for C and C++.2.1Component VersionsGCC: 4.9.2binutils: 2.26.20160125avr-libc: "2.0.0"gdb: 7.82.2CompilerThe compiler is the GNU Compiler Collection, or GCC. This compiler is incredibly flexible and can be hosted on many platforms, it can target many different processors/operating systems (back-ends), and can be configured for multiple different languages (front-ends).The GCC included in AVR 8-bit GNU Toolchain is targeted for the AVR 8-bit microcontroller and is configured to compile C or C++.CAUTION: There are caveats on using C++. See the avr-libc FAQ. C++ language is not fully supported andhas some limitations. libstdc++ is unsupported.Because this GCC is targeted for the AVR 8-bit MCUs, the main executable that is created is prefixed with the target name: `avr-gcc` (with '.exe' extension on MS Windows). It is also referred to as AVR GCC.`avr-gcc` is just a "driver" program only. The compiler itself is called `cc1.exe` for C, or `cc1plus.exe` for C++. Also, the preprocessor `cpp.exe` will usually automatically be prepended with the target name: `avr-cpp`.The actual set of component programs called is usually derived from the suffix of each source code file beingprocessed.GCC compiles a high-level computer language into assembly, and that is all. It cannot work alone. GCC iscoupled with another project, GNU Binutils, which provides the assembler, linker, librarian and more. Since'gcc' is just a "driver" program, it can automatically call the assembler and linker directly to build the finalprogram.2.3Assembler, Linker, Librarian and MoreGNU Binutils is a collection of binary utilities. This also includes the assembler, as. Sometimes you will see itreferenced as GNU as or gas. Binutils includes the linker, ld; the librarian or archiver, ar. There are many other programs included that provide various functionality.Note that while the assembler uses the same mnemonics as proposed by Atmel, the "glue" (pseudo-ops,operators, expression syntax) is derived from the common assembler syntax used in Unix assemblers, so it is not directly compatible to Atmel assembler source files.Binutils is configured for the AVR target and each of the programs is prefixed with the target name. So youhave programs such as:●avr-as: The Assembler.●avr-ld: The Linker.●avr-ar: Create, modify, and extract from archives (libraries).●avr-ranlib: Generate index to archive (library) contents.●avr-objcopy: Copy and translate object files.●avr-objdump: Display information from object files including disassembly.●avr-size: List section sizes and total size.●avr-nm: List symbols from object files.●avr-strings: List printable strings from files.●avr-strip: Discard symbols.●avr-readelf: Display the contents of ELF format files.●avr-addr2line: Convert addresses to file and line.●avr-c++filt: Filter to demangle encoded C++ symbols.●avr-gdb: GDB, the GNU debugger, allows you to see what is going on `inside' another program targeted toAVR, while it executes.See the binutils user manual for more information on what each program can do.2.4 C Libraryavr-libc is the Standard C Library for AVR 8-bit GCC. It contains many of the standard C routines, and manynon-standard routines that are specific and useful for the AVR 8-bit MCUs.In addition to avr-libc libraries, Host IO library (libhostio.a) is integrated to this toolchain. This Host IO libraryallows allows the target to use the host's file system and console I/O to perform various avr I/O operations.NOTE: The actual library is currently split into two main parts, libc.a and libm.a, where the latter containsmathematical functions (everything mentioned in <math.h>, and a bit more). Also, there are additional libraries which allow a customization of the printf and scanf function families. avr-libc contains documentation on how to use (and build) the entire toolset, including code examples. The avr-libc user manual also contains the FAQ on using the toolset.2.5DebuggingAtmel Studio provides a debugger and also provides simulators for the parts that can be used for debuggingas well. Note that `Atmel Studio` is currently free to the public, but it is not Open Source. The GNU debugger is now shipped along with the toolchain.2.6Source CodeAtmel AVR 8-bit GNU Toolchain uses modified source code from GCC, Binutils and AVR-LibC. The sourcecode and the build scripts used for building the packaged binaries are available here1.Please refer to the README for the instructions on how to use the supplied script to build the toolchain.1 http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.5.33.Bugs and New Features3.1New FeaturesIssue #AVRTC-810:Make vfprintf with float format specifiers work with code that places lots of data in flash.Issue #AVRTC-817:PR67353: Introduce -Wmisspelled-isr flag for warning "appears to be a misspelled signal / interrupt handler".Users can disable this warning by -Wno-misspelled-isr flag.3.2Notable Bugs FixedIssue #AVRTC-806:Enhance readelf's recognition of AVR relocation types.Issue #AVRTC-811:Fix incorrect value reported with -fstack-usage. The reported value now includes size of return address pushed to stack.Issue #AVRTC-812:[backport] Fix internal compiler error when building avr-libc with debug enabled.Issue #AVRTC-814:Disassembly by objdump does not show symbol names for data address space symbols.Issue #AVRTC-815:PR ld/20221: Fix broken symbol values when linker relaxation is enabled and code contains alignmentdirectives.Issue #AVRTC-816:PR ld/20254: Fix broken relocations at end of section when linker relaxation is enabled and the sectioncontains alignment directives.3.3Known IssuesIssue #AVRTC-731:For AVRTINY architecture, libgcc implementation has some known limitations. Standard C / Math libraryimplementation is very limited or not present.Issue #AVRTC-732:Program memory images beyond 128KBytes are supported by the toolchain, subject to the limitationsmentioned in "3.17.4.1 EIND and Devices with more than 128 Ki Bytes of Flash" at /onlinedocs/gcc/AVR-Options.htmlIssue #AVRTC-733:Named address spaces are supported by the toolchain, subject to the limitations mentioned in "6.16.1 AVRNamed Address Spaces" at /onlinedocs/gcc/Named-Address-Spaces.html#AVR%20Named %20Address%20Spaces4.Supported Devicesavr2at90s2313at90s2343at90s4414at90s8515at90s2323attiny22at90s4433at90c8534at90s2333attiny26at90s4434at90s8535avr25ata5272attiny4313attiny85attiny87ata6616c attiny44attiny261attiny48attiny13attiny44a attiny261a attiny88attiny13a attiny441attiny461attiny828attiny2313attiny84attiny461a attiny841attiny2313a attiny84a attiny861at86rf401attiny24attiny25attiny861aattiny24a attiny45attiny43uavr3at43usb355at76c711avr31atmega103at43usb320avr35ata5505at90usb82atmega16u2attiny1634ata6617c at90usb162atmega32u2ata664251atmega8u2attiny167avr4ata6285atmega48a atmega88pa at90pwm2bata6286atmega48p atmega88pb at90pwm3ata6289atmega48pa atmega8515at90pwm3bata6612c atmega48pb atmega8535at90pwm81atmega8atmega88atmega8hvaatmega8a atmega88a at90pwm1atmega48atmega88p at90pwm2avr5ata5702m322atmega168pb atmega329a atmega649pata5782atmega169atmega329p atmega6490ata5790atmega169a atmega329pa atmega16hvaata5790n atmega169p atmega3290atmega16hva2ata5791atmega169pa atmega3290a atmega32hvbata5795atmega16hvb atmega3290p atmega6490aata5831atmega16hvbrevb atmega3290pa atmega6490pata6613c atmega16m1atmega32c1atmega64c1ata6614q atmega16u4atmega32m1atmega64m1ata8210atmega32a atmega32u4atmega64hveata8510atmega32atmega32u6atmega64hve2atmega16atmega323atmega406atmega64rfr2atmega16a atmega324a atmega64atmega644rfr2atmega161atmega324p atmega64a atmega32hvbrevb atmega162atmega324pa atmega640at90can32atmega163atmega325atmega644at90can64atmega164a atmega325a atmega644a at90pwm161atmega164p atmega325p atmega644p at90pwm216atmega164pa atmega325pa atmega644pa at90pwm316atmega165atmega3250atmega645at90scr100atmega165a atmega3250a atmega645a at90usb646atmega165p atmega3250p atmega645p at90usb647atmega165pa atmega3250pa atmega6450at94katmega168atmega328atmega6450a m3000atmega168a atmega328p atmega6450patmega168p atmega328pb atmega649atmega168pa atmega329atmega649aavr51atmega128atmega1281atmega128rfa1at90can128 atmega128a atmega1284atmega128rfr2at90usb1286 atmega1280atmega1284p atmega1284rfr2at90usb1287 avr6atmega2560atmega2561atmega256rfr2atmega2564rfr2 avrxmega2atxmega8e5atxmega32a4atxmega16a4u atxmega32e5 atxmega16a4atxmega32c3atxmega16c4atxmega16d4atxmega32d3atxmega32a4uatxmega16e5atxmega32d4atxmega32c4avrxmega4atxmega64a3atxmega64a3u atxmega64b1atxmega64c3 atxmega64d3atxmega64a4u atxmega64b3atxmega64d4 avrxmega5atxmega64a1atxmega64a1uavrxmega6atxmega128a3atxmega128d3atxmega192d3atxmega256c3 atxmega128a3u atxmega128d4atxmega256a3atxmega256d3 atxmega128b1atxmega192a3atxmega256a3b atxmega384c3 atxmega128b3atxmega192a3u atxmega256a3bu atxmega384d3 atxmega128c3atxmega192c3atxmega256a3uavrxmega7atxmega128a1atxmega128a1u atxmega128a4uavrtinyattiny4attiny9attiny20attiny5attiny10attiny40avr1at90s1200attiny12attiny28attiny11attiny155.Contact Information and DisclaimerFor support on Atmel AVR 8-bit GNU Toolchain, visit design support1.Users of AVR 8-bit GNU Toolchain are also welcome to discuss on the AVRFreaks website forum for AVRSoftware Tools.5.1DisclaimerAVR 8-bit GNU Toolchain is distributed free of charge for the purpose of developing applications for Atmel AVR processors. AVR 8-bit GNU Toolchain comes without any warranty.1 /design-support/Atmel Corporation1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311F: (+1)(408) 436.4200| © 2016 Atmel Corporation. / Rev.: 42372A-MCU-06/2016Atmel®, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, AVR®, tinyAVR®, XMEGA®, megaAVR® , and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. Windows®, and others, are registered trademarks of Microsoft Corporation in U.S. and or other countries.Other terms and product names may be trademarks of others.DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military- grade. Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.。

S08_04_Freescale HCS08单片机复位与中断【freescale 单片机原理及应用】

S08_04_Freescale HCS08单片机复位与中断【freescale 单片机原理及应用】

4.1 复位种类及复位效果
• AW60具有1种外部复位
IRQ管脚复位
• AW60具有6种内部复位
上电复位POR(Power-on reset) 看门狗复位(COP,Computer operating properly) 低电压检测复位(LVD,Low voltage detection) 非法操作码复位 背景调试强制复位 时钟发生器时钟失锁和时钟丢失复位
4.5 外部管脚中断(IRQ)

IRQ寄存器
Slide 15
Copyright © Yang Ming. 2010. Electronics and Information Engineering Department of Huazhong University of Science and Technology Wuhan, Hubei 430074, P.R. China
Slide 8
Copyright © Yang Ming. 2010. Electronics and Information Engineering Department of Huazhong University of Science and Technology Wuhan, Hubei 430074, P.R. China
4.3 中断处理过程及堆栈结构
中断是指MCU停止当前操作,保存好CPU当前寄存器的值,转而执行 中断服务子程序ISR(Interrupt Service Routine),然后恢复CPU寄存器值 并返回执行中断前的操作的过程。多数中断是因为硬件事件引起的。例如 IRQ管脚上的边沿信号或者定时器的溢出等等。 CPU能否收到模块的中断请求取决于两个控制位。
4.2 COP复位

Freescale8位单片机入门与实践

Freescale8位单片机入门与实践

Freescale 8位单片机入门与实践第一章单片机概论(当前各公司单片机使用情况、发展情况、freescale单片机命名规则、开发步骤、CodeWarrior软件开发环境的安装要求和安装说明)第二章Freescale 8位单片机(特点、结构、存储器结构、CPU内寄存器,介绍MC68HC908QY4和GP32内部资源)第三章Freescale 8位单片机指令系统(汇编指令)(CodeWarrior使用、软件仿真)第四章复位、中断、系统配置、通用IO端口第五章CodeWarrior应用综述(在线调试、VisualTools的使用)第六章MC68HC908QY4在线编程开发系统(特点、硬件、监控方式、C语言)第七章定时器模块第八章AD、键盘中断模块(各个模块的使用及例程)第九章综合应用(C和汇编混合编程、程序,扩展应用)附录:1、存储器分配图2、寄存器及中断矢量表3、MC68HC08指令集4、MC68HC908QY4开发系统原理图参考书Motorola(Freescale)微控制器MC68HC08原理及其嵌入式应用刘慧银等编著清华大学出版社嵌入式应用技术基础教程王宜怀刘晓升编著清华大学出版社单片机嵌入式应用的在线开发方法邵贝贝编著清华大学出版社mc68hc908qy4sm_simplified_Chinese.pdfMC68HC908QY4.pdfMC68HC908GP32.pdf前言飞思卡尔(前身为摩托罗拉公司半导体产品事业部)在微电子产品领域拥有50年的悠久历史,为全球的汽车、消费、工业、网络和无线市场生产半导体产品。

飞思卡尔总部位于德克萨斯州的奥斯汀,在全球超过25个国家拥有设计、生产和销售运营部门。

飞思卡尔是众多市场领域中的领导者,是世界上最大的微控制器类集成电路供应商,随着国内市场投资的增加,其产品得到越来越多的认同,尤其是移动通信、汽车电子、工业控制等环境恶劣的场所,其应用越多,因为它的产品抗干扰性能很强。

AVR 32 位 GNU 工具链 3.4.1.348 文档说明书

AVR 32 位 GNU 工具链 3.4.1.348 文档说明书

AVR 32-bit GNU Toolchain: Release3.4.1.348The AVR 32-bit GNU Toolchain supports all AVR 32-bit devices. The AVR 32-bit Toolchain is based on the free and open-source GCC compiler. The toolchainincludes compiler, assembler, linker and binutils (GCC and Binutils), Standard Clibrary (Newlib).8/32-bits AtmelMicrocontrollersRelease 3.4.1.3482AVR 32-bit GNU ToolchainInstallation InstructionsSystem RequirementsAVR 32-bit GNU Toolchain is supported under the following configurationsHardware requirements•Minimum processor Pentium 4, 1GHz •Minimum 512 MB RAM •Minimum 500 MB free disk spaceAVR 32-bit GNU Toolchain has not been tested on computers with less resources, but may run satisfactorily depending on the number and size of projects and the user's patience.Software requirements•Windows 2000, Windows XP, Windows Vista or Windows 7 (x86 or x86-64).•Fedora 13 or 12 (x86 or x86-64), RedHat Enterprise Linux 4 or 5, Ubuntu Linux 10.04 or 8.04 (x86 or x86-64), or SUSE Linux 11.2 or 11.1 (x86 or x86-64). AVR 32-bit GNU Toolchain may very well work on other distributions.However those would be untested and unsupported.AVR 32-bit GNU Toolchain is not supported on Windows 98, NT or ME.Downloading and InstallingThe package comes in two forms.•As part of a standalone installer •As Atmel Studio 6 Toolchain ExtensionIt may be downloaded from Atmel's website at or from the Atmel Studio 6 Extension Gallery.Installing on WindowsIn order to install using standalone installer, the AVR Toolchain installer can be downloaded from Atmel website.After downloading the installer, double-click the executable file to install. You may use "Custom Installation" in order to install in a specific location.In order to install the Atmel AVR Toolchain as Atmel Studio 6 Toolchain Extension, please refer to the Atmel Studio 6 documentation.Installing on LinuxOn Linux AVR 32-bit GNU Toolchain is available as a TAR.GZ archive which can be extracted using the 'tar' utility.In order to install, simply extract to the location where you want the toolchain to run from.Note that if you will develop Linux applications for the AT32AP7000 you must also install the AVR32 Buildroot. For more details on AVR32 Buildroot please refer http://www.atmel.no/buildroot/AVR 32-bit GNUToolchain3 Upgrading from previous versionsIf you have used the standalone installer on MS-Windows, you might do a clean upgrade by first un-installing the old version or just upgrade using the latest installer.Please refer to the Atmel Studio 6 documentation for learning how to upgrade the toolchain extension.On Linux, if you have it unpacked to a local folder, you just delete the old folder and unpack the latest version in a new folder.Manifest1.AVR 32-bit GNU Binutils2.22•Binary utilities for AVR 32-bit target (including assembler, linker, etc.).2.AVR 32-bit GNU Compiler Collection (avr32-gcc) 4.4.3• C language and C++ language compiler for AVR 32-bit target.3.Newlib (for AVR 32-bit) 1.16.0•Standard C Library for AVR 32-bitLayoutListed below are some directories you might want to know about.`<install_dir>` = The directory where you installed AVR 32-bit GNU Toolchain.•<install_dir>\bin•The AVR software development programs. This directory should be in your `PATH` environment variable.This includes:•GNU Binutils•GCC•<install_dir>\avr32\lib•avr32-newlib libraries, startup files, linker scripts,and stuff.•<install_dir>\avr32\include•avr32-newlib header files. This is where, for example, #include <string.h> comes from.•<install_dir>\avr32\include\avr32•avr32-newlib header files specific to the AVR32 microprocessor. This is where, for example, #include <avr32/ io.h> comes from.•<install_dir>\lib•GCC libraries, other libraries,headers and stuff.•<install_dir>\libexec•GCC program components•<install_dir>\doc•Various documentation.•<install_dir>\source•Documentation on where to find the source code for the various projects and source code patches that were used to build the tools.Toolset BackgroundAVR 32-bit GNU Toolchain is a collection of executable software development tools for the Atmel AVR 32-bit processor.4AVR 32-bit GNU ToolchainThese software development tools include:1.Compiler 2.Assembler 3.Linker 4.Archiver 5.File converter 6.Other file utilities 7. C LibraryCompilerThe compiler is the GNU Compiler Collection, or GCC. This compiler is incredibly flexible and can be hosted on many platforms, it can target many different different processors/operating systems (back-ends), and can be configured for multiple different languages (front-ends).The GCC included is targeted for the AVR 32-bit processor, and is configured to compile C, or C++.Because this GCC is targeted for the AVR 32-bit, the main executable that is created is prefixed with the target name: `avr32-gcc`. It is also referred to as AVR 32-bit GCC.`avr32-gcc` is just a "driver" program only. The compiler itself is called `cc1.exe` for C, or `cc1plus.exe` for C++.Also, the preprocessor `cpp.exe` will usually automatically be prepended with the target name: `avr32-cpp.exe`.The actual set of component programs called is usually derived from the suffix of each source code file being processed.GCC compiles a high-level computer language into assembly, and that is all. It cannot work alone. GCC is coupled with another project, GNU Binutils, which provides the assembler, linker, librarian and more. Since GCC is just a "driver" program, it can automatically call the assembler and linker directly to build the final program.Assembler, Linker, Librarian and MoreGNU Binutils is a collection of binary utilities. This also includes the assembler, as. Sometimes you will see it referenced as GNU as or gas. Binutils includes the linker, ld; the librarian or archiver, ar. There are many other programs included that provide various functionality.Binutils is configured for the AVR 32-bit target and each of the programs is prefixed with the target name. So you have programs such as:•avr32-as : The Assembler.•avr32-ld : The Linker.•avr32-ar : Create, modify, and extract from archives (libraries).•avr32-ranlib : Generate index to archive (library) contents.•avr32-objcopy : Copy and translate object files.•avr32-objdump : Display information from object files including disassembly.•avr32-size : List section sizes and total size.•avr32-nm : List symbols from object files.•avr32-strings : List printable strings from files.•avr32-strip : Discard symbols.•avr32-readelf : Display the contents of ELF format files.•avr32-addr2line : Convert addresses to file and line.•avr32-c++filt : Filter to demangle encoded C++ symbols.AVR 32-bit GNUToolchain5See the binutils user manual for more information on what each program can do.C LibraryNewlib is used as the Standard C Library for AVR32 GCC Toolchain. Newlib is a Standard C library intended to be used for embedded systems. This library has been ported to support the AVR32 processor architectures. DebuggingAtmel Studio 6 provides a debugger and also provides simulators for the parts that can be used for debugging as well. Note that `Atmel Studio 6` is currently free to the public, but it is not Open Source.Source CodeAtmel AVR32 GNU Toolchain uses modified source code of GCC, Binutils and Newlib. The source code used for building the packaged binaries are available at:http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.1/avr32/The modifications are also available as patches in the above link. Please refer to the README for the instructions on how to use the supplied script to build the toolchain.6AVR 32-bit GNU ToolchainNew and NoteworthyThis chapter lists new and noteworthy items for the AVR 32-bit GNU Toolchain release.AVR 32-bit GNU ToolchainSupported devicesAVR 32-bit GNU Toolchain supports the following devices:Note:- Devices which are newly supported in this release are marked with *uc3a0128 uc3a0256 uc3a0512 uc3a0512es uc3a1128uc3a1512 uc3a1512es uc3a3revd uc3a364 uc3a364suc3a3128s uc3a3256 uc3a3256s uc3a464 uc3a464suc3a4128s uc3a4256 uc3a4256s uc3b064 uc3b0128uc3b0256es uc3b0512 uc3b0512revc uc3b164 uc3b1128uc3b1256es uc3b1512 uc3b1512revc uc64d3 uc128d3uc128d4 uc3c0512crevc uc3c1512crevc uc3c2512crevc uc3l0256uc3l064 uc3l032 uc3l016 uc3l064revb uc3c064cuc3c0256c uc3c0512c uc3c164c uc3c1128c uc3c1256cuc3c264c uc3c2128c uc3c2256c uc3c2512cIssues Fixed•PR 176: Alignment argument for .lcomm directive is made optional. Assembler uses the implicit alignment if alignment argument is not present in .lcomm directive.AVR 32-bit GNUToolchain7 Known issues•Issue #AVRTC-2:'.debug_line' section in the ELF file isn't updated when relaxing. This results in that correct relocationinfo is not added to the '.debug-line' section that are generated and that there is a mismatch betweenthe code and the debug-line after the linker has done relaxation. Debugging the ELF file will givewrong source line as a result.8AVR 32-bit GNU Toolchain Contact Information*************************************************************.Users of AVR 32-bit GNU Toolchain are also welcome to discuss on the AVRFreaks website forum for AVR32Software Tools.Disclaimer and CreditsAVR 32-bit GNU Toolchain is distributed free of charge for the purpose of developing applications for Atmel AVR processors. Use for other purposes are not permitted; see the software license agreement for details. AVR 32-bit GNU Toolchain comes without any warranty.Copyright 2006-2012 Atmel Corporation. All rights reserved. ATMEL, logo and combinations thereof, Everywhere You Are, AVR, AVR32, and others, are the registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Windows, Internet Explorer and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Linux is the registered trademark of Linus Torvalds in the United States and other countries. Built on Eclipse is a trademark of Eclipse Foundation, Inc. Sun and Java are registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Mozilla and Firefox are registered trademarks of the Mozilla Foundation. Fedora is a trademark of Red Hat, Inc. SUSE is a trademark of Novell, Inc. Other terms and product names may be the trademarks of others.。

r8s使用指南

r8s使用指南

r8s使用指南中国科学院植物研究所张金龙编译zhangjl@前言r8s是美国加利福尼亚大学戴维斯分校的进化生物学家Mike Sanderson编写的用于估算进化树分化时间的软件,在进化生物学、分子生物地理学等学科有着广泛的应用,已经成为估算分化时间不可或缺的软件之一。

该软件中的一些方法如NPRS和PL是软件作者最先提出的,目前在同类的其他软件中还难以实现。

R8s的运行平台为MacOS和Linux,在国内应用的还不多,也难以找到中文的练习资料和说明。

本文基于当前版本r8s 1.7.1,参照其说明书,介绍该软件在Linux下的安装和操作,并对其模块的功能和选项进行简要的说明。

译者于北京香山2010年1月23日目录一r8s下载与安装 (1)下载 (1)安装 (1)1 在MacOS上 (1)2 在Linux上(以Ubuntu 9.0为例) (1)(1)下载源程序 (1)(2)解压缩 (1)(3) 源代码的编译 (1)注:g77编译器的安装 (1)3 Windows用户 (2)二程序运行 (2)1 在Linux中(Ubuntu linux 或PHYLIS) (2)2 在WindowXP中运行 (3)程序运行模式 (3)1 交互模式 (3)2 批处理模式 (3)三命令行说明 (4)blformat命令: 进化树的基本信息 (4)mrca命令为节点定名 (5)fixage命令:设定节点的分化时间 (5)constrain命令:限定节点的分化时间 (5)divtime 命令分化时间估算 (5)showage 显示分化时间和分化速率: (6)describe 显示进化树及树的说明 (6)set 命令 (7)calibrate 时间校对 (7)profile 从多个树中提取某个节点的信息 (7)rrlike 检验进化速率 (7)四数据处理过程中的建议 (7)关于进化模型的说明 (7)局部进化时间模型localmodel (7)对于获得时间的建议 (8)关于时间估算的bootstrap的方法 (8)改错 (8)五实例分析 (8)附录命令参考 (11)blformat (11)calibrate (11)cleartrees (11)collapse (11)constrain (11)describe (11)divtime (11)execute (12)fixage (12)localmodel (12)mrca (12)profile (12)prune (12)quit (12)reroot (12)rrlike (12)set (12)showage (13)unfixage (13)mrp (13)bd (14)一r8s下载与安装下载r8s的下载网址/r8s//r8s/r8s1.71.dist.tar.Z安装1 在MacOS上在MacOS上运行,在UNIX shell中运行已经编译好的可执行文件即可。

[教材]ADC0804_中文资料

[教材]ADC0804_中文资料

[教材]ADC0804_中文资料ADC0804_中文资料/CS 芯片选择信号。

/CS 芯片选择信号。

模拟/数字转换器(相关知识) A/D转换器的基本原理 ----ADC08041,所谓A/D转换器就是模拟/数字转换器(ADC),是将输入的模拟信号转换成数字信号。

信号输入端可以是传感器或转换器的输出,而 ADC的数字信号也可能提供给微处理器,以便广泛地应用。

2,ADC0804的规格及引脚图8位COMS依次逼近型的A/D转换器.三态锁定输出存取时间:135US分辨率:8位转换时间:100US总误差:正负1LSB工作温度:ADC0804LCN---0~70度引脚图及说明见图1/RD外部读取转换结果的控制输出信号。

/RD为HI时,DB0~DB7处理高阻抗:/RD为 LO时,数字数据才会输出。

/WR:用来启动转换的控制输入,相当于ADC的转换开始(/CS=0时),当/WR由HI变为LO时,转换器被清除:当/WR回到HI时,转换正式开始。

CLK IN,CLK R:时钟输入或接振荡无件(R,C)频率约限制在100KHZ~1460KHZ,如果使用RC电路则其振荡频率为1/(1.1RC)/INTR:中断请求信号输出,低地平动作.VIN(+) VIN(-) :差动模拟电压输入.输入单端正电压时, VIN(-)接地:而差动输入时,直接加入VIN(+) VIN(-).AGND,DGND:模拟信号以及数字信号的接地. VREF:辅助参考电压.DB0~DB7:8位的数字输出 .VCC: 电源供应以及作为电路的参考电压 .参考腾龙套件的0804原理图:十六进制二进制码与满刻度的比率相对电压值 VREF=2.560伏高四位字节低四位字节高四位电压低四位电压 F 1111 15/16 15/256 4.8000.300 E 1110 14/16 14/256 4.480 0.280 D 1101 13/16 13/256 4.160 0.260 C 1100 12/16 12/256 3.840 0.240. B 1011 11/16 11/256 3.520 0.220. A 101010/16 10/256 3.200 0.200 9 1001 9/16 9/256 2.880 0.180 8 1000 8/16 8/256 2.560 0.160 7 0111 7/16 7/256 2.240 0.140. 6 0110 6/16 6/256 1.920 0.120.5 0101 5/16 5/256 1.600 0.100 4 0100 4/16 4/256 1.280 0.080 3 0011 3/16 3/256 0.960 0.060 2 0010 2/16 2/256 0.640 0.040. 1 0001 1/16 1/256 0.320 0.020. 0 0000 0 0例:VIN=3V,由上表可知2. 880+0.120=3V 为10010110=96H功能说明1,ADC0804将输入模拟值转换成数字值输出到 P0,使相对应的LED亮.如输入3V,ADC0804的输出应为96H=10010110,此数字信号送入 8051的P1,再由P1存入8051的累加器,然后累加器再到P0,使相应的LED亮.2,先将ADC0804的参考电压 VREF调整为 2.56V.(在腾龙套件中主要演示原理,未作此精确调整电压,用2个1K电阻分压,约 2.5V)3调整ADC0804的VIN可变电阻器.由 0V调到5V根据其关系观察 P1的LED变化情形 .参考程序:;0804的基本应用,转动电位器,P0口显示取到的数;//定义ADC的连接端口 ad_cs equ P3.6 ad_wr equ P2.0 ad_rd equ P3.7ad_input_port equ p1org 0000h ajmp main org 0030hmain:lcall adc_demo ajmp main;//==========================================;// 启动 AD转换;//==========================================Adc_Start:clr ad_cs nopclr ad_wr nopsetb ad_wr nopsetb ad_cs nopret;//==========================================;// 读AD转换;//==========================================Adc_Read:mov ad_input_port,#0ffhclr ad_csnopclr ad_rdnopnopmov a,AD_INPUT_PORTnopsetb ad_rd nopsetb ad_cs ret;//==========================================;// AD转换读取延时程序,显示读到的数值;//==========================================Adc_Demo:lcall Adc_Start lcall delay1ms lcall adc_read clr p2.0 clr p2.3mov p0,aretdelay1ms:mov r7,#10 tt1: mov r6,#50djnz r6,$ ;2us djnz r7,tt1retend。

ISaGRAF Ethernet I O冗余系统设置说明书

ISaGRAF Ethernet I O冗余系统设置说明书

How to setup a redundant system with Ethernet I/O?Download FAQ-062 Demo. WinCon-8347 and WinCon-8747 have been phased out,you can also use ISaGRAF XPAC (xpdmo72c) to setup a redundant system with Ethernet I/O. In this example, the demo program “wdemo_57.pia” can be downloaded at /en/faq/index.php?kind=280#751 - FAQ-062.ISaGRAF Demo:/en/download/show.php?num=1005&nation=US&kind1=&model=&kw=isagraf Please refer to Section 22.2 of ISaGRAF user manual to configure the Ethernet I/O – I-8KE4-MTCP andI-8KE8-MTCP by “Modbus Utility” first. It is better to enable the watchdog timer larger than 12 seconds. After all Ethernet I/O‘s IP and configuration are configured well, please connect them as below. Then download the ISaGRAF program “wdemo_57” to both “redundant Master” and “redundant Slave” PACs. The advantage is1.The scan of the Ethernet I/O is much faster compared to the RS-485 I-7000 or I-87K I/O.2.If one Ethernet cable is break or damaged, the other one will still handle the Ethernet I/O andexchange data with the other redundant PAC.Refer to Chapter 20 of ISaGRAF user manual for more information about Redundant Solutions. Related link:I-7188EX-MTCP /en/product/I-7188EX-MTCPNS-205/NS-208/en/product/guide+Industrial__Communicati on+Ethernet__Communication+Ethernet__SwitchI-8142/I-8144/en/product/guide+Remote__I_O__Module_ _and__Unit+PAC__%EF%BC%86amp;__Local__I_O__Modules+I-8K_I-87K__Series__(High__Profile)#481In this “wdemo_57” demo, the ISaGRAF I/O connection window is as below. Refer to ISaGRAF Appendix F or any getting started manual to enable LAN2 of ISaGRAF PAC./en/download/index.php?nation=US&kind1=&model=&kw=isagrafIn this demo,•IP1= 10.0.0.103 IP3= 10.0.0.105•IP2= 10.0.0.104IP4=10.0.0.106•Master_IP, Master_IP2, Slave_IPand Slave_IP2 are all enabled.•The “Remote_IO_type” is 2(2 means I/O is i8KE4/8-MTCP)There are two I-8KE8-MTCP Ethernet I/O used in this demo program. One is with IP = 10.0.0.109.The other one is 10.0.0.110. If your application has more I-8KE4/8-MTCP, you should connect more“i8ke” in the IO connection windows. Please refer to Chapter 22 of ISaGRAF user manual for more information about Ethernet I/O.The “rtu_slav” is to enable Wincon-8xx7‘s COM5 to COM8 as Modbus RTU slave port. Here we enable only COM6 in this example. (Refer to the manual for ISaGRAF PAC to setup expansion COM port and then the COM5 to COM14 on the I-8142/8144 expansion board can be used.)If you have installed I-7188EX-MTCP in this example, please set a fixed IP to it by the “7188xw.exe” utility. (Power off I-7188EX-MTCP, short its “INIT*” pin to “GND”, power it up, connecting one RS232 cable from I-7188EX-MTCP‘s COM1 to PC‘s COM1, PC running “7188xw.exe”, key-in “ip=10.0.0.107” to set ip address and “mask=255.255.255.0” to set mask address)After I-7188EX-MTCP’s IP and Mask is well set. Please run “Modbus Utility” to configure this I-7188EX-MTCP to become a Modbus TCP/IP to Modbus RTU Gateway as below steps.Please set its COM1 as “Debug” mode.Then please set COM2 to “Modbus/RTU Gateway”, a proper timeout (250 ms), other parameters as 19200, 8, None, 1 . then Click on “Set”.In the “System Setting” area, please set this I-7188EX-MTCP ‘s Net-ID to a value not equal to 1, for example, 100. And “Stations per COM Port as 1”, then click on “Set”. If it display “Modbus ID (1 ~ 1)==> COM2”, the configuration is well done.Note: If I-7188EX-MTCP‘s COM1 is not set as “Debug” mode in the former page, the setting will become “Modbus ID (1 ~ 1) ==> COM1”. That is not correct, because here we want it send to I-7188EX-MTCP‘s COM2: RS-485.Then when this I-7188EX-MTCP receives Modbus TCP/IP protocol to request Net-ID: 1, it will send this request to its COM2: RS-485. And then if Wincon-8347 reply, it will reply back to the Ethernet port.Click the link for more ISaGRAF FAQ:/en/faq/index.php?kind=280#751。

气相色谱法测定八甲基环四硅氧烷

气相色谱法测定八甲基环四硅氧烷

气相色谱法测定八甲基环四硅氧烷
傅强;钱之杨
【期刊名称】《现代科学仪器》
【年(卷),期】2000(000)005
【摘要】本文用对气相色谱法测定D4条件进行了研究,通过改变柱子类型、柱温程序升温速率等条件,找出测试D4的最佳气相色谱分析条件,获得良好的效果.【总页数】2页(P46-47)
【作者】傅强;钱之杨
【作者单位】杭州传化化学制品有限公司质检部,杭州,311215;杭州传化化学制品有限公司质检部,杭州,311215
【正文语种】中文
【中图分类】O657.7+1
【相关文献】
1.4,4'-双(二甲基-锂氧硅基)苯醚引发八甲基环四硅氧烷聚合 [J], 刘宗林;吴春蕾;王庆昭;韩念凤;董建
2.八甲基环四硅氧烷/N-β-氨乙基-γ-氨丙基甲基二甲氧基硅烷的本体共聚动力学[J], 罗正鸿;詹晓力;阳永荣
3.六甲基二硅氮烷锂盐引发的八甲基环四硅氧烷聚合 [J], 张志杰;周宁;徐彩虹;谢择民
4.气相色谱法测定二甲基环体硅氧烷 [J], 刘丹;李委璐;方丽迪;梅开忠
5.4,4’-双(二甲基-锂氧硅基)苯醚引发八甲基环四硅氧烷聚合 [J],
因版权原因,仅展示原文概要,查看原文内容请购买。

HC-08 蓝牙串口通信模块 用户手册 V2.0

HC-08 蓝牙串口通信模块 用户手册 V2.0
AT 指令修改成功后统一返回 OK(“AT+RX、AT+VERSION”等查看信息类指令除外), 不成功不返回任何信息。
⑴ 指令集总
序号
AT 指令 (小写 x 表示参数)
1 AT
2 AT+RX
3 AT+DEFAULT
4 AT+RESET
5 AT+VERSION
6 AT+ROLE=x
7 AT+NAME=xxxxxxxxxxxx
峰值电流超过 30mA(4dBm 时),由于纽扣电池的放电电流小,如要使用纽扣电池供
电,射频功率最好设定为-6dBm 或者-23dBm。
10 修改串口波特率指令
设置指令:AT+BAUD=x(只修改串口波特率)
AT+BAUD=x,y(修改串口波特率和校验位)
查询指令:AT+BAUD=?
x 是串口波特率代号,y 是校验位代号,如下表所示:
产品介绍 HC-08 蓝牙串口通信模块是新一代的基于 Bluetooth Specification V4.0 BLE 蓝牙协议的
数传模块。无线工作频段为 2.4GHz ISM,调制方式是 GFSK。模块最大发射功率为 4dBm, 接收灵敏度-93dBm,空旷环境下和 iphone4s 可以实现 80 米超远距离通信。
例: 发送:AT+BAUD=19200 返回:OK19200 模块串口波特率修改为 19200bps,校验位和原来的一样 发送:AT+BAUD=4800,E 返回:OK4800,EVEN 模块串口波特率修改为 4800bps,偶校验 发送:AT+BAUD=? 返回:4800,EVEN 显示模块当前串口波特率和校验位。 注:V2.0 版本软件串口波特率设置马上生效,无需重新上电!

红外线遥控解码接收程序-C语言

红外线遥控解码接收程序-C语言

红外线遥控解码接收程序-C语言.txt铁饭碗的真实含义不是在一个地方吃一辈子饭,而是一辈子到哪儿都有饭吃。

就算是一坨屎,也有遇见屎壳郎的那天。

所以你大可不必为今天的自己有太多担忧。

红外线遥控解码接收程序-C语言#include <regx51.h>#define uchar unsigned char#define uint unsigned int#define IR_RE P3_2bit k=0; //红外解码判断标志位,为0则为有效信号,为1则为无效uchar date[4]={0,0,0,0}; //date数组为存放地址原码,反码,数据原码,反码/*--------------------------延时1ms程子程序-----------------------*/delay1000(){uchar i,j;i=5;do{j=95;do{j--;}while(j);i--;}while(i);}/*---------------------------延时882us子程序-----------------------*/delay882(){uchar i,j;i=6;do{j=71;do{j--;}while(j);i--;}while(i);}/*--------------------------延时2400us程子程序-----------------------*/delay2400(){uchar i,j;i=5;do{j=237;do{j--;}while(j);i--;}while(i);}//**************************************************************//**************************************************************/*----------------------------------------------------------*//*-----------------------红外解码程序(核心)-----------------*//*----------------------------------------------------------*/void IR_decode(){uchar i,j;while(IR_RE==0);delay2400();if(IR_RE==1) //延时2.4ms后如果是高电平则是新码{delay1000();delay1000();for(i=0;i<4;i++){for(j=0;j<8;j++){while(IR_RE==0); //等待地址码第1位高电平到来delay882(); //延时882us判断此时引脚电平///CY=IR_RE;if(IR_RE==0){date[i]>>=1;date[i]=date[i]|0x00;}else if(IR_RE==1){delay1000();date[i]>>=1;date[i]=date[i]|0x80;}} //1位数据接收结束} //32位二进制码接收结束}}//*****************************************************************//********************************************************************/*------------------------外部中断0程序-------------------------*//*------------------主要用于处理红外遥控键值--------------------*/void int0() interrupt 0{uchar i;k=0;EX0=0; //检测到有效信号关中断,防止干扰for(i=0;i<4;i++){delay1000();if(IR_RE==1){k=1;} //刚开始为9ms的引导码. }if(k==0){// EX0=0; //检测到有效信号关中断,防止干扰IR_decode(); //如果接收到的是有效信号,则调用解码程序P0=date[1];delay2400();delay2400();delay2400();}EX0=1; //开外部中断,允许新的遥控按键}//*********************************************************************//********************************void main(){SP=0x60; //堆栈指针EX0=1; //允许外部中断0,用于检测红外遥控器按键EA=1; //总中断开while(1);}总结:关于本段程序的精确延时在<<C51中精确的延时与计算的实现>>里的评论有很好的诠释.以上程序段可以应用在51/52单片机里.下面的程序可以应用在STC12C5410/STC12C2052型号的单片机里面.//在STC12C5410上运用红外线解码程序.主要的问题在于延迟上。

CPX-4AE-T CPX-4AE-I 分析模块说明书

CPX-4AE-T CPX-4AE-I 分析模块说明书

Terminal CPXMódulos de E/S analógicas CPX-4AE-T/CPX-4AE-IAmplio margen•CPX-4AE-T: menores costes del sistema y de almacenamiento mediante conexión directa de detectores de temperatura,termómetros de resistencia eléctrica tipos PT y N•Prescindir de costosos detecto-res con convertidores integra-dosSoluciones específicasConexiones en función de la apli-cación, de las características del módulo electrónico y del están-dar válido en la empresa.Menos es másTecnología avanzada para reducir costos y ahorrar tiempo y espa-cio.•Menores costos por canal con cuatro canales por módulo •Menos tiempos improductivos mediante diagnóstico por cana-les e indicación de fallos con LED por canal, unidad manual CPX-MMI o bus de campo /Ethernet•Terminales más compactos gra-cias a la gran cantidad de cana-les por móduloLos nuevos módulos de E/S son óptimos para una gran cantidad de canales analógicos o detectores de temperatura en la automatización de procesos. CPX-4AE-T para la detección de temperaturas desde -200°C hasta 850 °C; CPX-4AE-I para señales desde 4 hasta 20 mA.Medir temperaturas,captar señales,ahorrar espacio.210.8.PSIProduct Short InformationFesto AG &Co.KGRuiter Strasse 8273734 EsslingenInternet Tel. ++49 (0)711 347-0 Fax ++49 (0)711 347-2144E-mail service_international@270406R e s e r v a d o e l d e r e c h o d e m o d i f i c a c i ónTerminal CPXMódulos de E/S analógicas CPX-4AE-T / CPX-4AE-IAmplia modularidadMás economía mediante la utili-zación de módulos electrónicos.Medir temperaturas, caudales,presiones y distancias.CPX: diversidad de conexiones Gran cantidad de funciones eléc-tricas. El encadenamiento de la placa de alimentación, módulo electrónico y placa de alimenta-ción permite numerosas combi-naciones. Elección rápida y man-tenimiento sencillo gracias a la sustitución de módulos electróni-cos sin modificar el cableado.TipoCPX-4AE-ICPX-4AE-TMódulos de entradas analógicas Captación de señales Detección de temperaturas Cantidad de entradas 44Cantidad de salidas ––Línea característica ––Resolución12 Bit16 BitNivel de conm./Margen señales 0 ... 20 mA, 4 ... 20 mA Fuente de intensidad constante Alim. máx. de corr. por canal 40 mA En función del detector Alim. máx. de corr. por módulo 0,7 A0,7 A Detectores P . ej. sensor de presión y vacío SDE–DetectoresSensores de presión, detectores de caudal PT 100, PT 200, PT 500, PT 1000y medidores de distancias Ni 100, Ni 120, Ni 500, Ni 1000Margen de temperatura –PT estándar: -200 °C ... 850 °C DetectoresPT entorno: -120 °C ... 130 °C NI estándar: -60 °C ... 180 °CConexiones para detectores 2, 3, 4 hilos 2, 3, 4 hilos ParametrizaciónFormato de datos, valores límite, factor de escala Formato de datos, valores límite, factor de escala,detector de temperatura, comportamiento de la fuente de corriente en caso de sobrecargaDiagnóstico 4 LED para errores de canal y 1 LED para error de móduloFuncionesParametrización y diagnóstico por canal, señales del canal defectuoso a través de la red o en CPX-MMIMPA1 y MPA2Bloque de enlace CPX-GE-7/8" 5 cont.CPX-4AE-ISensor de presión SDE1Medidor de distancias SOELDetector de caudal SFE1Módulo electrónico CPX-4AE-TDetector de temperatura PT 100Datos técnicos。

CX28348中文资料

CX28348中文资料

Ordering Information
Model Numbe CX28342 CX28343 CX28344 CX28346 CX28348 Number of Frames 2 3 4 6 8 Package 144 pin ETQFP 144 pin ETQFP 144 pin ETQFP 27 x 27 mm 318-ball PBGA 27 x 27 mm 318-ball PBGA Ambient Temperature Range –40 °C to 85 °C –40 °C to 85 °C –40 °C to 85 °C –40 °C to 85 °C –40 °C to 85 °C
元器件交易网
CX28342/3/4/6/8 Dual/Triple/Quad/Hex/Octal-Enhanced DS3/E3 Framer
The CX28342/3/4/6/8 provides Dual, Triple, Quad, Hex, and Octal DS3/E3 framers designed to support DS3-M13, DS3-C-bit parity, E3-G.751, and E3-G.832 transmission formats. The CX28342/3/4/6/8 provides framing recovery for M13, M23, C-bit parity, G.751, and G.832 formatted signals. A FIFO buffer in the receive path can be enabled to reduce jitter on the incoming data. The CX28342/ 3/4/6/8 devices allow for ease of configuration, while providing maximum flexibility to support the transmission and recovery of industry standard formats. It provides a flexible overhead bit generation method in DS3/E3 modes to source overhead bits on an individual framer. Distinguishing Features
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

北京大学计算机科学技术系
指令系统体系结构(Instruction Set Architecture)指令系统设计中的基本问题
必须指定什么?执行周期
北京大学计算机科学技术系
将要揭示的主题
基本的指令系统体系结构种类
通用寄存器(
Val(A) + Val(B)
Val(B) + Val(C)装入/存储(
北京大学计算机科学技术系
占优势
因为指定寄存器比指定存储器位置所需的位数要少)
北京大学计算机科学技术系
存储器操作数/操作数数目的利弊存储器操作数/操作数数目的利弊
位字,
北京大学计算机科学技术系
寻址对象
但是当它们之间需要通信时,就会产生问题!
寻址方式
R2+d
R1+Mem[100+R2+R3*d]
北京大学计算机科学技术系
北京大学计算机科学技术系80x86中使用最多的10条指令
北京大学计算机科学技术系条件码转移
北京大学计算机科学技术系
操作总结数据类型(Data Types)
北京大学计算机科学技术系
指令格式的普通例子指令格式总结
北京大学计算机科学技术系计算机微处理器研究开发中心现代编译技术概貌
北京大学计算机科学技术系现代寄存器分配
北京大学计算机科学技术系The arcs between .…R2...
指令系统测度
周期时间
北京大学计算机科学技术系
本讲总结:

branch (with a PC-relative address at least 8-bits。

相关文档
最新文档