没有合适的资源?快使用搜索试试~ 我知道了~
CODEVISION AVR C英文语言程序设计指南
需积分: 10 30 下载量 117 浏览量
2009-04-05
17:51:00
上传
评论
收藏 823KB PDF 举报
温馨提示
试读
185页
CODEVISION AVR C英文语言程序设计指南,是一本关于AVR编程界面的讲解,具体涉及了 ,很多方面跟例子
资源推荐
资源详情
资源评论
CodeVisionAVR
VERSION 1.0.1.7
User Manual
CodeVisionAVR
© 1998-2001 HP InfoTech S.R.L.
Page 1
CodeVisionAVR V1.0.1.7
User Manual
Rev. I
© 1998-2001 HP InfoTech S.R.L.
All rights reserved.
CodeVisionAVR
© 1998-2001 HP InfoTech S.R.L.
Page 2
Table of Contents
Table of Contents............................................................................................................................. 2
1. Introduction.................................................................................................................................. 7
2. CodeVisionAVR Integrated Development Environment ............................................................. 8
2.1 Working with Files.................................................................................................................... 8
2.1.1 Creating a New File.......................................................................................................... 8
2.1.2 Opening an Existing File .................................................................................................. 9
2.1.3 Files History..................................................................................................................... 9
2.1.4 Editing a File.................................................................................................................. 10
2.1.5 Saving a File.................................................................................................................. 11
2.1.6 Renaming a File............................................................................................................. 11
2.1.7 Printing a File................................................................................................................. 12
2.1.8 Closing a File................................................................................................................. 13
2.1.9 Using the Navigator........................................................................................................ 14
2.2 Working with Projects ............................................................................................................ 15
2.2.1 Creating a New Project .................................................................................................. 15
2.2.2 Opening an Existing Project ........................................................................................... 17
2.2.3 Adding Notes or Comments to the Project...................................................................... 18
2.2.4 Configuring the Project................................................................................................... 19
2.2.4.1 Adding or removing a File from the Project.............................................................. 19
2.2.4.2 Setting the C Compiler Options............................................................................... 21
2.2.4.3 Transferring the Compiled Program to the AVR Chip after Make............................. 24
2.2.4.4 Running an User Specified Program after Make...................................................... 25
2.2.5 Obtaining an Executable Program.................................................................................. 27
2.2.5.1 Compiling the Project.............................................................................................. 27
2.2.5.2 Making the Project.................................................................................................. 29
2.2.6 Closing a Project............................................................................................................ 33
2.3 Tools ..................................................................................................................................... 34
2.3.1 The AVR Studio Debugger............................................................................................. 34
2.3.2 The AVR Chip Programmer............................................................................................ 35
CodeVisionAVR
© 1998-2001 HP InfoTech S.R.L.
Page 3
2.3.3 The Serial Communication Terminal............................................................................... 38
2.3.4 Executing User Programs............................................................................................... 39
2.3.4.1 Configuring the Tools Menu.................................................................................... 39
2.4 IDE Settings .......................................................................................................................... 41
2.4.1 General Settings ............................................................................................................ 41
2.4.2 Configuring the Editor..................................................................................................... 42
2.4.3 Configuring the Assembler ............................................................................................. 43
2.4.4 Setting the Debugger Path ............................................................................................. 44
2.4.5 AVR Chip Programmer Setup......................................................................................... 45
2.4.6 Serial Communication Terminal Setup............................................................................ 47
2.5 Accessing the Help................................................................................................................ 48
2.6 Transferring the License to another computer ........................................................................ 48
2.7 Connecting to HP InfoTech's Web Site................................................................................... 51
2.8 Contacting HP InfoTech by E-Mail ......................................................................................... 51
2.9 Quitting the CodeVisionAVR IDE ........................................................................................... 51
3. CodeVisionAVR C Compiler Reference..................................................................................... 52
3.1 The Preprocessor .................................................................................................................. 52
3.2 Comments............................................................................................................................. 58
3.3 Reserved Keywords............................................................................................................... 59
3.4 Identifiers............................................................................................................................... 60
3.5 Data Types............................................................................................................................ 60
3.6 Constants .............................................................................................................................. 61
3.7 Variables ............................................................................................................................... 63
3.7.1 Specifying the SRAM Storage Address for Global Variables........................................... 65
3.7.2 Bit Variables................................................................................................................... 65
3.7.3 Allocation of Variables to Registers ................................................................................ 66
3.7.4 Structures ...................................................................................................................... 67
3.7.5 Unions ........................................................................................................................... 70
3.7.6 Enumerations................................................................................................................. 72
3.7.7 Global Variables Memory Map File................................................................................. 73
CodeVisionAVR
© 1998-2001 HP InfoTech S.R.L.
Page 4
3.8 Defining Data Types .............................................................................................................. 73
3.9 Type Conversions.................................................................................................................. 74
3.10 Operators ............................................................................................................................ 75
3.11 Functions............................................................................................................................. 76
3.12 Pointers ............................................................................................................................... 77
3.13 Accessing the I/O Registers................................................................................................. 79
3.13.1 Bit level access to the I/O Registers ............................................................................. 80
3.14 Accessing the EEPROM ...................................................................................................... 81
3.15 Using Interrupts ................................................................................................................... 82
3.16 SRAM Memory Organization................................................................................................ 84
3.17 Using an External Startup File.............................................................................................. 86
3.18 Including Assembly Language in Your Program ................................................................... 88
3.18.1 Calling Assembly Functions from C .............................................................................. 89
3.19 Creating Libraries ................................................................................................................ 90
3.20 Using the AVR Studio Debugger.......................................................................................... 93
3.21 Hints.................................................................................................................................... 94
3.22 Limitations ........................................................................................................................... 95
4. Library Functions Reference ..................................................................................................... 96
4.1 Character Type Functions...................................................................................................... 97
4.2 Standard C Input/Output Functions ........................................................................................ 98
4.3 Standard Library Functions.................................................................................................. 101
4.4 Mathematical Functions ....................................................................................................... 102
4.5 String Functions................................................................................................................... 105
4.6 BCD Conversion Functions.................................................................................................. 110
4.7 Memory Access Functions................................................................................................... 110
4.8 LCD Functions..................................................................................................................... 111
4.8.1 LCD Functions for displays with up to 2x40 characters ................................................. 111
4.8.2 LCD Functions for displays with 4x40 characters.......................................................... 114
4.8.3 LCD Functions for displays connected in 8 bit memory mapped mode.......................... 116
4.9 I
2
C Bus Functions................................................................................................................ 119
剩余184页未读,继续阅读
资源评论
ccjqz
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功