Mikro C Help needed

Discussion in 'Embedded Systems and Microcontrollers' started by bilal sheikh, Mar 11, 2015.

  1. bilal sheikh

    Thread Starter New Member

    Jan 21, 2015
    22
    0
    i am trying to access particular bit of a Port in Pic18f4431 using mikro C. i am using the port as input port by writing TRISC=255;
    however i am getting this error, kindly help.
    Screenshot (39).png
     
  2. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    I don't see how that could fail unless there's a fairly basic bug in the compiler, where it doesn't know how to control PortC. Is it possible that the bug is in your setup of your project, and you've told the compiler that you have some other processor, which doesn't have PortC?
     
    bilal sheikh likes this.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    Post the exact code (copy & paste) for lines 51 and 52... also the preceeding few lines.

    Sometimes an error in one line will not get detected till a few lines later, so always look what comes before an offending line if it looks perfect.
     
    bilal sheikh likes this.
  4. bilal sheikh

    Thread Starter New Member

    Jan 21, 2015
    22
    0
    thank you all, the issue was resolved. i was using PORTC.C0 instead of PORTC.RC0.
     
Loading...