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 support@ccsinfo.com

what caused programming, ID, eeprom error
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








PostPosted: Fri Jul 16, 2004 12:10 pm     Reply with quote

A program as simple as the following by have the program error like I posted as the beginning, is not a problem of program as I guess, it is about some setting. So far I have not gotten any very good suggestion to make it work, anyone, please, I kind of frustrated with my self talking to myself, struggling myself here for more than one day without a solution!
Idea Idea Idea please
Code:

#if defined(__PCM__)
#include <12F675.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=20000000)

void main()
{

while(1)
   {
      output_high(pin_a1);
      delay_ms(250);

      output_low(pin_a1);

     delay_ms(250);
      }

}


Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 16, 2004 3:27 pm     Reply with quote

If you did a search on the forum for 12F675, you would see lots
of posts. In almost all of these posts, you will see a sample program.
At the beginning of the sample program, they always turn off the
comparators, so that the pins can be used for normal i/o. This should
be considered an important clue, regarding the operation of the chip.

If you have a recent version version of the compiler, then the following
CCS function should turn them off successfully:

setup_comparators(NC_NC_NC_NC);

If you have an older version of the compiler, the built-in function
may not work. In that case, look at the previous posts for a method
of turning off the comparators. (Search the board for 12F675 to find
these posts).
young



Joined: 24 Jun 2004
Posts: 285

View user's profile Send private message

PostPosted: Mon Jul 19, 2004 7:29 am     Reply with quote

THank you all guys:
By struggling for a while, I finally what caused the programming errors. Just as my first guessing, it is hardware configuration, however this time it is not because of software programming, it is caused by hardware wiring. for the PICEasy2, I have to set the jumpers on board to 8PIN position, which I have nevere thought about.

Best wishes for you all!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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