Eur van Andel wrote:

[RobH]
>> Apart from that the physical implementation is irrelevant for an
 >> application program, so we should not use the terms EEPROM or flash.
> 
> You are old enough to have lived and worked before Flash even  
> existed. You know the difference.
> Since Flash and EEPROM are totally different in a PIC and confusing  
> them can have disastrous consequenses, I disagree.

The only 'disaster' I see is that you access the wrong region, no 
physical damage can be done to the PIC by this type of programming 
errors.   From a programming point of view it is relevant which region 
you want to access, but totally irrelevant what type of memory it is made.
I think it will not be too difficult and also desirable to enhance the 
current PIC_data_EEPROM library such that it can also read and write 
program memory and config memory (as long as the PIC supports it of 
course). Maybe it should become a totally new library named PIC_memory 
or something alike. Its procedures/functions will get a parameter to 
indicate to which region the actual read or write applies and these 
procedures will also 'generic' names like read_memory().

>> I suggest to use the terms 'code', 'data', 'config' and 'ID' memory,
>> because these names refer to memory regions which are relevant for an
>> application.
> 
> Where ID is often a subset of config. But I agree, where code = Flash  
> and data = EEPROM. But then you need two words and it is not  
> compatible with the datsheet.

Or as I describe above a region indicator as parameter for a more 
generic procedure.

> 
>>> The terms data, memory and byte are quite meaningless in a PIC
>>> environment.
>> Huh? Please explain!
> 
> Everything is data and everything is memory.

But there is a difference between von Neumann and Harvard.

> The default handling  
> unit of a PIC is a byte, there are only four (five in 18f asm)  
> instructions that deal with bits.
> So byte should not be part of any procedure name, unless it  
> explicitly handles just one byte where lots of other procs handle  
> bits, nibbles, words, etc.

The current PIC_data_EEPROM lib has procedures to read/write byte word 
and dword.

Regards, Rob.

-- 
Rob Hamerling, Vianen, NL (http://www.robh.nl/)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to