ok. thanks codytech.
I see it I will try this
Search found 25 matches
- 06 Dec 2011 14:31
- Forum: mikroC PRO for PIC General
- Topic: PIC 16F877A PORTA Problem
- Replies: 3
- Views: 4488
- 06 Dec 2011 12:03
- Forum: mikroC PRO for PIC General
- Topic: PIC 16F877A PORTA Problem
- Replies: 3
- Views: 4488
PIC 16F877A PORTA Problem
Hello again everyboy, I have a problem. When I use pins of PORTA as input, I want to check the PORTA.F0 is 1 or not. if I check the pins of porta 0,1,2 and 3 my code works.However if I check only PORTA.F0 is 1 or not, my code doesn't work. My code is below which is work; void main() { int i = 1; ADC...
- 05 Dec 2011 13:13
- Forum: mikroC PRO for PIC General
- Topic: Voltage problem. 16f877a
- Replies: 6
- Views: 1967
Re: Voltage problem. 16f877a
Thank you Mario.
I added the codes is below
and now it looks ok.
I added the codes is below
Code: Select all
ADCON1 = 0x0F;
CMCON = 0x07;
- 05 Dec 2011 09:50
- Forum: mikroC PRO for PIC General
- Topic: Voltage problem. 16f877a
- Replies: 6
- Views: 1967
Re: Voltage problem. 16f877a
Thank you for you replies. I use PIC16f877A. I want to use pins of PORTA as input and pins of PORTC as output. My code is below void main() { int i = 1; TRISA=0xFF; TRISC=0x00; PORTC = 0x00; while(i==1){ PORTC.F0=1; Delay_ms(500); if(PORTA.F3==1){ PORTC=0x00; } Delay_ms(500); } } I have a button and...
- 04 Dec 2011 00:08
- Forum: mikroC PRO for PIC General
- Topic: Voltage problem. 16f877a
- Replies: 6
- Views: 1967
Voltage problem. 16f877a
Hello, I have voltage problem. My code is below. I have a very simple circuit. A connection wire to a LED from PORTC0 pin and a button. I want to know a button is pushed or not which is checked by PORTB7 pin. if there is 5voltage on PORTB7 then LED on. Problem is that there are always 5 volt. on por...
- 08 Dec 2010 12:26
- Forum: mikroC PRO for PIC General
- Topic: Hex to C
- Replies: 2
- Views: 1273
Hex to C
Hi everybody,
I want to convert hex file to c code. Is this possible ?
I wait for your helping.
Thank you....
I want to convert hex file to c code. Is this possible ?
I wait for your helping.
Thank you....
- 11 Oct 2010 18:21
- Forum: mikroC General
- Topic: Charging system
- Replies: 5
- Views: 2273
Re: Charging system
Thank you for your helping....
I will try this tomorrow night. I hope that I can do it
Thanks again...
I will try this tomorrow night. I hope that I can do it
Thanks again...
- 09 Oct 2010 09:13
- Forum: mikroC General
- Topic: Charging system
- Replies: 5
- Views: 2273
Re: Charging system
My question is that Can i know the instantaneous current value or voltage using micro controller ? Well, you can measure the voltage of the battery by feeding it to a voltage divider (2 resistors in series), with the connection between the 2 connected to an ADC input of the PIC. Make sure the adc i...
- 08 Oct 2010 15:58
- Forum: mikroC General
- Topic: Charging system
- Replies: 5
- Views: 2273
Re: Charging system
There is no idea about the topic. this is interesting
- 08 Oct 2010 13:54
- Forum: mikroC General
- Topic: Charging system
- Replies: 5
- Views: 2273
Charging system
Hi everyone, I have a project about charging systems. The system looks simple :). I have a power supply, a battery, an inverter (to invert 12V DC to 220V AC), and last a lamp. Lamp (220V) <---- inverter (12V DC to 220V AC) <---- Battery <---- 220V (Urban electricity) The electricity needs of the lam...
- 24 Apr 2010 18:15
- Forum: mikroC PRO for PIC General
- Topic: Can Anybody Help Me???? ( Problem was Solved. Thank you!!)
- Replies: 7
- Views: 1968
Re: Can Anybody Help Me????
Eventually, I find the problem. It is a circuit fault.
Thank you everyone.....
Thank you everyone.....
- 24 Apr 2010 17:22
- Forum: mikroC PRO for PIC General
- Topic: Can Anybody Help Me???? ( Problem was Solved. Thank you!!)
- Replies: 7
- Views: 1968
Re: Can Anybody Help Me????
I have tried what you are suggesting with your own code, and it works, if you want, you can also use the button function (see help) in your case, it will be: button(&portd,0,1,0) || button(&portd,1,1,0) hope this helps ! regards Thank you for your interest. I tried button function. However, My prob...
- 24 Apr 2010 16:41
- Forum: mikroC PRO for PIC General
- Topic: Can Anybody Help Me???? ( Problem was Solved. Thank you!!)
- Replies: 7
- Views: 1968
Re: Can Anybody Help Me????
your program breaks from the first time !! you must change from: if( (PORTD.F0 !=1) || (PORTD.F1 !=1) ) break; to if( (PORTD.F0 ==1) || (PORTD.F1 ==1) ) break; or if((PORTD ==0x01) || (PORTD==0x02)) and also, you must set TRISD at least to 0x03, because RD0 and RD1 are inputs, Regards Thank you for...
- 24 Apr 2010 16:14
- Forum: mikroC PRO for PIC General
- Topic: Can Anybody Help Me???? ( Problem was Solved. Thank you!!)
- Replies: 7
- Views: 1968
Re: Can Anybody Help Me????
p.erasmus wrote:You are not new to the Forum please use the code tags when posting code
Code: Select all
sorry, I have tried to solve my problem for 5 hours. Now, I am not ok. my brian does not work more...
- 24 Apr 2010 15:59
- Forum: mikroC PRO for PIC General
- Topic: Can Anybody Help Me???? ( Problem was Solved. Thank you!!)
- Replies: 7
- Views: 1968
Can Anybody Help Me???? ( Problem was Solved. Thank you!!)
Hello everybody, I have a problem. I have some codes which do not work. It is below. =========================================================================================== void Light() { int k=0,i=1,m; while ( i==1 ) { k=k+1; PORTB=32; // This is ok. Delay_ms(20); if( (PORTD.F0 !=1) || (PORTD.F...