![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) | |
|
But the notes say that
Quote:
__________________
Superman returns..
|
||
|
|
|
|
|
(permalink) |
|
The programmer can no longer read or write to the EEPROM. It can however clear it with bulk erase.
Mike. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
How about the flash memory in the PIC? Is it another memory that stores the data?
__________________
Superman returns..
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
Any clue? The datasheet states only how to read and write into it. I couldn't find any notes from microchip site too.
Does the program memory store the program instructions?
__________________
Superman returns..
|
|
|
|
|
|
|
(permalink) |
|
Program memory stores the program instructions.
Data memory consists of EEPROM and RAM memories. For Bananasiong this will be helpful. http://www.mikroe.com/en/books/picbook/2_06chapter.htm Last edited by Gayan Soyza; 24th July 2007 at 04:40 AM. |
|
|
|
|
|
|
(permalink) |
|
Still couldn't figure it out. Isn't the program stored in the location start from 0x0000? Then for the flash program memory? To store more program instructions start from the 0x1000?
I'm refering to PIC16F88.
__________________
Superman returns..
|
|
|
|
|
|
|
(permalink) |
|
Page 11, figure 2.1 - shows 4K of program memory from 0x0000 to 0x0FFF - that's it, total program memory. If you try and run the program counter past that end address it loops back to 0x0000 again.
|
|
|
|
|
|
|
(permalink) | ||
|
Quote:
I know about this, 4 k of program memory from 0x0000 to 0x0fff (aka on chip program memory), 2 k for each page and there are two pages. I just don't know what's the purpose of writing to or reading from the flash. According to the datasheet, Quote:
Thanks
__________________
Superman returns..
|
|||
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
You read and write to flash to store/retrieve data. I store messages as 2 x 7 bit ascii characters per location and have filled a 2K bank with text (4000 chars). If you wanted to do a data logger then you can store lots of readings as long as they don't arrive too fast. Bootloaders write code to flash.
One nice thing about the USB enabled pics is the bootloader. The bootloader sits in the first 2K of memory and your program gets sent via USB and is written in the other 30k of flash. Mike. |
|
|
|
|
|
|
(permalink) | ||
|
Quote:
![]() Let's say I read from 0x0000, what will I get? Isn't it goto Initialize (my program begins with this usually)? Then I will get the hex. representation of the instruction 'goto' and the location of 'Initialize'? Quote:
Sorry for stating unclearly, but I really want to know. Thanks
__________________
Superman returns..
|
|||
|
|
|
|
|
(permalink) |
|
I think bananasiong asking if the instructions still there after power OFF & ON then why need a special EEPROM location.
He is asking why not keep all the EEPROM Read /Write codings as like a normal program (without writing to EEPROM) For example: A COUNTER must stop in “9” & after power OFF & ON it must start from “9”.Then we press a button & store the data in the EEPROM. He is asking why storing in the EEPROM why not save in the main program? (Because the instructions are still there in the program they didn’t erase after power OFF) Is this write? |
|
|
|
|
|
|
(permalink) |
|
The main difference between flash and EEPROM is the number of times you can write to it. Flash may fail after only 1000 writes, EEPROM is guaranteed for 10,000 writes but will typically last 1,000,000 writes.
EEPROM should be used to store things that may change infrequently such as customer preferences. Flash should contain data that changes very infrequently such as the program code (changed when a bug is fixed or the code updated). You can also use flash to store data. For example, a musical doorbell may have the code and a tune programmed when it is manufactured but different tunes could be made available via the internet that could be flashed into the memory via RS232. Mike. |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Need some help with a code provided by ATMEL | ikalogic | Micro Controllers | 1 | 23rd January 2007 02:45 PM |
| Hardcode a PIC by hand? (or 16F74 + par.port.prog = problem) | smilen | Micro Controllers | 15 | 21st November 2005 09:23 AM |
| Writing Data to the EEPROM | Electrix | Micro Controllers | 2 | 31st August 2005 06:39 AM |
| Newcomers, please read! (PIC regarded) Upd. 0xD | Jay.slovak | Micro Controllers | 0 | 17th April 2005 01:04 PM |
| An error in pic16f84a, why? | Zener_Diode | Micro Controllers | 6 | 11th April 2004 02:55 AM |