View previous topic :: View next topic |
Author |
Message |
noyz
Joined: 31 Jan 2009 Posts: 59
|
Serial output stops when i disconnect programmer |
Posted: Tue Jun 21, 2011 4:44 pm |
|
|
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
|
|
Posted: Tue Jun 21, 2011 4:56 pm |
|
|
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
|
|
Posted: Tue Jun 21, 2011 11:42 pm |
|
|
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: 19535
|
|
Posted: Wed Jun 22, 2011 2:39 am |
|
|
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
|
|
Posted: Wed Jun 22, 2011 3:06 am |
|
|
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: 9241 Location: Greensville,Ontario
|
|
Posted: Wed Jun 22, 2011 7:49 am |
|
|
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
|
|
Posted: Wed Jun 22, 2011 1:22 pm |
|
|
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.. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Wed Jun 22, 2011 2:58 pm |
|
|
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 |
|
|
|