Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem related with MPLAB compilation

Status
Not open for further replies.

girish09

Junior Member level 2
Joined
Jul 21, 2012
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pune
Activity points
1,450
I am trying to compile the code for PIC16F877A for Timer0. Previously the same code was built successfully(with MPLAB v8.10) but now it is showing
on error with MPLAB v8.56 as well as on MPLAB v 8.88
Error [192] F:\practice\T0_timer.c; 7.1 undefined identifier "OPTION_REG'
and shows build failed.
actually .cof file is generated properly when i build it with no error but when i rebuild my code it shows error 192...........would you please help me out?
PHP:

my code is as follows


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<htc.h>
         
         void main()
    {
        OPTION_REG=0x01;
         TRISB=0x00;
 
       while(1)
          {
               RBO=~RB0;
               TMR0=0x05     //count set to250usec with 1:4 prescaler to produce 250*4=1000usec delay
                while(!TMROIF);
                 TMROIF=0;
         }
  }

 
Last edited by a moderator:

Try to include pic16f877a.h and see.

Code:
 #include <pic16f877a.h>
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top