One Shot Rising


Closed Thread
Results 1 to 2 of 2

Thread: One Shot Rising

  1. #1

    Question One Shot Rising

    Hi everyone,

    I have a clock DS1307 and i need to move a stepper motor at each seconds. I would like at add a ONE SHOT RISING or something similar so that my chip (16f877a) doesnt repeat the motor step more than once every second. My problem at the moment is that my chip reads the instruction more than once every second.

    Any idea if a function is available with microcode studio plus or any idea how to create a ONE SHOT RISING. I would like my chip to create only one event only when my value changes .

    Thanks
    Attached Images Attached Images  

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Connect the 1307's SQW/OUT pin to the 877A's RB0/INT pin.
    From the picture, it looks like you'll need to move the SDA line to another pin.

    Set up the 1307 to output a 1Hz square wave output by setting BIT4 of the 1307's CONTROL register, with bits 0 and 1 both cleared (0).

    Then the INTF bit (INTCON.1) will be set on each Rising edge of the SQW signal.

    Then you can clear the flag (INTCON.1 = 0) and it will not be set again until the next rising edge, 1 second later.

    Interrupts not required.
    DT

Similar Threads

  1. Interrupt On both (Rising and Falling)
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 12th March 2008, 14:34
  2. Shot meself in the foot again...
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 6th July 2007, 19:30
  3. Best way to find a rising edge?
    By jcsquire in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 31st May 2006, 15:11
  4. 2 interupts - portb.0 rising and falling edges
    By EDWARD in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th July 2005, 01:10
  5. Replies: 2
    Last Post: - 5th June 2005, 19:55

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts