Searching \ for '[PIC] C18 memcpyram2pgm' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'C18 memcpyram2pgm'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] C18 memcpyram2pgm'
2005\09\27@125446 by Harold Hallikainen

face picon face
Does anyone have any sample code on the use of the memcpyram2pgm function
in the C18 string library? Microchip used to include sample code for each
function in their documentation, but now the books are getting thinner and
thinner. They have no sample on this function, and the description is VERY
brief!

So, anyone have some sample code on use of memcpyram2pgm?

THANKS!

Harold



--
FCC Rules Updated Daily at http://www.hallikainen.com

2005\09\27@132954 by John Temples

flavicon
face
On Tue, 27 Sep 2005, Harold Hallikainen wrote:

> Does anyone have any sample code on the use of the memcpyram2pgm function
> in the C18 string library?

Are you expecting it to write to the internal flash of the PIC?

--
John W. Temples, III

2005\09\27@141419 by Harold Hallikainen

face picon face
> Are you expecting it to write to the internal flash of the PIC?


Yes... That's the way I read the description of the function:

memcpy
memcpypgm
memcpypgm2ram
memcpyram2pgm

Function: Copy the contents of the source buffer into the destination buffer.
Include: string.h

Prototype:
void * memcpy(void * dest, const void * src, size_t memsize );
rom void * memcpypgm(rom void * dest, const rom void * src, sizerom_t
memsize );
void * memcpypgm2ram(void * dest, const rom void * src, sizeram_t memsize );
rom void * memcpyram2pgm(rom void * dest,const void * src,sizeram_t
memsize );

Arguments: dest Pointer to destination array.
src Pointer to source array.
memsize Number of bytes of src array to copy into dest.

Remarks: This function copies the first memsize number of bytes in src to
the array dest. If src and dest overlap, the behavior is undefined.

Return Value: This function returns the value of dest.

File Names: memcpy.asm
memcpyp2p.asm
memcpyp2r.asm
memcpyr2p.asm


--
FCC Rules Updated Daily at http://www.hallikainen.com

2005\09\27@143849 by John Temples

flavicon
face
On Tue, 27 Sep 2005, Harold Hallikainen wrote:

>> Are you expecting it to write to the internal flash of the PIC?
>
> Yes... That's the way I read the description of the function:

That's a common misunderstanding.  It writes to the "program memory"
address space.  It doesn't write to the internal flash of the PIC.
It's only useful if you have external RAM on a PIC with an external
memory interface.

--
John W. Temples, III

2005\09\27@151638 by Harold Hallikainen

face picon face
OK, so it's writing to external program memory, assuming it's writable? I
appreciate making documentation short and concise, but I think Microchip
went a little far in the documentation of the C18 libraries...

THANKS!

Harold

{Quote hidden}

--
FCC Rules Updated Daily at http://www.hallikainen.com

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...