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

18F452 @ 40 MHz w/ICD

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







18F452 @ 40 MHz w/ICD
PostPosted: Wed Feb 16, 2005 10:19 am     Reply with quote

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

View user's profile Send private message Send e-mail

Re: 18F452 @ 40 MHz w/ICD
PostPosted: Wed Feb 16, 2005 10:53 am     Reply with quote

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: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed Feb 16, 2005 11:47 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Wed Feb 16, 2005 11:51 am     Reply with quote

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
PostPosted: Wed Feb 16, 2005 12:30 pm     Reply with quote

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
PostPosted: Thu Feb 17, 2005 12:03 am     Reply with quote

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!!!!
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