4222|1

111

帖子

0

TA的资源

五彩晶圆(初级)

楼主
 

C51入门教程英语 网页 [复制链接]

http://www.esacademy.com/automation/docs/c51primer/c51prim.htmC51 Primer
by Mike Beach, Hitex (UK) Ltd.
HTML version by
Steffen Duffner, Irena & Olaf Pfeiffer

Last modified on 03/03/96.
Click here for the Table of ContentsAbout The C51 PrimerIf you've flicked through this publication, you may be left thinking that it is necessary to be an expert to produce workable programs with C51. Nothing could be further from the truth. It is perfectly possible to write real commercial programs with nothing more than a reasonable knowledge of the ANSI C language.
However, to get the maximum performance from the 8051, knowing a few tricks is very useful. This is particularly true if you are working on a very cost-sensitive project where needing a bigger RAM or EPROM can result in an unacceptable on-cost. After all, if cost was not a consideration, we would all be using 80C166s and 68000s!
Whilst the C51 Primer is really aimed at users of the Keil C51 Compiler, it is applicable in part to other compilers. However, some compilers do not allow such low-level access and have fewer 8051-specific extensions. They are less likely to be used on projects where getting maximum performance is essential.
The C51 Primer Will Help You
  • Find your way around the basic 8051 architecture.
  • Make a sensible choice of memory model and special things to watch out for.
  • Locate things at specific addresses.
  • Make best use of structures.
  • Use bit-addressable memory.
  • Think in terms of chars rather than ints.
  • Get the best out of the various pointer types.
  • Get a modular structure into programs.
  • Access on and off-chip ports and peripherals.
  • Deal with interrupts.
  • Use registerbanks.
  • Deal with the stack.
  • Understand RAM overlaying.
  • Interface to assembler code.
  • Use special versions like the 80C517 and 87C751.
  • Use assembler tricks in C.
  • Help the optimiser to produce the smallest, fastest code.
The C51 Primer Will Not Help You
  • Program in ANSI C - get a good reference like Kernighan & Ritchie.
  • Write portable code - simply use the compiler without using any extensions.
  • Set-up each and every on-chip peripheral on all of the 90 different 8051 variants! Some are, however, covered in the appendices.
This guide should be read in association with a good C reference such as Kernighan and Ritchie and is not meant to be a definitive work on the C language. It covers all the 8051-specific language extensions and those areas where the CPU architecture h as an impact on coding approach.
此帖出自51单片机论坛

赞赏

1

查看全部赞赏

点赞 关注
 

回复
举报

111

帖子

0

TA的资源

五彩晶圆(初级)

沙发
 
每页看完了都有下一页,可以启用google翻译,只要在地址栏前的网址前加上

http://translate.google.com/translate?hl=zh-CN&sl=en&u=

便可,虽然翻译的质量不咋的,但能看出点意思。
此帖出自51单片机论坛
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/7 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表