4 Quadrant dc drive with 16F877


Closed Thread
Results 1 to 3 of 3
  1. #1
    mns45's Avatar
    mns45 Guest

    Default 4 Quadrant dc drive with 16F877

    Hi, I'm a beginner in this forum.
    I want to control a 12 Volt DC motor in constant speed. To do it, i will use half of H bridge. As i have two switching element, mosfet, i will have two gate signal. I want to do it by 16F877, know i have to learn that how i could convert an analog input to a digital. I have an potentiometer , i change the resistance and i set an analog value and pic understand it.
    The second question. I have to make pwm in constant frequency. Pic take the analog value from its leg (the first analog value for the speed which we set at first ) and there is a feedback system, feedback voltage from tako, pic compares the value comes from tako with we set at first and if neccessary it will change the duty cycle in constant frequency.
    Example: we set 100 mV to drive motor in 1400 rpm

    I want to get some examples in assemble (16F877) for analog digital converter. And i wanna know to make a pulse in constant frequency.
    I look at pic 16F877 datasheet but i think it is hard to solve problem by using datasheet. Some basic example will help me too much. Thanks very much. Please help me...

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Use the inbuit hardware PWM

    Hi,

    You can set up the hardware PWM for a constant frequency output without any code overhead. Then you can sample your pot and dump it to the PWM duty cycle. Both are 10 bits. Easiest way to get a pot controlled variable dutycylce signal.

    Regards

    Sougata

  3. #3
    mns45's Avatar
    mns45 Guest


    Did you find this post helpful? Yes | No

    Default

    I have an algoritm for how I create pulse to drive mosfets. I take the value from tako and I compare it the control voltage (I set it with pot at first) and I get new D. I want to see some code examples in assemble for analog to digital conversion by using a pot in pic input (1* to set reference voltage and 2* for tako feedback). In my program, pic is continuously take voltage which comes from tako, and change duty cycle. If you give me some code examples or web pages includes written programs in these topics, i will happy more.
    Thank you for your interest.

Similar Threads

  1. 4 pin 4 x 4 keypad interface using pic basic pro
    By dunlao_john in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th January 2009, 05:21
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  3. ISD4003 & 16F877 Interface
    By sayzer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th December 2006, 17:50
  4. problem using 16f877
    By yrch in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th February 2006, 18:58
  5. Real Time Clock & Eeprom
    By smart_storm in forum General
    Replies: 8
    Last Post: - 17th February 2006, 19:03

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts