PDA

View Full Version : pic 16f887 memory question



emerson
- 13th January 2011, 18:23
I have a few questions regarding the memory on the pic 16f887. First, if I write to the EEPROM memory on the chip, will that limit the amount of words I can have in my program? Also, what kind of external memory can I have the '887 communicate with? Has anyone done this before successfully? I'm trying to write a program with a lot of LCDOUT commands (I'm using a 4x20 lcd). Each four line LCDOUT command uses a little over 200 words, and I can fit roughly 35-40 four line LCDOUT commands per chip. I'm trying to use around 1000 four line LCDOUT commands and I'm pretty stumped. What should I do? Thanks to everyone for your help.

mackrackit
- 13th January 2011, 21:21
The program and data areas are separate.
You can use an I2C EEPROM.

Not seeing your code and not knowing what you want to write to the display...
Might think about a sub routine to send data to the display and just update the variables being sent.

And you do not have to write to all the lines on the display at once.

emerson
- 14th January 2011, 13:23
Well, I'm trying to make a text based RPG, so I'm going to need a lot of screens to describe the different rooms you're in. I also want to have different screens that show character status, inventory, etc., so your idea of having a subroutine and only updating variable values will apply there. My plan is to have at least 6 different levels (preferably 8). Is it possible to put picbasic code in the I2C EEPROM or does it not work like that? I'm not familiar with EEPROM and how it works.

rsocor01
- 14th January 2011, 13:53
Is it possible to put picbasic code in the I2C EEPROM or does it not work like that? I'm not familiar with EEPROM and how it works.

No, that I know. However you can go with a PIC that has more program memory available. You can use this page to find the chip that you need.

http://www.microchip.com/maps/microcontroller.aspx

Robert

emerson
- 14th January 2011, 15:57
No, that I know. However you can go with a PIC that has more program memory available. You can use this page to find the chip that you need.

http://www.microchip.com/maps/microcontroller.aspx

Robert

That webpage is great! I think I'm going to try the DSPIC128MC804IPT. Thanks for the help.

rsocor01
- 14th January 2011, 16:11
That webpage is great! I think I'm going to try the DSPIC128MC804IPT. Thanks for the help.

PBP does not support that PIC. You might need to use another language like C32 from Microchip.

mackrackit
- 14th January 2011, 16:11
If you are planning to use PBP then you may want to look at supported parts for PBP.
http://melabs.com/includes/compatibility/pbp.pics.htm

Go with an 18F for new projects.

emerson
- 14th January 2011, 19:26
Ok, so I chose the 18f4620, I have a new question though. When you compile your program in Microcode Studio and it tells you in the bottom left corner that your program uses (in my case) 1632 bytes, do I compare that to the chips 64K bytes of flash memory? I'm used to it telling me how many words I've used, not bytes.

here is the datasheet for the chip:

http://ww1.microchip.com/downloads/en/DeviceDoc/39626b.pdf

mackrackit
- 15th January 2011, 01:42
"do I compare that to the chips 64K bytes of flash memory?"

Yes.