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
Posted: Thu Aug 31, 2006 7:45 am
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.
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