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.
I put the following code out side of main loop. Still I have same problem.
Eeprom_Write(0x00,new_temp_mem);
Delay_ms(100);
//Fan1 RPM
Eeprom_Write(0x02,new_rpm0_mem); //lower byte
Delay_ms(200)...
Already done. My problem was after adding Eeprom_Write to the program, it's look like the program hanged. There is no response from buttons and nothing in LCD screen.
For testing, I just put the function outside of the main loop. Still same problem. There is no response from any buttons and...
Sorry, I can't post all the details here. As I posted in the first post, I am experiencing problem with Eeprom_Write function. When I add the function, the LCD will blank, even before executing it. Otherwise, the entire program is working fine.
Thanks for the reply. new_rpm0_mem is a 16bit int value. As you can see, I want to write the values to EEPROM on button press. But the LCD is blank even before the program entering into the menu loop. That's causing headache for me.
I am using counter in PIC for counting the RPM. The counter...
I am writing a firmware for my project using PIC16F877A and Mikroc. In this firmware, I want to change values stored in EEPROME of PIC. The circuit have 6 buttons for selecting and changing values. The buttons are connected to various pins of PORT D. All of the functions are worked without any...
I tried with low value resistor. Because of very low current, the voltage across resistor is not suitable for measurement purpose. So I am considering CT. Can you help me to design a CT for the same ?
I want to calculate the current taken by an Axial fan - rated 230V AC - continuously and alarm if the fan fails or it overloaded. I am considering a CT based solution. But I can't find any design that suitable for my purpose.
Thanks for help from everyone. The actual problem was related to the Display_RPM function. The corrected code is posted here. Special thanks for bluelasers for correcting the shift left function.
void Display_RPM(unsigned int num){
value[0] = (num/10)%10 + 48;
value[1] = num%10 + 48...
I am also using interrupt. The code, I posted earlier was the Interrupt handler in MikroC.
I have some other doubt.
state = 0;
state = state + PORTB.RB0;
state = state << 1;
state = state + PORTB.RB1;
level = level + bump[state];
Display_RPM(state);
This is the code, you posted earlier...
Actually, it's a Arduino Rotor encoder library file, I want port it into MikroC for PIC.
const byte pinA = 2;
//encoder pin A to Arduino pin 2 which is also interrupt pin 0 which we will use
const byte pinB = 3;
//encoder pin B to Arduino pin 3 which is also interrupt pin 1 but we won't use...
int bump[] = {0,0,-1,1};
state = 0;
state = state + PORTB.RB0;
state >> 1;
state = state + PORTB.RB1;
level = level + bump[state];
Display_RPM(state);
The above code not working. I want to work the code something like this. I am using MikroC
consider...
I have no oscilloscope to confirm fan have tacho signal.
You are correct. It's caused the crap Chinese adapter. I tried with battery, 3000 RPM in display gone. But still there is no RPM Count in LCD.
1:2 prescaler is already corrected in program. Please see 41st line of the code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.