Pic12f683 Cmcon0 = 7


Results 1 to 26 of 26

Threaded View

  1. #19


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    OK, the penny's dropped...

    mon = 16 bits, whilst width = 8 bits... you can't put a quart into a pint pot...

    try...

    width = mon/4

    In case you're wondering why /4 instead of /8... that's because your ADC reading is 10 bits. So why not read 8-bit ADC to start with?
    Because I'm such a noob that I have no idea how to do that. Now I'm really confused.

    So with this change, when the IC reads less than 2 volts on "mon" it should execute hpwm 1,255,2000; more than 2 volts and it should execute 1,32,2000?

    ~ Dave
    Last edited by StoneColdFuzzy; - 11th June 2009 at 21:07.

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  3. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  4. Working with indivividual bytes of an array
    By J_norrie in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd January 2007, 19:16
  5. code conversion
    By saturnX in forum mel PIC BASIC
    Replies: 19
    Last Post: - 3rd October 2005, 17:17

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