Searching \ for 'PIC16F84 EEPROM Programming' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devprogs.htm?key=programming
Search entire site for: 'PIC16F84 EEPROM Programming'.

Truncated match.
PICList Thread
'PIC16F84 EEPROM Programming'
1999\03\31@154920 by Lalakis Parafyadas

picon face
part 0 16 bytes
</x-html>

1999\03\31@172948 by llgren

flavicon
face
Well i am probably newer to assembler than you but this i know, you should be able to get the pic to code what it writes to the eeprom AND when you write to the the pic ( burning software ) you may choose to protect its contents from reading, i think it is called a "stop bit". all you get is FFFF when trying to read it, the program runns within the PIC without the ability to see what happens.
Most eeproms dont have any protection as far as i know but the solution above may solve that. i guess you should be able to arrange some sort of XOR decryption. shuffle it sround abit before sending it to the eeprom. but i have only read about it somewhere so... i cant help you.
Try the links below and some satellite hack pages. i believe there is something similar used in eurocrypt.
When it comes to assembler the other gentlemen in this list is far more better than me. i have just succeded to make a running LED row.   :)

I suggest you visit one of these pages which i have listed below, there are also C compilators for PIC?s if you know C. It has it?s limitations i have heard,  "it is just as good" someone other says, well i dunno. i am not skilled enough to tell a difference yet i have tried both. and since my skills in C is better than my assembler skills, well........ i have to lift my hat to C. But note i will still learn more assembler.

http://www.eq3.com/embe/gatoxpic.htm
http://www.man.ac.uk/~mbhstdj/piclinks.html
http://www.geocities.com/SiliconValley/Way/5807/

P.S my business bought me and my coworkers a excellent PIC-C compilator from HTSOFT. to use on one of our workstations. visit their site at: http://www.htsoft.com/
It wasnt cheap i heard... and guess what it wasnt either. but it was a nifty app :) alot of documentation and sample sourcecode, among others of a dollshouse security system and disco lights. and i believe some i2c and serial communication source.
There is a fullyfunctionall trialversion to download from their page :) try it.

Good Luck
Robert

{Original Message removed}

1999\03\31@204227 by Tony Nixon

flavicon
picon face
Hi Argiris

It is very simple to write and read from the internal EEPROM of a 16F84.

Here is the code to do it. This code is also in the data sheets just
before the instructions set, and there are 64 EEPROM locations available
for you to use. (00h to 3Fh, or 0 to 63 decimal)

Say you want READ from EEPROM address 20h

This code sets the address you wish to read from

movlw 20h       ; reading from EEPROM address 20h
movwf EEADR     ; place it into the EEPROM address register

Now you must tell the PIC you want to read from this address by using
this code. The EECON1 register in in RAM Page 1 so you must set the
correct page bit first.

bsf status,rp0          ; ram page 1
bsf EECON1,RD           ; initiate EEPROM read

The PIC will now fetch the data from EEPROM address 20h and it will be
placed in the EEDATA register ready for you to use on the very next
instruction.

First, you may or may not want to return to RAM Page 0

bcf status,rp0          ; back to ram page 0 again

Now you can use the data and do with it what you like. Here we put the
data into the W register.

movf EEDATA,w   ; EEPROM data is now in W



Writing is a little more complicated, I guess because it makes it harder
to 'accidentally' write something.

Lets get the contents from RAM address 0Ch and store that into the
EEPROM at address 10h.

This code sets the address you wish to write to.

movlw 10h       ; writing to EEPROM address 10h
movwf EEADR     ; place it into the EEPROM address register

Now we need to set the data with this code.

movf 0Ch,w      ; transfer contents of 0Ch into W
movwf EEDATA    ; place it into the EEPROM Data register

Now you must execute some special code that tells the PIC to start
writing this data to EEPROM. The PIC will then get the address to write
to from EEADR, and the data to save from EEDATA.

bsf status,rp0          ; EECON2 and EECON1 are in ram page 1

This code tells the PIC to begin writing.

movlw 0x55
movwf EECON2
movlw 0xAA
movwf EECON2
bsf EECON1,WR

The EEPROM write has now started and it may take the PIC around 10mS to
complete the operation. The WR bit was set by us to initiate the write,
and when the write operation is completed, the PIC will automatically
clear it again. You can make the PIC wait around until the write has
completed with this code.

Wait    btfsc EECON1,WR         ; wait until the PIC clears WR
       goto Wait

Now, if you like, go back to ram page 0

bcf status,rp0

And you're done.

If your PIC is very busy and it cannot afford to hang around and wait
for 10mS, then you can set an interrupt to occur when the write has
completed.


--
Best regards

Tony

PicNPoke - Multimedia 16F84 Beginners PIC Tools.
*** FREE PCB OFFER ***

http://www.picnpoke.com
Email spam_OUTpicnpokeTakeThisOuTspamcdi.com.au

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