![]() |
![]() |
![]() |
|
|
|||||||
| 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) |
|
Hi, I am using the PIC16F690 which came with my PicKit 2 starter kit.
I have programmed the PIC to read from the analogue port and then output a bar display on the C port indicating the percentage of voltage read. I also want to store the result every 5 minutes. To do this I have converted the voltage to an 8 bit number (which is good enough for me) and what I was going to do was write this to a FIFO store which I could then read from at a later date. However instead of doing that I though I could just keep track of the 5 minute readings internally in an array of bytes in the PIC. The question I have is how big can this get? The statitistics of the chip show that I have 234 storage locations free of RAM and 3479 free of ROM (not too sure what this means). Can someone help me out? Thanks, Craig |
|
|
|
|
|
|
(permalink) |
|
hi Craig,
The 690 has also 256 bytes of EEPROM, in which you could save readings. The registers [storage locations] which are free could be used as a volatile store. Its also possible to write/save to the free Flash memory. You called it 'ROM', its the program flash memory area.
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 4th June 2008 at 08:08 AM. |
|
|
|
|
|
|
(permalink) |
|
You can read but not write to it on the 16F690
|
|
|
|
|
|
|
(permalink) |
|
Woops!
You are 'write' of course..
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
|
|
|
|
|
|
(permalink) |
|
Thanks for the replies.
So I can write to the EEPROM correct? That's not the ROM eh. I saw some samples of accessing the EEPROM but it was a bit confusing for me. Can someone show me a peice of code that will write/read to the EEPROM 1 byte of data. I want it to be like a FIFO store so after each 5 minutes I will add a byte to the EEPROM. Then I am going to keep checking the AN1 input and when this goes high I will read and remove the items from the EEPROM in a FIFO manner. I will keep an index pointed to indicate where I am in the EEPROM so its really just a case of how do I write/read data from the EEPROM and what location can I write to? Cheers everyone, Craig |
|
|
|
|
|
|
(permalink) |
|
Page 108 of the 16F690 datasheet.
|
|
|
|
|
|
|
(permalink) |
|
Yeah I read that - that's what kind of confused me since I am programming in microBasic.
I did find a library that writes it though EEprom_write and EEprom_read so all is good. For the PIC16F690 I can only write up to FFh as that is the 255 spaces allocated - correct? Thanks, Craig |
|
|
|
|
|
|
(permalink) | |
|
Quote:
Yes, $ff hex = 255 decimal = 11111111 binary.
__________________
========================= Futz's Microcontrollers & Robotics ========================= |
||
|
|
|
|
|
(permalink) |
|
Yeah I know Hex - the question was is the limit I can write to in the EEPROM FF?, i.e. 255 locations.
Cheers, Craig |
|
|
|
|
|
|
(permalink) |
|
Yes, it's on page 3 of the datasheet.
|
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| How to limit current ? | rcmeca | Electronic Projects Design/Ideas/Reviews | 6 | 3rd November 2006 09:43 PM |
| Tables data - size limit | kenmac | Micro Controllers | 7 | 8th April 2006 02:21 PM |
| Avatar size limit | zachtheterrible | Feedback/Comments | 3 | 8th March 2005 01:28 PM |
| Best / simplest way to limit voltage | Scarr | General Electronics Chat | 4 | 28th September 2004 08:57 AM |
| current limit | SupeR-NovA | General Electronics Chat | 13 | 17th March 2004 12:21 PM |