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.
You are absolutely right, I have fixed the error.
The final code is:
unsigned short current_duty;
void InitMain() {
ADCON1=7; //Configure pins as digital
CMCON=0x07; //Disable comparators
TRISA.RA0=1;
TRISA.RA1=1;
TRISB.RB0=1...
It was my teacher's idea :(
Here's the code simplified:
Important: Motor runs in one way when both relays are off and in the other way when are both on.Pins RD2 and RD3 are for these relays,as in the simulation.
unsigned short current_duty, old_duty, current_duty1, old_duty1;
void...
I'm trying to control a dc motor(12 V) with two relays by using PWM. I've made the program(in MicroCfor PIC,because I'm using a PIC16F877A microcontroller) and the simulation in ISIS Proteus.
I have a problem, the motor doesn't run continously,it stops,then it starts again. I think it's...
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.