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.
andre_teprom: There are no duplicate declarations to the variables. I declared all the variables at the beginning of the program.
milan.rajik: I have given the problem in the second post.
- - - Updated - - -
andre_teprom:Could you please tell me where I had made that mistake. I could not find...
In the above code,
the PIC 16F1829 is used to check four buttons, MENU,LEFT,RIGHT, ENTER to go through diffrent menus of my program. each button press is generating an port change interupt and is getting read inside the ISR to a variable Switch_val. from the switch value, different menu screens...
Hi all,
Please find my code.
int switch_val=0,menu_val=0,enter_noft=0,menu_noft=0,comand=0,comand_noft=0;
//int right_noft=0,left_noft=0;
int temp,i;
int to_main_menu=0,enable_entry=0,disp_refresh=0;
int all_menu_val[8]={100,110,111,120,121,200,210,220}; //All possible...
Hi all,
Can anyone tell me the right method to declare global variables in MikroC for pic. I have declared variables at the beginning of the program.All variables are "int" are called multiple times from main function and updates their values within the function call. However, I cant get the...
Hi all,
Brain:The pooling for ADC completion was done with two parameters, go_done and with ADIF, to check if any of them was creating the problem, am now polling only for Go.Done flag, despite that i am getting the same result.
Milan: Implemented the changes, but the result is the same.
Do...
Problem Solved: mikroc interrupt Service Routine and how to change the value of global variable
reason: char variables cant be assigned values with "=" operator, but for that we have to use strcpy function.
and the LCD_OUT function was showing always zero during the conversion from int to str...
Hi all,
I checked this
adc_value= ((int(adresh) & 3) <<8) + adreshl;
but this is in vain. No change at all.
what i cant understand is this, why ADRESH is not getting updated. I checked the value of that register without any conversion, mean directly took the adresh value to LCD, but its...
Hi all;
Please find a simple problem that I have here. Am trying to make an ADC library for PIC16F88. While reading the ADC value, I cant get the value of ADRESH, while the other register ADRESL gets fill over after 255 count and does like this for 4 times over the entire scale of 0 to 5V...
Hi Brian,
indeed i have turned on the GIE. coz i have declared INTCON=0xa8. and I have checked the interrupt are working or not.and when i checked the value of the changing variable ie e=0-->890, it is happening, but its inside the ISR only and its not visible to outside main function, also...
yes, that indeed helped me. and I found i found this particular para from the manual and then am clear why the variable m wasn't changing."A character constant is one or more characters enclosed in single quotes, such as 'A', '+', or '\n'. In the mikroC PRO for PIC, single-character constants...
Hi all, thanks for the information regarding the header and extra files in the main c program, that indeed removed some of the confusions. But Even after implementing the suggested changes in the program,i could not get the value assigned to the char variable m[] and get it printed. I am...
i could not understand that fully, so can you please explain what you mean by correcting a simple program that I written in similar fashion.
The program will display 2 different message after pressing the button at portb.b1, which is detected by the IOBC.b1 to get to the ISR and ISR prints the...
I have been trying to count the number of pulses reaches at the Tmr0 pin on the PIC. for that these are the conditions, the counter count whrn the portb.b2 is high, and its done through IOCB interrupt on portb b2 going on low to high. the counter will skip the counting if the counting is...
I tried to state the variable as volatile in a diffrent programm to see if it works!, but I could not get it working. can any one guide me on this matter?
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.