control dc motor speed using pic16f877a and display speed using lcd 16x2

Status
Not open for further replies.

azzalea

Newbie level 1
Joined
Oct 12, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,285
i need a circuit and program to control dc motor speed using pic16f877a and display speed using lcd 16x2
 

http://www.epemag.wimborne.co.uk/lcd1.pdf
http://www.epemag.wimborne.co.uk/lcd2.pdf

---------- Post added at 02:01 ---------- Previous post was at 01:58 ----------

PWM for PIC16F877A:

#include <htc.h>
#include <pic.h>

void main ()
{
int a=0xFF;
TRISC=0x00;
CCP1CON=0x0C;
PR2=0xFF; // set PWM period for approximately 19.53KHz
for(CCPR1L=0xFF,CCPR1H=0xFF;CCPR1L>0x00,CCPR1H>0x00;CCPR1L--,CCPR1H--)
_delay(100000);
T2CON=0x04;
}
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…