PIC BASIC Compiler pbc:- Help!


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    mramos's Avatar
    mramos Guest


    Did you find this post helpful? Yes | No

    Default

    Timmoore47:

    You will want to map port A and port B with the "symbol" command like:

    Symbol PortA = 5

    Then read it:

    peek PortA,B0 'read PortA into Byte0 variable

    If the LEDS are on port B, then map PortB with Symbol and Poke PortB,B0

    Note the number of pins on PortA, you might not need to wire LEDs to all of port B.

  2. #2
    timmoore47's Avatar
    timmoore47 Guest


    Did you find this post helpful? Yes | No

    Default

    Thank you. I'll try that out.



    Tim

  3. #3
    Join Date
    Jan 2007
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    Hi timmoore47,
    How many switches?

    I use 2 approaches.

    If I have plenty of pins to use, I prefere binary switching to a pic as its fast and easy to implement.

    If I am short of pins, I use POT or A/D.
    For Pics that don't have A/D, I use the POT command.
    I set up buttons in a resistive divider ladder.
    Then I have the PIC talk to my PC serialy.
    I press each button to see what the pic is getting for POT or A/D readings and then using those values, the next step is to code where to go in the rest of the program, based on these readings.
    Hope this helps
    dw_picbasic

Similar Threads

  1. PIC BASIC Compiler for ARM machines?
    By stone20008 in forum General
    Replies: 2
    Last Post: - 22nd August 2008, 07:14
  2. using AND as an IF statement
    By dw_pic in forum mel PIC BASIC
    Replies: 27
    Last Post: - 8th June 2006, 18:05
  3. Replies: 5
    Last Post: - 17th January 2006, 19:26
  4. PIC Basic Pro Compiler
    By iclok in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th November 2005, 03:22
  5. How to learn PIC BASIC compiler in 7 days?
    By luqman83salleh in forum General
    Replies: 2
    Last Post: - 13th August 2004, 14:15

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