newbie needs help!!!!


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    must be more like this
    Code:
    CMCON=7 ;disable internal voltage comparator
    
    pir VAR GPIO.5 ;define GPIO.5 pin as pir
    cam VAR GPIO.4 ;define GPIO.4 pin as cam
    loop100times  VAR BYTE ;define variable for big delay loop
    
    
    
    loop:
                   loop100times=100  
                   if pir then ;mean if pir=high
                        cam=1 ; do the same thing as HIGH cam
                        pause 1000 ; pause 1 sec as request
                        cam=0 ;same as LOW cam
    
                        ; now do the big delay
                        while loop !=0                
                              pause 1800
                              loop100times=loop100times-1
                        wend
                   endif 
                   goto loop
    if i well understand what your project do is waiting for a high state on pir pin then send 0 level to cam pin 1 sec after send high level to cam pin during 180 sec (3 minutes) right??? but i think something is missing!!! let me know the exact thing you want to do...

    As i read you're a newbie so take care of MCLR (pin 4) is pulled up with resistor(4.7K-10K) to 5 volt supply.

    it's suppose to work well now.

    regards
    Last edited by mister_e; - 14th October 2004 at 05:24.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Newbie making an ignition timer
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 5th August 2012, 17:45
  2. Newbie HELP :(
    By TheOne in forum mel PIC BASIC
    Replies: 3
    Last Post: - 27th March 2009, 17:15
  3. Newbie: Temperature measurements
    By Budda in forum General
    Replies: 10
    Last Post: - 30th March 2007, 09:56
  4. PIC Newbie
    By azmax100 in forum Schematics
    Replies: 7
    Last Post: - 23rd February 2007, 04:52
  5. request for a newbie forum
    By nimonia in forum Forum Requests
    Replies: 1
    Last Post: - 20th May 2006, 09:01

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