Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 23rd July 2007, 08:40 AM   (permalink)
Default

But the notes say that
Quote:
The device programmer can no longer access this memory.
means the EEPROM will not be cleared with bulk erased, can only be erased by writing erase routine in the program?
__________________
Superman returns..
bananasiong is offline   Reply With Quote
Old 23rd July 2007, 09:07 AM   (permalink)
Default

The programmer can no longer read or write to the EEPROM. It can however clear it with bulk erase.

Mike.
Pommie is offline   Reply With Quote
Old 23rd July 2007, 09:11 AM   (permalink)
Default

Quote:
Originally Posted by Pommie
The programmer can no longer read or write to the EEPROM. It can however clear it with bulk erase.
Exactly!
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 23rd July 2007, 09:45 AM   (permalink)
Default

How about the flash memory in the PIC? Is it another memory that stores the data?
__________________
Superman returns..
bananasiong is offline   Reply With Quote
Old 23rd July 2007, 10:54 AM   (permalink)
Default

Quote:
Originally Posted by bananasiong
How about the flash memory in the PIC? Is it another memory that stores the data?
That's the program memory - read the datasheet!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 24th July 2007, 01:08 AM   (permalink)
Default

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..
bananasiong is offline   Reply With Quote
Old 24th July 2007, 04:36 AM   (permalink)
Default

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
__________________
Gayan

My Website
http://gsmicro.blogspot.com/

Last edited by Gayan Soyza; 24th July 2007 at 04:40 AM.
Gayan Soyza is offline   Reply With Quote
Old 24th July 2007, 09:14 AM   (permalink)
Default

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..
bananasiong is offline   Reply With Quote
Old 24th July 2007, 09:53 AM   (permalink)
Default

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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 24th July 2007, 02:54 PM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
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.
Hi,
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:
The PIC16F87/88 devices have 4K words of program Flash with an address range from 0000h to 0FFFh. Addresses above the range of the respective device will wraparound to the beginning of program
memory.
So flash program memory is also on chip program memory? Why we need to write into our program memory since the program is already there?

Thanks
__________________
Superman returns..
bananasiong is offline   Reply With Quote
Old 24th July 2007, 02:59 PM   (permalink)
Default

Quote:
Originally Posted by bananasiong
So flash program memory is also on chip program memory? Why we need to write into our program memory since the program is already there?
I don't understand what you're asking? - 'program memory' and 'flash memory' are the same thing - you've got 4K of memory that goes from 0x0000 (the reset vector) to 0x0FFF (the end of memory). That's it, your total program memory - nothing else.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 24th July 2007, 03:09 PM   (permalink)
Default

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.
Pommie is offline   Reply With Quote
Old 25th July 2007, 12:16 AM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
I don't understand what you're asking? - 'program memory' and 'flash memory' are the same thing - you've got 4K of memory that goes from 0x0000 (the reset vector) to 0x0FFF (the end of memory). That's it, your total program memory - nothing else.
Since it is the program memory, I don't see what's the point of doing this:

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:
Originally Posted by Pommie
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.
Can you give more example? I know that the data can be stored in EEPROM, how about flash memory? Since it is the program memory, how come data is stored there?

Sorry for stating unclearly, but I really want to know.

Thanks
__________________
Superman returns..
bananasiong is offline   Reply With Quote
Old 25th July 2007, 04:07 AM   (permalink)
Default

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?
__________________
Gayan

My Website
http://gsmicro.blogspot.com/
Gayan Soyza is offline   Reply With Quote
Old 25th July 2007, 04:45 AM   (permalink)
Default

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.
Pommie is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
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



All times are GMT. The time now is 10:24 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.