Using PWM built in Module 16F628


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RodSTAR View Post
    ...

    anyway i found that your POT & CCPR1L line is amazing !
    Thanks.

    If you like to use a PIC with on board ADC and PWM modules, like 16F877 or 12F683, then you can also use a single line as below.

    Code:
    ADCIN 0, CCPR1L
    
    'This will read Analog channel 0 
    'and put on PWM register right away.

    If you like to use F628 with POT command, then make sure that the pot is not connected to "input only" pins. Pin must be a bi-directional pin.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    May 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Wink

    good morning sayzer, mister_e,

    About the PWM thing, I'm clear and OK,

    but... reading your last posts I don't know if understood correctly:

    -> what I understood is that I can measure the value of a potentiometer into any I/O pin without any necessary A/D conversion feature? In other words, in a 16F628A: I could use 16 potentiometers?? wow!! that would be crazyly cool!

    (sorry my english)

  3. #3


    Did you find this post helpful? Yes | No

    Talking almost!

    Quote Originally Posted by RodSTAR View Post
    -> what I understood is that I can measure the value of a potentiometer into any I/O pin without any necessary A/D conversion feature? In other words, in a 16F628A: I could use 16 potentiometers?? wow!! that would be crazyly cool!
    From what I've read, that's sort of correct. it can use any bidirectional digital pin.

    It can not be used on an open collector output pin, or an input only pin.

Similar Threads

  1. Half-bridge PWM with a 16F684 ?
    By Byte_Butcher in forum General
    Replies: 7
    Last Post: - 17th January 2010, 23:18
  2. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 07:03
  3. PWM Module 18Fxx31
    By iphillipsca in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th April 2008, 09:06
  4. Pwm 16f628
    By mladenovic in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st September 2005, 22:16
  5. pic 18Fxx31 PWM module
    By dirace in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th May 2005, 20:51

Members who have read this thread : 0

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