Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Data Logger PIC 16F877A microcontroller

Status
Not open for further replies.

alexbodiam

Newbie level 3
Joined
Jan 10, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
Hi

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.
 

this is what i have so far:

Lcd_Init(); //Initialises the LCD
Lcd_Cmd(_LCD_CURSOR_OFF); //Turns off cursor
Lcd_Out(1,4,"Version: 3"); //Displays Version
Lcd_Out(2,1,"Bank:"); //Displays Memory Bank
Lcd_Out(2,9, "Time:"); //Displays time interval

Delay_ms(2000); //Delays screen for 2 seconds
Lcd_Cmd(_LCD_CLEAR); //Clears the LCD

Lcd_Out(1,1,"For Navigation:"); //Displays "For Navigation"
Lcd_Out(2,1,"2 UP, 8 DOWN"); //Displays "2 UP, 8 DOWN"
Delay_ms(2000); //Delays screen for 2 seconds
Lcd_Cmd(_LCD_CLEAR); //Clears the LCD

Lcd_Out(1,1,"4 LEFT, 6 RIGHT"); //Displays "4 LEFT, 6 RIGHT"
Lcd_Out(2,1,"5 SELECT"); //Displays "5 SELECT"
Delay_ms(2000); //Delays screen for 2 seconds

Lcd_Cmd(_LCD_CLEAR); //Clears the LCD

i also need to set up a 4x4 keypad to control a menu on the lcd.

once again thanks.
 

I would recommend implementing a timer interrupt to handle the sampling interval and possibly a external interrupt to handle the keyboard entry.

Study the MikroC manual concerning interrupts and experiment with a few timer interrupts for practice.

BigDog
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top