Time-Lapse


Closed Thread
Results 1 to 40 of 43

Thread: Time-Lapse

Hybrid View

  1. #1
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    A little friendly chat is never a bad idea. After all it was me who asked for a description, remember?

    Re "Cool idea": Well I don't know what you mean, maybe because I am not the youngest. Please explain.

    I just added the ldr and unfortunately the +5V->LDR->IO-Pin-idea does not work. The voltage levels are not within the specified High/Low-Levels of the PIC. I found that Light means 1kOhms and None means from 8-16kOhms.

    So I added a resistor of 4.7kOhms:

    +5V->LDR->IO-Pin->4.7kOhms->Mass. Now there are voltage levels of about 3.2 and 2.3 Volts, which is still not within the specification.

    Now I am planning to use the integrated Comparator but I do not know how, yet. What are the fuses?

    On a 16f628 I guess it is CMCON=%11001010 for the PIN on RA2 but what about VREF. How to activate that in the high range?

  2. #2
    Join Date
    Dec 2005
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    Try the RCTIME code I posted. It should work since it sounds like the resistance values for your ldr are bascally the same a the CDS Cell I am using. I have no resistor though, just connected directly between the pin and 5V.

    "cool" is a slang term that sort of means "neat" or "interesting". Again, sorry about that. I'm not used to being on a forum that has so much input from different countries. It is really "cool"! ;-)
    Gary

  3. #3
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Talking

    I succeeded simply by using a check whether the PIN is High or Low - without the comparator.

    I am using BluTak to connect the ldr to the led and it works.......marvelously.

    Silent movement of the servo coming closer to the button. Then the servo softly moves forward and as soon as the camera reacts it stops. No matter in which position the cam is, it always stops gently. Simply awesome. I am excited.
    Last edited by Ted's; - 15th May 2008 at 06:11.

  4. #4
    Join Date
    Dec 2005
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ted's View Post
    I succeeded simply by using a check whether the PIN is High or Low - without the comparator.
    Hey there you go. Keeping it simple. Makes sense since you don't need to sense a gradual change in the light. Good job!
    Gary

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by g-hoot View Post
    Hey there you go. Keeping it simple. Makes sense since you don't need to sense a gradual change in the light. Good job!
    I would think a person would want to read that pin a number of times though, a kind of 'software hysteresis', just to make sure the pin isn't jumping 0 to 1 to 0 to 1, and causing something to go a bit flakey......unless of course the jumping around is what you're looking for!

  6. #6
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Arrow

    Quote Originally Posted by g-hoot View Post
    Hey there you go. Keeping it simple. Makes sense since you don't need to sense a gradual change in the light. Good job!
    Gary
    The 16F628a does not have a ADC. The difference between using the IO pin vs the comparator-module is the non-defined space between about 2,5 and 4 volts.

    That means that within this area the PIC could percieve a high as a low and vv. This problem does not occur when using the comparator, so in the long run the comparator is better. I guess this is what skimast said aswell.

    So let us come back to the comparator. The LDR is connected to RA2. Which fuses are needed to make RA2 connect to the (non-)inverting input, the other input to vref and to disable the other comparator? I am adressing all of you.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ted's View Post
    So let us come back to the comparator. The LDR is connected to RA2. Which fuses are needed to make RA2 connect to the (non-)inverting input, the other input to vref and to disable the other comparator? I am adressing all of you.
    No fuses, just set the right registers to the right value.

  8. #8
    Ted's's Avatar
    Ted's Guest


    Did you find this post helpful? Yes | No

    Default

    I thought the word for VRCON, CMCON etc. is fuses. Good to know better.

    So what I want to know: Which numbers are to be used for VRCON and CMCON for the effect wanted?

Similar Threads

  1. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 02:55
  2. Measuring time
    By AugustoPedrone in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th July 2007, 23:46
  3. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  4. Alarm Time
    By Santana in forum Code Examples
    Replies: 1
    Last Post: - 8th December 2006, 13:58
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

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