Register Settings


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default Register Settings

    Hi Everyone,
    Newbie type question: Yeah I know I should already know this, do the following code snippets have the same meaning?
    intcon.7 = 1
    intcon = %10000000
    intcon = 128
    I think so but I am unsure of the 1st snippet.
    Thank You
    JS
    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.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Yes and no,
    the last 2 yes do the same thing but the first one ONLY affect bit 7 and don't care about the other ones. Depending what you REALLY need to do, the first may have it's own advantage.

    Same thing when you compare

    PORTB=128
    PORTB=$80
    PORTB.7=1
    HIGH PORTB.1
    Last edited by mister_e; - 26th September 2007 at 01:29.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Yes and no,
    the last 2 yes do the same thing but the first one ONLY affect bit 7 and don't care about the other ones. Depending what you REALLY need to do, the first may have it's own advantage.
    Thank You mister_e,
    I thought that was how it worked but wanted to make sure.
    Thanks again
    JS
    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.

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 21:31
  2. Can anyone help a newcomer?
    By scopit in forum Schematics
    Replies: 18
    Last Post: - 20th October 2009, 10:23
  3. PIC16F886 Register Settings
    By aherrera in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th July 2009, 18:52
  4. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 19:51
  5. MX7705 or AD7705 experience
    By FM11 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th January 2006, 22:54

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