16F877A system and tachometer (FIS version) on the table


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2011
    Posts
    40

    Default 16F877A system and tachometer (FIS version) on the table

    Hello,

    i have a system with a PIC16F877A that is in serial with steering wheel command (RESET / UP / DOWN on B5,B6 et B7)
    I am programing to put ground on outputs (RC3 ,RC4 ,RC5 ) but for valid UP/DW/RESET i need transistion from +12V to ground .

    Also i need absolutely 12V like FIS send to input (normally) and PIC has only +5V to 3 wires .
    How have +12V on RC3 ,RC4 and RC5 outputs command by my program ? (pull-up resistors ??)

    Regards.Name:  explanations.JPG
Views: 1731
Size:  60.8 KBName:  explanations.JPG
Views: 1287
Size:  8.8 KB
    Last edited by mazoul72; - 28th October 2011 at 15:48.

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    Simply use optoisolators.

    Al.
    All progress began with an idea

  3. #3
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    I will have +5v on isolator inputs and +12v on output ?

  4. #4
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    I have
    Input pulsup (B5,B6,B7)
    Input pulsdw
    Input pulsres
    and
    Output mup (C3,C4,C5)
    Output mdw
    Output mres
    High mup
    High mdw
    High mres

    But it is the problem of 5V , no +12V . I don't understand ,+12V (output FIS) to +5V (output PIC) , it is a BIG problem ??

    Name:  explanations 1.JPG
Views: 1416
Size:  70.0 KB

  5. #5
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    My program works like this :

    a detection for RBx cause a different display to FIS Tachometer and for input isolator (output RC5,6,7) cause a +5V and +12V on output isolator .
    BUT it is dangerous because a +12V on output isolator cause a failure on FIS tacho input voltage .
    I would like only a No intrusive +12V but GROUND ONLY (action with ground input RBx) .
    FIS give +12V in normal operation :

    Name:  opto-level-shift Sol.JPG
Views: 2002
Size:  7.7 KB

  6. #6
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    If your FIS tacho device doesn,t requires too much current at the inputs the opto is the solution ( remember that the signal is inverted. in other words when pic pin is low the output is high) I have separated the two grounds, but they can be common.

    If on the other hand you will require more current at the input then use the second solution which uses two transistors.


    Cheers

    Al.
    Attached Images Attached Images  
    All progress began with an idea

  7. #7
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    i put today +12V directly on FIS Tacho input , with harware power failure ...
    What is the difference with +12V (10Kohms resistor) ??

    Thanks for your answer ...

  8. #8
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    the 3 pins 23 / 24 / 25 on the FIS tacho.. are "on the fly" with 12V voltage .
    Perhaps , with my 12V transformer (12V/300mA) , the inputs required more than 300mA that caused a power failure....

  9. #9
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    Can you post the data sheet of your tacho device?

    Al.
    All progress began with an idea

  10. #10
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    How find it ?

    it is a 1J5 920 846 C from golf4 .

  11. #11
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    If i put transistor directly to FIS without the +12V and 10Kohms resistors , i can have 12V from FIS (low level on PIC pin) and ground when transistor is "excited" .

  12. #12
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    Your FIS device has internal pullups, so you don't need the external one.

    Cheers

    Al.
    All progress began with an idea

  13. #13
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    Hello,

    i have already put OPTION_REG for pull-up resistors on port B but it is strange :

    on RB5 , RB7 i have 6.7 Volts and on RB6 i have 4.98V
    My voltage regulator provide 5V and 12V on transformator (Stable)
    I don't understand why .

    i have an ASM routine for UP/DW/Reset detection .
    it doesn't work well .

    Start:

    ASM

    loop
    BTFSS PORTB.5 ; on saute instruction suivante si B.5 = "1"
    BCF PORTC.3 ; on passe C.3 à "0"
    BTFSC PORTB.5 ; on saute instruction suivante si B.5 = "0"
    BSF PORTC.3 ; on passe C.3 à "1"


    BTFSS PORTB.6 ; on saute instruction suivante si B.6 = "1"
    BCF PORTC.4 ; on passe C.4 à "0"
    BTFSC PORTB.6 ; on saute instruction suivante si B.6 = "0"
    BSF PORTC.4 ; on passe C.4 à "1"

    ;Si aucunes commandes validées alors on continu dans le programme complet
    BTFSC PORTB.7 ; on saute instruction suivante si B.7 = 0 (validée)
    GoTo loop

    ENDASM

    mainprog:
    action for each command.....on Fis display
    ....
    ...
    goto Start
    END

    Regards
    Mazoul72

  14. #14
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: 16F877A system and tachometer (FIS version) on the table

    I've just seen that TRISB miss for input PORTB

    Is this mistake provide bad functionnal reactions ?

    OPTION_REG7=0
    TRISB = %11100111 (RB5 to RB7-->steering wheel button detection , RB0 to RB2-->radio display input ENA/CLK/DATA) with internal pull-up .

Members who have read this thread : 1

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