Problems setting INTCONx registers in 18F4550


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378

    Default Problems setting INTCONx registers in 18F4550

    I am coding for a PIC 18F4550 with PBP 2.6. I need to set some of the bits in the INCON2, INCON3 and RCON registers and keep getting syntax errors at compile time for the following statements. As far as I can see in the Datasheet and the PBP manual these are correct syntax yet the errors. Can anyone tell me what is wrong with these?

    Code:
    ' Interrupts Settings
        RCON = %10000000      ' Set Interrupt Priority Enable bit (Bit7=IPEN) 
                              ' to enable priority levels on interrupts
        INTCON.7 = 1          ' Set Global Interrupt Enable bit
        INTCON2.7 = 1         ' Enable PORTB Pull-ups (Bit7-high), set INT2 for
                              ' falling edge (Bit4-low) on RTC's interrupt.
        INTCON3 = %10010000   ' Set INT2 high priority (Bit7-high), enable INT2
                              ' (Bit4-high)
        RTC_INT_FLG  VAR INTCON3.1 'Alias for RB4 INTA interrupt from RTC

  2. #2
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default Compile errors

    I hesitate to say this as I guess you must be an experienced PBP programmer - have you selected the chip type as 18F4550 in the 'chip select' box?

    Regards Bill legge

  3. #3
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Talking Duhh...that was it...senior moment!

    Quote Originally Posted by Bill Legge View Post
    have you selected the chip type as 18F4550 in the 'chip select' box?
    Thanks, Bill. . Even experienced programmers have their senior moments. I should have looked at the device setting all along

Similar Threads

  1. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 14:01
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51

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