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.

problem in making a contactless Tachometer & I did not get any solution

Status
Not open for further replies.

mmahfuj

Junior Member level 2
Joined
May 31, 2012
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Chittagong,Bangladesh
Activity points
1,491
I wanna make a tachometer using IR and LCD. I used PIC16F877a and the code is in below. Please help me to show me the exact way for the project.
Now what should i do???? Please help !!!

The code is:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
Lab 7: Timer0 as a counter
Internal Oscillator @ 4MHz, MCLR Enabled, PWRT Enabled, WDT OFF
Copyright @ Joy@Nadim
January, 2013
*/
// LCD module connections
sbit LCD_RS at RB2_bit;
sbit LCD_EN at RB3_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_RS_Direction at TRISB2_bit;
sbit LCD_EN_Direction at TRISB3_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;
// End LCD module connections
// Define Messages
char message1[] = "Rev = 0000  RPM";
char *txt ="Tachometer";
char *freq = "0000";
void Display_RPM(unsigned int freq2write) {
 freq[0] = (freq2write/1000)%10 + 48;    // Extract thousands digit
 freq[1] = (freq2write/100)%10 + 48;    // Extract hundreds digit
 freq[2] = (freq2write/10)%10 + 48;    // Extract tens digit
 freq[3] =  freq2write%10     + 48;    // Extract ones digit
 
 // Display Frequency on LCD
 Lcd_Out(2, 7, freq);
}
 
unsigned int count;
void main() {
 ADCON1= 0b00000110;
 TRISC = 0x00;     // PORTC O/P
 portc=0;
 TRISA = 0b00001000; // RA2/T0CKI input, RA3 is I/P only
 OPTION_REG = 0b00101000; // Prescaler (1:1), TOCS =1 for counter mode
 Lcd_Init();                 // Initialize LCD
 Lcd_Cmd(_LCD_CLEAR);        // CLEAR display
 Lcd_Cmd(_LCD_CURSOR_OFF);   // Cursor off
 Lcd_Out(1, 3, txt);
 Lcd_Out(2,1,message1);      // Write message1 in 2nd row
 do {
  if(porta.f3==1){           //button at porta3
    portc.f0=1;
    TMR0=0;
    Delay_ms(5000);  // Delay 5 Sec
    count= TMR0;
    count*=12;
    Display_RPM(count);
    portc.f0=0;
    porta.f3=0;
  }
 } while(1);  // Infinite loop
}





but it does not work. please give me the proper schematic and codes as well.
waiting for answer.........

:sad:

- - - Updated - - -

[pls reply me....pls.. I urgently need it ! I am facing a great problem over it...][/pls reply me....pls.. I urgently need it ! I am facing a great problem over it...]
 
Last edited by a moderator:

What - exactly - does happen ? Is there no display at all ? Are you getting wrong readings ? Is the display garbled ?
Post your circuit if you can.

If you are not getting any display at all, then very likely it is because the contrast on the LCD has not been adjusted. Usually there is a preset which is used to set contrast- adjust this so that you can just barely see the 7x5 pixel matrix of each character to start with.

More tips only when you post more details of exact problem faced.
 

Re: problem in making a contactless Tachometer & I did not get any solution

Try IKA Tach with ATMega48, you have all complete source, PCB, and circuit:

**broken link removed**
 

the problem is ..... I can not simulate the programme using proteus..
The lcd doesn't display during the simulation...
 

Untitled.png


this is the schematic
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top