I don't understand this code!


Results 1 to 40 of 47

Threaded View

  1. #22
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    Hi Pic_User. Yes, I know that, but why cannot I connect the LEDs to + and pulse to ground? I changed the program, trying to zero in on the probem. Now GPIO.1 pulses to ground like I want but GPIO.0 pulses positive in phase with GPIO.1. I would not expect GPIO.0 to change at all.

    high GPIO.0 'INITIAL CONDITIONS
    high GPIO.1

    START:
    low GPIO.1
    high GPIO.0
    PAUSEUS 4168 ' ON TIME
    high GPIO.1
    PAUSEUS 4167 'DEAD TIME, BOTH high
    high GPIO.1
    PAUSEus 4168 'FOR 4.168 MILLISECONDS
    high GPIO.1
    PAUSEUS 4167 'DEAD TIME

    GOTO START '60 HZ FREQUENCY

    END

    I will post the final circuit so you can see what I am trying to do. I want to replace the 555, flip flops and gate with the PIC.
    Attached Images Attached Images  
    Last edited by Russ Kincaid; - 7th May 2007 at 17:10.

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

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