-2

I have to design a Data Logger programusing mikroC PRO to run on the EasyPIC5 board (with PIC 16F877A microcontroller). I also have to use a 2-line LCD for display.

Here is what i have been given:

The program will take measurements from Analogue Port AN0 at regular intervals, and save the raw data to EEPROM. The user should be able to select any of 6 memory banks to store the results of a logging session, and should be able to set the time interval between readings at 1 second, 2 seconds, 5 seconds or 10 seconds. The number of readings taken in each logging session should be set to 5, but should be alterable from a #define in the first few lines of the program. Another #define should be used to specify the total number of memory banks (set to 6).

Having quite a bit of trouble with this.

Any help would be appreciated.

EDIT

Up till now i am able to get the readings of AN0 and i write them to EEPROM.. BUT the my question which i stupidly missed to ask.. how would i set the the memory banks to 6 and how to save the logging session to any of the banks

Mo Adel
  • 1,136
  • 1
  • 16
  • 29
  • What's your question? – ouah Jun 23 '13 at 12:59
  • @ouah sorry i forgot to ask the question, i edited my question..sorry again.. – Mo Adel Jun 23 '13 at 13:38
  • @Pradheep i edited the question.. and added what part i reached.. thanks – Mo Adel Jun 23 '13 at 13:39
  • consult your data sheet on what fuse bit to set. For writing EEPROM check your compiler user guide. I am sure you will find examples if you google . The best forum to ask micro chip related question is micro chip foru – Pradheep Jun 23 '13 at 14:12

1 Answers1

0
for(i = 0; i < k; i++)             // Fill data buffer
EEPROM_Write(0x00+i, i);           // Write data to address 0x00

By changing the initial value of i and k you can determine where to store your data.

sashkello
  • 17,306
  • 24
  • 81
  • 109