2 Attachment(s)
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.Attachment 6089Attachment 6090
Re: 16F877A system and tachometer (FIS version) on the table
Simply use optoisolators.
Al.
Re: 16F877A system and tachometer (FIS version) on the table
I will have +5v on isolator inputs and +12v on output ?
1 Attachment(s)
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 ??
Attachment 6091
1 Attachment(s)
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 :
Attachment 6093
1 Attachment(s)
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.
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 ...
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....
Re: 16F877A system and tachometer (FIS version) on the table
Can you post the data sheet of your tacho device?
Al.
Re: 16F877A system and tachometer (FIS version) on the table
How find it ?
it is a 1J5 920 846 C from golf4 .
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" .
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.
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
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 .