Overthinking what must be simple


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    No, wait a minute. Adding won't do it, will it? 01111111 + 01111111 = 11111110

    Hmm....

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ChrisHelvey View Post
    No, wait a minute. Adding won't do it, will it? 01111111 + 01111111 = 11111110

    Hmm....
    Not sure how you would do it but 2 ports probably make a word something like
    MyVar VAR WORD
    PortB myvar.lowbyte:
    PortC myvar.HiByte . . .
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Jul 2006
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Yeah, that makes sense. I forgot about the lowbyte, HiByte reference.
    No, I don't need that many settings. I was just curious.

    Thanks a lot. I think I can get it done now.


    Chris

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ChrisHelvey View Post
    No, wait a minute. Adding won't do it, will it? 01111111 + 01111111 = 11111110

    Hmm....
    Yep,
    127 + 127 = 254
    As long as you only use seven bits on each port and add those you will stay below the 255 limit.

    How many combos can you come up with using two 7 bit numbers like that. One heck of a comination lock.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Oct 2005
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    And, if you wanted to do this with 3 pins instead of 8 add a 165 PISO shift register.

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 10:45
  2. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  3. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  4. Replies: 4
    Last Post: - 7th September 2005, 14:11
  5. Simple Serial communications
    By kitcat in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th July 2005, 19:42

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