"Hex file loaded is larger than device" error

Discussion in 'Programmer's Corner' started by _MeRKeZ_, Sep 11, 2012.

  1. _MeRKeZ_

    Thread Starter New Member

    Sep 11, 2012
    2
    0
    Hi friends,

    I want to ask a question about pic programming. I searched google about this. I found a few similar topics but I didn't solve the problem. I have a pickit 2 and I use a card which I try the pic applications on. I connected these two device by ICSP. When I import .hex file I get this error. Despite this, when I press the write button. A different error happens. It says "divide by zero error" I pasted the code

    PS: The card runs Pic 16f877 and 16f877a codes


    Code ( (Unknown Language)):
    1.  
    2.  
    3.  #include <16f877.h>  
    4.    
    5.  #fuses XT,NOWDT,NOPROTECT,NOBROWNOUT,NOLVP,NOPUT,NOWRT,NODEBUG,NOCPD
    6.  #use delay(clock=4000000)    
    7.  #use fast_io(b)  
    8.  
    9.  void main ()
    10.  {    
    11.  setup_psp(PSP_DISABLED);
    12.  setup_timer_1(T1_DISABLED);      
    13.  setup_timer_2(T2_DISABLED,0,1);
    14.  setup_adc_ports(NO_ANALOGS);    
    15.  setup_adc(ADC_OFF);              
    16.  setup_CCP1(CCP_OFF);          
    17.  setup_CCP2(CCP_OFF);      
    18.      
    19.     set_tris_b(0x00);    
    20.     output_b(0x00);          
    21.    
    22.  basla:                
    23.  output_high(pin_b0);      
    24.  delay_ms(500);      
    25.  output_low(pin_b0);    
    26.  delay_ms(500);        
    27.  goto basla;        
    28.    
    29.   }
    30.  
    31.  
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    _MeRKeZ_ likes this.
  3. _MeRKeZ_

    Thread Starter New Member

    Sep 11, 2012
    2
    0
Loading...