$90 is not equal to %1001000?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default $90 is not equal to %1001000?

    Hello,

    I'm new to PICs.

    Starting with some simple examples, I don't understand why, for example:

    INTCON = $90 works

    when

    INTCON = %1001000 doesn't.

    What is the difference?

    Flotul

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    Hello,

    I'm new to PICs.

    Starting with some simple examples, I don't understand why, for example:

    INTCON = $90 works

    when

    INTCON = %1001000 doesn't.

    What is the difference?

    Flotul
    Your binary example has a ZERO missing

    If you take of the bit that you think is "9" (1001) then you are left with "000" not "0000"

    The effect of that is that instead of being treated as 1001 0000 which should be $90 it gets treated as "100 1000" which is $48

    HTH
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Well,

    If I can't count up to eight, I should better stop right now :-)

    Thanx a lot.
    Roger

  4. #4
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    Well,

    If I can't count up to eight, I should better stop right now :-)

    Thanx a lot.
    Dont worry.... its only the first of many mistakes that you will make
    Keith

    www.diyha.co.uk
    www.kat5.tv

  5. #5
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Thumbs up

    Yeah, there will sure be some doozys that make you wonder if you know anything at all....most will be plain and simple. This forum will be of great assistance to you, as it has been to me, on those occasions when I have deemed myself too stupid to figure something out and to ask someone. My after thoughts usually start with..."oh yeah, damn, why didn't I think of that?????"

Similar Threads

  1. A PIC logic 0V output is not equal to a ground?
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th November 2009, 18:47
  2. 16F877A equal with more memory
    By Tobias in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 16th June 2009, 08:04
  3. Replies: 4
    Last Post: - 15th April 2009, 01:54
  4. Replies: 5
    Last Post: - 30th April 2008, 20:01

Members who have read this thread : 1

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