8-bit8位Microcontrollers微处理器ApplicationNote应用注释AVR1000:GettingStartedWritingC-codeforXMEGAAVR1000:XMEGA的C语言代码编写入门Features特点:•Namingconventions命名约定-Registernames寄存器名-Bitnames位名•C-codenamesC-代码名-Bitandgroupmasks位与组掩码-Groupconfigurationmasks组配置掩码•Methodsforaccessingregisters访问寄存器的方法•Methodsforwritingreusablemodulefunctions可多次使用模块功能的写入方法1Introduction引言Shortdevelopmenttimesandhighqualityrequirementsonelectronicproductshasmadehigh-levelprogramminglanguagesarequirement
ThemainreasonisthatHighlevellanguagesmakeiteasiertomaintainandreusecodeduetobetterportabilityandreadability
由于电子产品的开发时间短,质量要求高,因此需要高层次的编程语言
最主要的原因是,高级语言具有更好的可移植性和可读性,使其更易于维护和重复使用代码
Thechoiceofprogramminglanguagealonedoesnotensurehighreadabilityandreusability;goodcodingstyledoes
ThereforetheXMEGA™peripherals,headerfilesanddriversared