-
Search Results
-
Hi there, I have read through your tutorial about interfacing DC Motor with PIC Microcontroller using IC L293D and also how to enable the output by controlling the input of PIC with the use of LED light, the part I don’t understand is what is a pull up resistor you meant in the tutorial? The pull up resistor is connected to the switch.
I am currently doing a project which is a robot, when I turn on the switch, the robot will move forward direction, when it touches the wall, a sensor will be triggered and the motor will turn in another direction to move backwards. Any idea how the connection should be?
One last question, the code you posted is in what language please? Is it in C++ or?
Your help is very much appreciated, thanks.
Below is the tutorial links that I have question about:
https://electrosome.com/dc-motor-l293d-pic-microcontroller/
https://electrosome.com/push-button-switch-pic-microcontroller/
How to make a pin of Microcontroller in High Impedance State ?
How to make a pin of PIC Microcontroller in High Impedance state ?
MPU6050 interface with PIC16F877A,
Is this possible ?
Topic: PWM by pic 16F877A
Hey guys,
I am using 16F877A to output PWM, increasing and decreasing it via two push buttons its based on the code used in DC Motor Speed Control using PWM with PIC Microcontroller in MikroC but the problem is that after a certain PWM value the PWM will not decrease and I have also added a switch with instantly makes duty value zero but it also doesn’t work after a certain pwm value and I have tried it on Proteus as well as with leds in real life but they give the same result. Only way it goes low is to keep pressing the UP button then some how it come down to a low value then other two switches start working and I then can switch it pwm off. Don’t know whats wrong.
Here is the code:-
{ adc = ADC_Read(1); // Get 10-bit results of AD conversion rpm_temp = adc * 2; //converting analog value to rpm WordToStr(rpm_temp, speed_out); //converting integer to string to disply on LCD Lcd_Out(2,9,speed_out);//Write speed in 2st row 6th col Delay_ms(100); if (RD0_bit ==0 && duty<250) //if button on RD0 pressed { Delay_ms(100); duty = duty + 10; //increment current_duty PWM1_Set_Duty(duty); //Change the duty cycle } if (RD1_bit ==0 && duty >0) //button on RD1 pressed { Delay_ms(100); duty = duty - 10; //decrement duty PWM1_Set_Duty(duty); } if (RD2_bit ==0 && duty >0) //button on RD2 pressed { Delay_ms(100); duty = 0; //reset duty PWM1_Set_Duty(duty); }
