CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Why will this 12F683 program not run?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Stuffed-Bit



Joined: 07 Jul 2006
Posts: 9
Location: US

View user's profile Send private message

Why will this 12F683 program not run?
PostPosted: Sat Sep 27, 2008 6:04 pm     Reply with quote

Why will this 12F683 program not run? Running on Microchip PIC kit1 and programmed with MPLAB v8.1. Programs on 12F675 chips seems to run fine but I can't get any 12F683 program to run. I have tried several different chips on two different PIC kit1's with same results. I'm sure I'm over looking something simple.

Compiler v4.076
Hardware PIC Kit1
MPLAB v8.1

Code:

#include <12F683.h>
#device adc=8

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES NOCPD                    //No EE protection
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOMCLR                   //Master Clear pin used for I/O
#FUSES PUT                      //Power Up Timer
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOFCMEN                  //Fail-safe clock monitor disabled

#use delay(clock=8000000)

void main()
{

   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_comparator(NC_NC);
   setup_vref(FALSE);
   setup_oscillator(OSC_8MHZ);

 while(true){
   
  output_high(pin_a5);
  output_low(pin_a4);
  delay_ms(500);
  output_high(pin_a4);
  output_low(pin_a5);
   
 }   
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Sep 27, 2008 6:24 pm     Reply with quote

Quote:
while(true){

output_high(pin_a5);
output_low(pin_a4);
delay_ms(500);
output_high(pin_a4);
output_low(pin_a5);

}

See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=36118
Stuffed-Bit



Joined: 07 Jul 2006
Posts: 9
Location: US

View user's profile Send private message

PostPosted: Sat Sep 27, 2008 6:46 pm     Reply with quote

PCM programmer wrote:
Quote:
while(true){

output_high(pin_a5);
output_low(pin_a4);
delay_ms(500);
output_high(pin_a4);
output_low(pin_a5);

}

See this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=36118


Duh!!! I knew it was something simple! Guess I should have stuck a scope on that pin.

Thanks
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group