PIC's ports individual bits manipulation - how to?


Results 1 to 39 of 39

Threaded View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938

    Default PIC's ports individual bits manipulation - how to?

    Hello,

    In one of my projects, I have to adress the first (LSB) four bits of my PIC's PORTA.

    This is done within a FOR...NEXT loop so the bits are adressed as a variable ("Digit").

    I would like to use the other four bits for other purpose (Button, any Input...) but I can't make this the way I did it up to now.

    How is it possible to handle ONLY those four bits wihtout modifying the other (MSB) four bits?

    I've attached my code if you like to see how I've done it. Any comments/critics are very welcome.
    Roger

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Individual Variable bits
    By tazntex in forum General
    Replies: 4
    Last Post: - 31st January 2008, 18:27
  3. Equating Ports to Data Bits
    By Osiris in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd March 2006, 15:00
  4. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31
  5. pics with 3 hardware PWM ports
    By CBUK in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th August 2004, 00:14

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