12F683 - basic code not working


Results 1 to 40 of 57

Threaded View

  1. #11
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: 12F683 - basic code not working

    Al,

    The PIC is on an EasyPIC5 development board, but basically this is the schematic. I've also tried replacing the LDR with a 10k pot and whilst the LED on the dev board dims in brightness the threshold values still have the same effect. Placing the LDR between +5 and GPIO.0 gives a better range of brightness in the LED (not shown in the schematic) from off when the LDR is covered, to bright when an LED torch is placed directly over the LDR.

    I don't program much, so often feel like a newbie when I dust off the development board, and ADC is something I've only once played with. As far as I can understand, the voltage on GPIO.0 should be converted into a byte value between 0 and 254, so I could set the threshold at which point GPIO.4 is made high ?
    Attached Images Attached Images  

Similar Threads

  1. 12F683 - Pin1 not working
    By ruijc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th February 2014, 17:38
  2. 12F683 Maths and code genius reqd.
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 1st January 2014, 08:44
  3. please help with 12f683 pwm code
    By haidar in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd May 2013, 21:25
  4. Problem converting 12F683 code to 12F1840
    By RossWaddell in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th March 2013, 01:55
  5. Working code but my layman approach uses too much code space
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th December 2012, 20:44

Members who have read this thread : 2

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