Keil C - Embedded C Programming Tutorial - Pointers - 8051 Micro Controller Projects AVR PIC Projects Tutorials Ebooks Libraries
Keil C - Embedded C Programming Tutorial - Pointers - 8051 Micro Controller Projects AVR PIC Projects Tutorials Ebooks Libraries
http://www.8051projects.net/keil-c-programming-tutorial/pointers.php
Home
Forum
Tutorials
Downloads
LCD Pinouts
Jet Engine
Games
Project Demos
More
Saturday, 5 November 2011 12:16
Digital Humiditiy Sensor designed for automotive, RH&T, calibrated, highest performance
Embedded Developer Find Compare Buy Processors & Tools Parametric Database, Ordering Info Embedded Tools for ARM IDE, compiler, debugger, emulator flash programmer, phototype boards
Pointers in Keil C
Pointers in keil C is are similar to that of standard C and can perform all the operations that are available in standard C. In addition, keil C extends the operatability of pointers to match with the 8051 Controller architecture. Keil C provides two different types of pointers: 1. Generic Pointers 2. Memory-Specific Pointers
Welcome
Username: Password:
Login
Generic Pointers: Generic Pointers are declared same as standard C Pointers as shown below: CODE:
temperature sensors
different temperature sensors for solar- and heating systems.
www.resol.de
Chatbox
Temperature Controllers
Search Thousands of Catalogs for Automatic Temperature Control System
www.globalspec.com
Generic pointers are always stored using three bytes. The first byte is the memory type, the second byte is the high-order byte of the offset, and the third byte is the low-order byte of the offset. Generic pointers maybe used to access any variable regardless of its location.
Memory-Specific Pointers: Memory specific pointers are defined along with memory type to which the pointer refers to, for example: CODE:
char data *c; //Pointer to character stored in Data memory char xdata *c1; //Pointer to character stored in External Data Memory. char code *c2; //Pointer to character stored in Code memory
As Memory-Specific pointers are defined with a memory type at compile time, so memory type byte as required for generic pointers is not needed. Memory-Specific pointers can be stored using 1 byte (for idata, data, bdata and pdata pointers) or 2 bytes (for code and xdata pointers).
Coitsu | 04 Nov : 22:05 Hi, i've recently posted a reply in my "home automation against earthquakes using pic and sensors" if some1 can help me
Trending Topics
DC-DC switching converters automatic answering machine audio transmitter digital sections modern technologies Ethernet Data Acquisition and Control System
The Code generated by keil C compiler for memory-specific pointer executes mroe quickly than the equivalent code generated for a generic pointer. This is because the memory area accessed by the pointer is known at the compile time rather at run-time. The compiler can use this information to optimize memory access. So If execution speed is your priority then it is recommended to use memory-specific pointers.
Generic pointers and Memory-Specific pointers can be declared with memory area in which they are to be stored. For example: CODE:
book
Anonymous | 04 Nov : 21:39 hi ajay! i have tested rc5 remote in p89v51rd2 and 89s52. working. i need some modification so that the output is not latched ie. output is high, as long as i keep the buttons pressed
setting time members only Digital signal transmission by FM GPRS based home automation system Artificial neural networks winavr gcc tutorial I2C eeprom addressing adc nr Labview Advanced programming c language i2c tutorial Digital electronics more tags
//Generic Pointer char * idata ptr; //character pointer stored in data memory int * xdata ptr1; //Integer pointer stored in external data memory //Memory Specific pointer char idata * xdata ptr2; //Pointer to character stored in Internal Data memory //and pointer is going to be stored in External data memory int xdata * data ptr3; //Pointer to character stored in External Data memory //and pointer is going to be stored in data memory
Online
Guests: 67, Members: 1 ... Afnan viewing chatbox_menu.php most ever online: 182184 (Members: , Guests: 182184) on 06 Aug : 11:07 Members: 32533 Newest member: bagsdlt Navigation Translate
aniket.hello | 03 Nov : 08:10 hello ajay...plz reply to my forum.... m already late to submit my project....
eng11 | 03 Nov : 06:01 Thanks Ajay and Majoka for the info i will wait to see if he reply to your message and thanks again guys
1 of 2
05-11-2011 12:16
http://www.8051projects.net/keil-c-programming-tutorial/pointers.php
ravi111 | 02 Nov : 20:31 hello sir i want information about how to make modern treadmill.
Link to Us!
Put this button on your website to link with us!
Info Panel
Navigation
Translate
Recommended
2 of 2
05-11-2011 12:16