Need help in program for remote control using PIC16F84A


Results 1 to 8 of 8

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    the most inefficient way but easy to follow.
    Code:
    LOW PORTB.4
    Key var byte
    
    start:
        Key=(PORTB&$0F) rev 4
        If Key<>4 then Start
        While key 
            Key=PORTB&$0F 
            wend 
        pause 50
    
        Wait2nd: 
            Key=(PORTB&$0F) rev 4
            if key=0 then Wait2nd
            If Key<>9 then Start
            While key 
                Key=PORTB&$0F 
                wend 
            pause 50
    
        Wait3rd:
            Key=(PORTB&$0F) rev 4
            if key=0 then Wait3rd
            If Key<>2 then Start
        
        HIGH PORTB.4    
    Spin:
        goto spin
    Last edited by mister_e; - 16th July 2006 at 21:30.
    Steve

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

Similar Threads

  1. Octave synthesizer PIC program for PIC16f84A
    By esgrimae in forum Code Examples
    Replies: 0
    Last Post: - 21st July 2009, 05:15
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  3. Replies: 4
    Last Post: - 16th May 2008, 15:35
  4. Disabling bootloader under program control
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th March 2007, 16:35
  5. control servo motor by using pic16F84A
    By waterlee2000 in forum PBP Wish List
    Replies: 10
    Last Post: - 23rd June 2006, 15:31

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