Need help in program for remote control using PIC16F84A


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Location
    Southern California, U.S.A.
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    I put together a schematic of the project I am designing. Sorry that it is a little "scrunched" but I assume you don't have the software that I am using to design it. It was difficult to get the entire schematic on the screen at one time. I designed it on Livewire by New Wave Concepts. I converted the image to a JPEG photo and am sending it as an attachment for your ease of viewing. Thanks again for your input. ( let's see if I am actually successful in attaching the photo, hahahaha)

    Darren
    Attached Images Attached Images  

  2. #2
    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 20:30.
    Steve

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

  3. #3
    Join Date
    Jul 2006
    Location
    Southern California, U.S.A.
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Steve,

    Thanks a million for the code. I tried it in my complier but had problems. I think it was because your code was designed for Pic Basic Pro and I only have the standard version. I found that out because I saw you used the statement "wend" which I believe is only supported by the Pro version compiler. I am attaching two JPEG photos of what the errors screen looked like when I tried to compile it. The first photo is what your code looked like in my compiler starting at line 11 and ending on line 38. The second photo was what the error messages looked like. I will try to make some changes but unfortunately I don't understand much about the Pic basic language yet. Thanks again.

    Darren
    Attached Images Attached Images   

  4. #4
    Join Date
    Jul 2006
    Location
    Southern California, U.S.A.
    Posts
    7


    Did you find this post helpful? Yes | No

    Talking Got it!

    Woooo Hoooooo !!! I finally got it. Only took me about one and a half pages of code to do this simple task. You got me going in the right direction Steve, Thanks

    Darren

Similar Threads

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