Please help with sample code on 12f675


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2010
    Posts
    8

    Default Please help with sample code on 12f675

    Hello.

    I have a pic 12F675.
    I want to store in memory time while a port is high.
    Ex. GPIO.0 is in low. He's going in high and wait until it goes again low. I want to know how much time passed and save in memory.
    Time must be between 5 and 15 seconds. If it is more, chooses the maximum value. If it is less, the minimum value.

    Thanks.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: Please help with sample code on 12f675

    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159


    Did you find this post helpful? Yes | No

    Default Re: Please help with sample code on 12f675

    Quote Originally Posted by Acetronics View Post
    Hehe - that made me laugh!
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  4. #4
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Please help with sample code on 12f675

    thats a real real basic program, you can just do a loop to monitor the pin , as soon as pin goes high, change to second loop, use a pause and count, store variable, if you wanted to you could have another pin blink a led to display the seconds count wait a bit then repeat. you should be able to build the code from the manual or samples page using blink led program and loop sample.
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

Similar Threads

  1. PWM with 12F675
    By fratello in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th October 2009, 18:25
  2. 12f675 very confused
    By glkosec in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 21st July 2009, 01:35
  3. external clock / internal clock
    By grounded in forum General
    Replies: 4
    Last Post: - 31st May 2008, 17:44
  4. 12f675
    By mystified in forum mel PIC BASIC
    Replies: 6
    Last Post: - 10th September 2007, 02:47
  5. 12F675 Datasheet
    By geckogrotto in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd October 2006, 02:50

Members who have read this thread : 1

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