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

Serial output stops when i disconnect programmer

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



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

Serial output stops when i disconnect programmer
PostPosted: Tue Jun 21, 2011 4:44 pm     Reply with quote

Hi all,

I have a project with 18F2550
and i wrote down on pic the hex, while i have the output from serial open in terminal.
In moment that pickit finishes programming, the terminal starts to output my values.
When i disconnect pickit it stops.
If i unplug and plug again microcontroller power supply.. nothing happens.

How is this possible .. my project runs only with pickit attached:-?
does anyone experienced this issue before ?

pic18f2550, ccsc v 4.120
icsp : 27k between mclr and VCC
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 21, 2011 4:56 pm     Reply with quote

What's the Vdd voltage of the PIC ?

Are you compiling in Debug mode or in Release mode ?

What are the connections (wires) between your PIC board and the
COM port connector on the PC ?
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Tue Jun 21, 2011 11:42 pm     Reply with quote

VCC = 5v

ttl from pic connected to max232. Then to a usb to serial converter.

Release mode : fuse - NODEBUG

pic 18f2550
Fuses:
Code:

#device adc=10
#FUSES NOWDT, WDT128, PLL3, CPUDIV1, USBDIV, HSPLL, FCMEN, IESO, NOPUT, NOBROWNOUT, BORV20, VREGEN, PBADEN, LPT1OSC, NOMCLR, STVREN, NOLVP, NOXINST, NODEBUG, NOPROTECT, NOCPB, NOCPD, NOWRT, NOWRTC, NOWRTB, NOWRTD, NOEBTR, NOEBTRB
#use delay(clock=48 000 000,RESTART_WDT)

#use rs232(baud=9600,parity=N  ,xmit=PIN_C6, rcv=PIN_C7, bits=8)
Ttelmah



Joined: 11 Mar 2010
Posts: 19331

View user's profile Send private message

PostPosted: Wed Jun 22, 2011 2:39 am     Reply with quote

You say 'TTL from PIC'. What about the ground connection?.
Commonest reason for this type of problem is forgetting the ground.


Best Wishes
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Wed Jun 22, 2011 3:06 am     Reply with quote

i have ground connected and TX from pic.

but let me double check if all grounded ok tonight
at first i thought that it was something from mclr but isn't, when using nomclr it still acts the same.
temtronic



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

View user's profile Send private message

PostPosted: Wed Jun 22, 2011 7:49 am     Reply with quote

You should always add 'errors' to the use rs232(...) options....

I don't have your hardware but am curious how the PIC program automatically starts after being burned into the PIC.

Maybe show us your program or a small version that does this.
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Wed Jun 22, 2011 1:22 pm     Reply with quote

sry .. one broken wire at serial communication.. the ground one.. so you were right
thanks.

and about that the program starts immediately.
if pic is powered you can reprogram it with icsp .. while running
it will stop, program, and start again.
it is very useful when you are testing..
no more broken pins to pic from remove it from hardw connect to programmer.. put back to hard.
and this takes time.. Smile
Ttelmah



Joined: 11 Mar 2010
Posts: 19331

View user's profile Send private message

PostPosted: Wed Jun 22, 2011 2:58 pm     Reply with quote

A 'caveat'.
Certain things _won't_ update immediately.
For example, if you enable/disable the PLL, this requires a restart before it changes.
Just a 'be aware'.

Best Wishes
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