SW006010 Microchip Technology, SW006010 Datasheet - Page 28
SW006010
Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Specifications of SW006010
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
- Current page: 28 of 160
- Download datasheet (3Mb)
MPLAB
apRNOVM^-page 22
C17 C Compiler User’s Guide
For example, a function to copy a string from ROM to RAM could be written as follows.
void str2ram(static char *dest, static char rom *src)
{
} /* end str2ram */
As an example, the following code will send a ROM string to USART1 on a
PIC17C756 using the PICmicro MCU C libraries. The library function to send a string
to the USART,
argument, but that string must be in RAM.
Modify the library routine to read from a ROM string.
/* The only changes required to the library routine is to change the
name so the new routine does not conflict with the original routine and
to add the rom qualifier to the parameter.
*/
void putrsUSART1_rom( static const rom char *data )
{
} /* end putrsUSART1_rom */
2.6.13
RAM pointers are either 8 or 16-bit, depending on whether they point to banked (far)
or unbanked (near) RAM.
Pointer arithmetic is affected by the ROM paging and RAM banking of the PICmicro
MCU. Pointers are assumed to be RAM pointers unless declared as ROM.
rom int *p;
char *q;
ram char *r;
2.6.14
User-defined data constructs are included in the symbolic information file from the
linker.
For MPLAB C17, structures located in program memory must have all elements word
aligned.
MPLAB C17 supports anonymous structures.
2.6.15
Bit-fields allow the specification of integer-type members of a struction, which are the
specified number of bits in size. Bit-fields cannot cross byte boundaries and,
therefore, cannot be greater than 8 bits in size.
while( (*dest++ = *src++) != '\0' )
do
{
} while(*data++);
;
while(BusyUSART1());
putcUSART1(*data);
Pointers
Structures
Bit-fields
/* Send characters up to the null */
/* Write a byte to the UASRT */
putsUSART1(const char *str)
/* ROM pointer */
/* RAM pointer (default) */
/* RAM pointer */
/* (explicitly declared) */
, takes a pointer to a string as its
2002 Microchip Technology Inc.
Related parts for SW006010
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: