variable to equal low 4 bits of portB, and OUTPUT b4-b7


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    i think i am going to try this tomorrow....





    keyvalue = portB & $0F 'bitwise 00001111
    trisB.7 = 0
    XXXXXXXXXXXXXX
    trisB.7 = 1



    on a side note, i was namely trying to emit sound on the "sound" command... since it can only be done on portB, and so i tried to dot he sound command, and it worked. on the plus side as well, the speaker is grounded so it was a convienient "pull-down"

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by reaper0995 View Post
    ... since it can only be done on portB
    Why is it limited to Port B?

Similar Threads

  1. PIC16F877A for application in mobile robot...
    By mcbeasleyjr in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th January 2009, 14:47
  2. problem with input and output (18F452)
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th March 2008, 23:21
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

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