shubham kumar
Member level 3
- Joined
- Sep 11, 2014
- Messages
- 59
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Location
- bangalore
- Activity points
- 511
Hi
I am using PIC18F452. I as compiler I am using "MikroC".
1) I cannot see the waveforms in this compiler (I mean I didnt find any such option to see the waveforms like that of timer and PWM module). Can you tell me some compiler or IDE that will do that.
2) I just tried to implement the following code on the board
whenever I connect +5 volts to RD4_bit or RD5_bit , it is functioning fine but if i remove that then also it is behaving same. but if I connect it to ground then only it went for the "else" part.
I asked a friend he said that it takes TTL input if you don't connect anything it will take it as '1'.
Please throw some light on that.
3) Same kind of problem it is giving while implementing PWM. I have to make one input ground for making it work, just by removing the supply (+5V), it defaults takes it as '1'. (thats my conclusion, if something wrong please share with me )
I am using PIC18F452. I as compiler I am using "MikroC".
1) I cannot see the waveforms in this compiler (I mean I didnt find any such option to see the waveforms like that of timer and PWM module). Can you tell me some compiler or IDE that will do that.
2) I just tried to implement the following code on the board
Code:
TRISD = 255; PORTD = 0; // designate PORTD pins as output
PORTC = 0; // set PORTC to 0
TRISC = 0; // designate PORTC pins as output
while(1)
{
if(RD4_bit==1) {
Delay_ms(2000);
RC6_bit= ~ RC6_bit ;}
else if(RD5_bit==1) {
Delay_ms(2000);
RC6_bit= ~ RC6_bit ;}
else
RC6_bit=1;
}
}
whenever I connect +5 volts to RD4_bit or RD5_bit , it is functioning fine but if i remove that then also it is behaving same. but if I connect it to ground then only it went for the "else" part.
I asked a friend he said that it takes TTL input if you don't connect anything it will take it as '1'.
Please throw some light on that.
3) Same kind of problem it is giving while implementing PWM. I have to make one input ground for making it work, just by removing the supply (+5V), it defaults takes it as '1'. (thats my conclusion, if something wrong please share with me )