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" .
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" .
Your FIS device has internal pullups, so you don't need the external one.
Cheers
Al.
All progress began with an idea
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
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 .
Bookmarks