This is a sample code for the DC motor with Quadrature Encoder using PIC18F.
Hardware:
- SK40C with PIC18F4431.
- USB ICSP PIC Programmer
- 20MHz external crystal
- 16x2 LCD
- L293D motor driver IC
- SPG-30E-30K DC geared motor Gear ratio 30:1
Software:
IDE: MPLAB IDE
For the component setup you can watch this video:
If interested more you can follow this related tutorials:
- ARDUINO + 2A MOTOR SHIELD + ENCODER MOTOR
- 5 EASIEST WAYS TO CONTROL A DC MOTOR
- HOW TO CHOOSE A SUITABLE DC MOTOR?
Datasheet for this product can be found here:
Welcome to our technical forum if you have further inquiry.