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

ICSP (ICD2) and running programs - Problem

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



Joined: 21 Jul 2005
Posts: 36

View user's profile Send private message

ICSP (ICD2) and running programs - Problem
PostPosted: Thu Aug 31, 2006 4:11 am     Reply with quote

I'm having a very strange problem with my ICSP and program.

My program uses hardware and software RS232; when it powers on, it initialises variables etc and outputs "Running..." to the software UART then goes into a state machine loop which amongst other things has a EXT1 button interrupt for entering another subroutine.

When I *power on* from cold, the output is garbage and the PIC doesn't respond to button presses. When I insert and remove the Microchip ICD2 (set to target powered if that makes any difference), the PIC initialiases (Running... etc) and works perfectly fine.
I am not doing anything with the ICD2 beyond briefly inserting it (MPLAB is connected to it though).

Anyone have any ideas why this is happening?
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

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

PostPosted: Thu Aug 31, 2006 7:45 am     Reply with quote

I have seen garbage on a software serial when the PC and PIC don't have a common gound. If I then connect the RS232 or USB shield (PC ground) to the PIC ground the serial data looks fine. Check that first.

The reason it work with the ICD is that the ICD is providing that ground connection.
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