12f675_fuse_about_to_blow!


Results 1 to 40 of 929

Threaded View

  1. #33
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Code:
      ' hardware init
        PORTA = 0
        TRISA = %00111001   ' RA1 and RA2 are LED outputs
    So PORTA.1-2 are outputs

    And BYTES received will be
    Code:
    %10101011 or %10101101
    Code:
    PORTA = DAT_IN1 & %00000110
    The manual says:Bitwise Operators: & %00000001 ' Isolate bit 0 of BYTE.

    So I'm thinking: & %00000110 ' Isolate bits 1 & 2, would give:

    %00000010 from %10101011 & %00000100 from %10101101 as PORTA, depending on which button was pressed and light the LED's.

    Hot, cold or tepid?

    Dave
    Last edited by LEDave; - 24th November 2010 at 20:05.

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