How do I to set one bit in a register?


Closed Thread
Results 1 to 3 of 3
  1. #1
    jessey's Avatar
    jessey Guest

    Default How do I to set one bit in a register?

    Hello,

    I have a quick question, I'm trying to figure out how to address bit 3 of the T1CON: Timer1 Control Register for an 18F452 but can't figure out how to do that. If I do this "T1CON = %00001000" as far as I know (correct me if I'm wrong) would enable the Timer1 Oscillator but also it would be affecting the other bits in that register which is something I don't want to do. Could I use T1OSCEN = 1 to enable the oscillator and or T1OSCEN = 0 to shut it off?

    Thanks
    jessey

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    T1CON.3=0

    or

    T1CON.3=1

  3. #3
    jessey's Avatar
    jessey Guest


    Did you find this post helpful? Yes | No

    Default Thanks Melanie

    Thanks Melanie,

    I appericate your response.

    jessey

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  2. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 18:51
  3. MX7705 or AD7705 experience
    By FM11 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th January 2006, 21:54
  4. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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