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

My RTCC can't keep its time when VDD shutdown
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
BeeElectronic



Joined: 19 Jul 2017
Posts: 27

View user's profile Send private message

PostPosted: Fri Sep 06, 2019 2:47 am     Reply with quote

PCM programmer wrote:
He didn't mean to try it without PUT. He wondered if you had it at all.

I would try it with PUT_64MS.


Same with PUT_64MS.
temtronic



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

View user's profile Send private message

PostPosted: Fri Sep 06, 2019 5:05 am     Reply with quote

Since 99% of my projects have an LCD module, the 1st line of code is a delay_ms(500);. This is to ensure the LCD module has time to 'powerup' properly and while the LCD_init() may do it, I've got into the habit of manually coding the delay.
BTW, just because a PSU is 'certified' it may not work 100% with a PIC ( or other micro...). I'd like to see the certification document to read the rise time, fall time, ripple amount and power limits.
I see you're using an LM317T, do you have a 1N4001 between In and Out terminals ? Bypass caps on all 3 terminals ? What value filter caps on In and Out ?

Jay
BeeElectronic



Joined: 19 Jul 2017
Posts: 27

View user's profile Send private message

PostPosted: Fri Sep 06, 2019 8:32 am     Reply with quote

I think I found something:

I have 2 ways to power supply my board:
- 1 by the normal way: 2 faston +12V/GND (come from laboratory PSU)
- 2 by my debugging board which include FT232 / 12VDC PSU from a wall mount AC-DC power adapter / ICD-U80 / 10 pin ribbon to my board with +12V/GND/PGC/PGD/MCLR/RX/TX pin

If I use the first way: I disconnect the +12V or GND faston pin on my board to power off. With this method the RTCC don't lost the time.
-> I did about 40 restarts and not one of them reset the time.

If I use the second way: I disconnect the +12V jack to my debugging board (without +12V or GND form laboratory PSU, the debugging board supply my board).
-> I did about 40 restarts and not one of them reset the time.

If I use the second way: I disconnect the ribbon between my board and my debugging board (without +12V or GND from laboratory PSU, the debugging board supply my board).
-> I did about 20 restarts and 5 reset the time. This is the method I use since the beginning because its better access for me.

So if I remove the +12V PSU from the faston pin or from my debugging board everything works fine. But If I remove the +12V PSU by disconnecting the ribbon cable between my debugging
board and my board I have this RTCC trouble...
gaugeguy



Joined: 05 Apr 2011
Posts: 288

View user's profile Send private message

PostPosted: Fri Sep 06, 2019 8:58 am     Reply with quote

When you disconnect a ribbon cable, not all pins disconnect at the exact same time. You may momentarily end up with data lines back feeding into the processor with power removed.
You may briefly end up with +12V and data lines but no ground or ground and data lines but no +12V.
This can cause unexpected operation as a data pin ends up either above the processor power pin or below the processor ground pin.
temtronic



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

View user's profile Send private message

PostPosted: Fri Sep 06, 2019 9:54 am     Reply with quote

What gaugeguy says is very true ! To power down ANY computer, you need a controlled, known method... just 'yanking out' a ribbon cable is NOT a good idea !!

Jay
BeeElectronic



Joined: 19 Jul 2017
Posts: 27

View user's profile Send private message

PostPosted: Mon Sep 09, 2019 10:18 am     Reply with quote

This ribbon cable is not only for debugging but also for industrial programming and testing for us and the customers. The connector is from Wurth and
it is quite similar to the TAG CONNECT in its use. In this case the RTCC is very sensitive to that and I don't want reprogram the time of one board out of
three by hand. So I keep my DS1307 with this PIC16F19176.

Thanks everybody for your help.
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Sun Sep 15, 2019 8:33 am     Reply with quote

Key thing is that connectors that are designed for hot connection
are actually designed so the pins are made in specific sequences.
So if you look at the USB connector, the ground pin makes before
the other pins. The Tag connect connector does this. Does yours?.
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, 3
Page 3 of 3

 
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