Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Storage size limit

Status
Not open for further replies.

richacm

New Member
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
 
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.
 
Last edited:
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
 
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
 
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?
If you're going to be programming, you should learn hexadecimal. It's not difficult, and it's used all the time in programming because it makes many things just SO much simpler.

Yes, $ff hex = 255 decimal = 11111111 binary. :)
 
Yeah I know Hex - the question was is the limit I can write to in the EEPROM FF?, i.e. 255 locations.

Cheers,

Craig
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top