View previous topic :: View next topic |
Author |
Message |
Guest Guest
|
18F452 @ 40 MHz w/ICD |
Posted: Wed Feb 16, 2005 10:19 am |
|
|
All -
Thank you for the responses for helping me get the 18F452 to run at 40 Mhz using a 10 MHz oscillator + PLL. Works great, except....
I am programming my board with the USB-based ICD from CCS. (ICD U40?) I am sending data by software UART to Hyperterminal on a PC. Data sent to PC is fine at a few different baud rate, and the LEDs (displaying analog sensor data) and switches on my board work as usual. Great, except....
Then, I want to operate the board in "stand-alone" mode. I program the board with the *.hex file, disconnect the ICD header, and pullup Pin 1 of PIC to 5 volts. My LEDs do their thing when the program starts. The sensors respond as they should, and the buttons and switches work fine. But now, Hyperterminal is receiving garbage. With the ICD removed, the data sent over the UART is corrupted, or the baud rate has changed. I then remove the pullup jumper, stick on the ICD header again, the program resets and now the data sent to the PC is fine - no re-programming of the part! Take off the ICD header, pullup Pin 1 again, and the data is garbage again. Of course, I am not using any pins associated with ICD for the UART function.
I need to write a really simple program to check this out, as well as scope the serial port data - seems as if the baud rate of the Tx data from the PIC gets corrupted when the ICD header is removed for some reason. But in advance of this, anyone seen such an issue associated with ICD and 18F452 or similar device? The guy who built the board may not have used a pullup resistor for the Pin 1 of PIC; could this be an issue?
Thanks much |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
Re: 18F452 @ 40 MHz w/ICD |
Posted: Wed Feb 16, 2005 10:53 am |
|
|
Guest wrote: | All -
The guy who built the board may not have used a pullup resistor for the Pin 1 of PIC; could this be an issue?
Thanks much |
Yep. Try 10K or 47K pull up resistor between MCLR- and Vdd. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Wed Feb 16, 2005 11:47 am |
|
|
I think this is the the problem that has been discussed multiple times before. When running the 4XPLL you MUST cycle power on the chip to get the PLL to kick in. Otherwise it runs at the non-PLL speed (in this case 10MHZ) which causes the baud rate to be off.
I use the U40 and have the same problem. ... |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Feb 16, 2005 11:51 am |
|
|
Sounds like a ground problem to me. With the ICD connected the grounds of the PC are the same as your board. Unplug them and they float at different levels. Check the ground connection between the UART on the PIC and that of the PC. |
|
|
guest Guest
|
ICD/RS-232 |
Posted: Wed Feb 16, 2005 12:30 pm |
|
|
Mark - I have the GND. pin for the board and the MAX rs232 level shifter connected to the GND pin for the serial port connection on the PC, but maybe the wire has become open in the DB9 connector - I will definitely check this. But, I don't think this is the issue... but I'll keep an open mind. Good advice.
I am also powering off the board as I read in this UG before, so that is not the issue, I believe.
Thanks folks! |
|
|
Guest Guest
|
ICD/RS-232 |
Posted: Thu Feb 17, 2005 12:03 am |
|
|
Mark -
YOU DA MAN!!!
My cable was fine as I thought. Then, probed the board, and found that the ICD header GND is not at the same potential as the RS-232 output GND when the ICD is disconnected. Short these two when the board is running and my Hyperterminal garbage turns out just right... Gotta get the board designer to look at this problem.
Thanks!!!! |
|
|
|