Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 17:31 16 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite setpin at power up?

Author Message
sagt3k

Guru

Joined: 01/02/2015
Location: Italy
Posts: 313
Posted: 07:39pm 11 Jun 2015
Copy link to clipboard 
Print this post

Hi Geoff
It is possible to think to create a function that save the settings and configs of the pins?
So that the next power up I've already the pins configured.
Thanks
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9078
Posted: 07:55pm 11 Jun 2015
Copy link to clipboard 
Print this post

I'm curious - why would you need to?

As a first few lines of code, right at the top of your code, define your pins - job done. Time to configure the I/O pins would only be a few mS if that, depending on how many you are talking about here.

...I may well be missing something in what you are trying to do...
Smoke makes things work. When the smoke gets out, it stops!
 
sagt3k

Guru

Joined: 01/02/2015
Location: Italy
Posts: 313
Posted: 08:31pm 11 Jun 2015
Copy link to clipboard 
Print this post

HI Grogster
Thanks, I know... I can set all pins with a few of instructions at top of my code.
But, when I mount my Pic in my application, where there are others devices, pmos, transistors, circuit for battery charger and so on, I think that ms is a huge time.
This is my opinion...
In truth, I have not measured how time micromite take to cfg all pins, but I think that a internal procedure wrote in C/assembler is always faster that Basic.
Thanks
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3167
Posted: 09:00pm 11 Jun 2015
Copy link to clipboard 
Print this post

If your peripherals are so sensitive I believe that the best solution would be to use pullups or pulldowns on them. Then they will be in the correct state as power is applied.

Also, the problem with this is that there are hundreds of special features like this that could be added... where do you stop?

BTW the startup delay is about 250mS although I have not measured it accurately.
Geoff Graham - http://geoffg.net
 
sagt3k

Guru

Joined: 01/02/2015
Location: Italy
Posts: 313
Posted: 09:09pm 11 Jun 2015
Copy link to clipboard 
Print this post

Ok Geoff.
I will try to set-up my circuit as you have suggested.
Thanks
 
srnet
Senior Member

Joined: 08/08/2014
Location: United Kingdom
Posts: 164
Posted: 06:56am 12 Jun 2015
Copy link to clipboard 
Print this post

Agree with Geoff on this one.

You should design your circuit so that it starts in a safe state, even if the Micro fails to start for some reason.

The MM pins will be as inputs at reset\powerup so if they need to be at a particular logic state to be safe, then pull up\down resistors as appropriate are essential.Edited by srnet 2015-06-13
$50SAT is Silent but probably still working.
For information on LoRa visit http://www.loratracker.uk/

 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024