??? 02/24/04 22:03 Read: times |
#65450 - Dont let Michael Karas hear you...! Responding to: ???'s previous message |
Gerard Akse said:
As you can read in the chapter you're referring to only ASSEMBLER COMMANDS are given to read an input pin or (re)set an output pin. They are of no use to me as I'm programming in a ANSI C compiler. That's why Michael's always saying, "No microcontroller project should be done in C language unless the implementer is already an accomplished assembly language programmer" Now I wouldn't put it quite as strongly as Michael, but you have just given an excellent illustration of his point! Without at the very least an understanding of the processor's instruction set, your progress is going to be severly hampered! The ANSI C language is of no use to you at all, because ANSI C knows nothing about SFRs, bit-addressable objects, Ports, Pins, interrupts, register banks, memory spaces, etc, etc - which are essential to the use of 8051-based microcontrollers. To cope with these specific implementation details, you need an 8051-specific compiler - which will have extensions to the ANSI C language to cope with these essentials. You need to understand these details in order to make use of these language extensions. As I said on the Keil forum, you need to do some foundational work to gain familiarity with both the 8051 architecture and your chosen tools: Standard advice (assuming Keil tools): First, you need to read the uVision Getting Started guide, and work through the example projects in it. You need to read the following documents - commonly referred to as "the bible" for the 8051: http://www.semiconductors.philips.com/acrobat/v...ARCH_1.pdf http://www.semiconductors.philips.com/acrobat/v...UIDE_1.pdf http://www.semiconductors.philips.com/acrobat/v...WARE_1.pdf Here are some other introductory & reference materials: http://www.keil.com/books/8051books.asp http://www.8052.com/books.phtml http://www.8052.com/tutorial.phtml You will need to read the Data Sheet for your particular processor, and the Manual(s) for any development boards, etc. You will need to read the Manuals for the C51 Compiler, A51 Assembler, etc, etc,... |
Topic | Author | Date |
Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Dont let Michael Karas hear you...! | 01/01/70 00:00 | |
What the Data Sheet says | 01/01/70 00:00 | |
Why the Data Sheet says it | 01/01/70 00:00 | |
RE: What the Data Sheet says | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Thanks Steve! | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Thanks you too Erik ;) | 01/01/70 00:00 | |
RE: Thanks you too Erik ;) | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Thanks for your supportive speech :)![]() | 01/01/70 00:00 |