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

12F683, GP2 won't toggle [SOLVED]

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



Joined: 01 Jul 2010
Posts: 9250
Location: Greensville,Ontario

View user's profile Send private message

12F683, GP2 won't toggle [SOLVED]
PostPosted: Sun Jan 18, 2015 6:20 pm     Reply with quote

OK what silly thing have I missed trying to get GP2 to blink?
This is driving me nuts. PCM4.110. All other pins are good to go.
Using Picstartplus as Pickit3 doesn't like the 683 (something about mclr, internal clock) that's a 'side issue'. Have tried 2 PICs.

Code:

// 12F683test
//
#include <12f683.h>
#fuses INTRC_IO,NOWDT,PUT,NOPROTECT,NOMCLR
#use delay(clock=4000000)                   // 4MHz xtal
#define led0 pin_a0
#define led1 pin_a1
#define led2 pin_a2
#define led4 pin_a4
#define led5 pin_a5
//=============================================================================
void main(){
   setup_oscillator(OSC_4MHZ);            //internal 4 MHz osc   12f683
   setup_comparator(NC_NC_NC_NC);         //no comparators
   setup_adc_ports(no_analogs);         //no adc inputs
   setup_adc(adc_off);                  //no adc
   setup_timer_1(T1_disabled);            //no timer
   setup_ccp1(ccp_off);               //no ccp
   disable_interrupts(global);            //no interrupts
   delay_ms(500);                     // startup delay of .5 seconds

   do {
   output_toggle(led0);
   output_toggle(led1);
   output_toggle(led2);
   output_toggle(led4);
   output_toggle(led5);

   delay_ms(450);   
   }while (TRUE);

}//end of main=================================================================


maybe I'm getting too old for this ??
thanks
Jay


Last edited by temtronic on Mon Jan 19, 2015 6:50 am; edited 1 time in total
Jerson



Joined: 31 Jul 2009
Posts: 126
Location: Bombay, India

View user's profile Send private message Visit poster's website

PostPosted: Sun Jan 18, 2015 6:55 pm     Reply with quote

Can you try by turning on the internal weak pull-ups? Possibly the R-M-W problem.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jan 18, 2015 9:42 pm     Reply with quote

Quote:
trying to get GP2 to blink?

See Ttelmah's post:
http://www.ccsinfo.com/forum/viewtopic.php?t=53002
temtronic



Joined: 01 Jul 2010
Posts: 9250
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jan 19, 2015 6:50 am     Reply with quote

finally it blinks! the Macro seems to have done it !! Though the amount of time spent is crazy compared to using an 18 pin PIC, sure hope the client wants more than 100 units.

Both my original white case PS+ and the flashed black case PS+ work fine, might tackle the PK3 nonsense later...

thanks

see you can teach an old dog new tricks!

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19559

View user's profile Send private message

PostPosted: Mon Jan 19, 2015 9:35 am     Reply with quote

As you will see in my reply your thread about programming, it is a _chip_ limitation. Nothing the PIcKit3 can do about it.
It can be programmed in any programmer that has control over the Vdd line.
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