Make me some code..


Results 1 to 40 of 41

Threaded View

  1. #10
    Join Date
    Aug 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    I can try. No timer use
    Code:
    DEFINE OSC 4
    CMCON = 7
    ADCON1 = 7
    output PORTB.0
    input PORTA.4
    b0 var word
    b0 = 0
    HIGH PORTB.0
    pause 200
    
    main:   if PORTA.4 = 1 then enter
            goto main
    
    enter:        if porta.4 = 1 then enter
                
    tmecnt:    if PORTA.4 = 1 then extime
                  b0 = b0+1         
                   pause 100   ' Least count of time 100 ms
                  goto tmecnt
    
    extime:     if PORTA.4 = 1 then extime
    
    ledon:  b0 = b0 * 100
            LOW PORTB.0
            pause b0
            HIGH PORTB.0
            b0 = 0
            goto main
            end
    If code works, can i give my PayPal................ hehe
    Last edited by NF9Ω; - 12th September 2007 at 09:41. Reason: led state change
    Thought-habits can harden into character. So watch your thoughts.

    (__)

Similar Threads

  1. Code doesn't work on 16F648A
    By Mr_Joe in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st September 2018, 22:09
  2. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  3. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  4. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  5. Can someone help me make a code for this:
    By joseph in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 18th May 2009, 22:03

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