definite port states at power-up


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Salutations de Hong Kong Alain!

    I'll continue in English so that this may eventually help others...

    1) The hardware side : system must be in a stable safety state if Processor is out of its socket ( ! ) - @ poweron all pins are inputs ( floating ...)

    Got it!, Yep! the system would be stable even without a processor in socket. I've got pull down on all lines that I want to power up in low state.

    2) The software side : processor outputs must meet 1) ( no change !!! ) and inputs must be set to the state the sensors and buttons are in 1) situation, so no uncontrolled change could occur.

    PORT or LAT Registers have to be set first, THEN TRIS registers ...

    Oups... I'm doing the opposite. I first set Tris, then assign them low or high... Could that really cause the problem?

    That's enough to be perfect !!!

    Thanks for your help!

    Patrice

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hkpatrice View Post
    Salutations de Hong Kong Alain!

    Oups... I'm doing the opposite. I first set Tris, then assign them low or high... Could that really cause the problem?

    Patrice
    Hi, Hong Kong FuFu

    that is more than enough !!! as outputs states can be whatever you want until the PORT = ... line is reached. Also think to inputs to be correctly preset ... not to trigger an interrupt i.e.

    One funny app was an electronic ignition for cars ( A110 forum ) there always was an explosion in the exhaust system @ powerup ...
    so, Alain raised the " Anti prout " mod. ... just like described here.

    Comment tu fais pour survivre là bas ... je n'ai pas réussi à dépasser les 15 jours lors d'un voyage pro à Singapour ( LadyHill Hotel tout de mème ...)... et pourtant le gus qui me chaperonnait était super sympa !!!

    Alain
    Last edited by Acetronics2; - 17th September 2010 at 14:51.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2007
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Alain,

    Thanks a lot. This makes perfect sense. at 4Mhz clock speed, there has to be about 1/500 th of a secong between the time where I set Tris, and when I assign the "0"or "1" to the pin. That would be enough to create the problems I have been experiencing. I naively thought that the registers always defaulted to "0" at power-up.

    Je suis ici depuis dix ans... j'ai ma petite famille ici... en moins de 4 heures je suis sur une plage en Thailande ou dans la jungle aux phillipines...Je ne me vois pas revenir en occident...

    Merci!

    Pat

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hkpatrice View Post
    Alain,


    Je suis ici depuis dix ans... j'ai ma petite famille ici... en moins de 4 heures je suis sur une plage en Thailande ou dans la jungle aux phillipines...Je ne me vois pas revenir en occident...

    Merci!

    Pat


    With family ... much better !!! We must admit those people have another way of thinking and other life priorities than in Europe ... that needs some time for training !!!

    and social tourism ( dedicated expression ! ) is something really nice there. I had enough time to appreciate it visiting Malaysia.

    Thanks a lot. This makes perfect sense. at 4Mhz clock speed, there has to be about 1/500 th of a secong between the time where I set Tris, and when I assign the "0"or "1" to the pin. That would be enough to create the problems I have been experiencing. I naively thought that the registers always defaulted to "0" at power-up.
    I remember the minimum time for the PIC to see " anything " is around 20 ns ( 50 Mhz ) ... yes, nano ...

    read you soon
    Alain
    Last edited by Acetronics2; - 17th September 2010 at 15:28.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts