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 CCS Technical Support

Reset vs. Power-Up (Power Cycle) Serial Interrupt issues
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
maxrate



Joined: 01 Jan 2007
Posts: 43
Location: Mississauga, Ontario, Canada

View user's profile Send private message

PostPosted: Sat Feb 06, 2010 3:13 pm     Reply with quote

asmallri wrote:
maxrate wrote:


#FUSES BORV27 //Brownout reset at 4.5V


Your BOR is wrong - the fuse value does not match the comment. This will definitely result in the symptoms you are seeing.


Hi asmallri, BOR is completely fine. That was a last moment "shot in the dark" try - I have tried many voltages. When I remove the MAX233 chip, everything reboots properly. It's all about voltage on the bus. It's as if the max chip is 'stealing' power and the power is leaking onto the 5V bus. Again, if I apply 5Vs to the 5V bus (to start up the pic board) if the bus voltage is under, say, 0.35volts, the PIC powers up properly, if it's over 0.35 volts, the PIC runs at 1/4 speed. Very odd.
maxrate



Joined: 01 Jan 2007
Posts: 43
Location: Mississauga, Ontario, Canada

View user's profile Send private message

PostPosted: Sat Feb 06, 2010 3:18 pm     Reply with quote

Ttelmah wrote:
I'd suggest that the problem is probably that the PIC is resetting, but the modem is not.

Hi Ttelmah: Modem state seems to be irrelevant, the main problem is the PIC runs at 1/4 speed after the power-cycle, the PIC outputs at 2400 baud (not 9600) after it is power cycled only. This problem crops up no matter if the modem is attached to the serial port or not. Thank you for the suggestion.

Quote:
I suspect the 0.64v, is not your problem, but that the modem is not in command mode, so ignores the sequence you are sending, and hence the code doesn't work.


At this point it is definitely a voltage related issue. I don't understand why the PIC can't get beyond this. I'm going to experiment with some diodes on the MAX233 chip next - unfortunately, I am away this weekend so I can't try right now :(

Thank you again!
asmallri



Joined: 12 Aug 2004
Posts: 1680
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sat Feb 06, 2010 9:59 pm     Reply with quote

maxrate wrote:
asmallri wrote:
maxrate wrote:


#FUSES BORV27 //Brownout reset at 4.5V


Your BOR is wrong - the fuse value does not match the comment. This will definitely result in the symptoms you are seeing.


Hi asmallri, BOR is completely fine. That was a last moment "shot in the dark" try - I have tried many voltages. When I remove the MAX233 chip, everything reboots properly. It's all about voltage on the bus. It's as if the max chip is 'stealing' power and the power is leaking onto the 5V bus. Again, if I apply 5Vs to the 5V bus (to start up the pic board) if the bus voltage is under, say, 0.35volts, the PIC powers up properly, if it's over 0.35 volts, the PIC runs at 1/4 speed. Very odd.


There were several issues with your original implementation. Depending on the current capabilities of the power supply, the large capacitor could have caused voltage rise times to be longer than the PUT negating the effectiveness of the PUT. The BORV27 setting will almost certainly result in the PIC crashing before the BORV reset was effective. The MAX232 has the potential to delay the fall time of the power rail as it sources power to the PIC via the input protection diodes. However, what is interesting is that input latch-up is not occurring otherwise the PIC would not recover with just a power on rest. One way to mitigate the MAX232 problem is to insert a series resistor (say 10K) between the PIC Tx pin and the MAX232 and another between the PIC Rx pin and the MAX232 and any other pins, such as CTS and RTS that you may have implemented.

The solution is to address all these problems and not expect a single solution to solve the issue. A BOVR27 setting is useless for a 5 volt PIC and, as already mentioned, the PIC with likely crash before this value is reach and the PIC could then be executing random code.

Another area to examine, a common problem area, is to ensure that the power supply ground and the PC ground are common. Floating grounds will also cause issues.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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