View previous topic :: View next topic |
Author |
Message |
camleot23
Joined: 16 Aug 2019 Posts: 52
|
|
Posted: Wed Aug 28, 2019 5:32 am |
|
|
I get it but I have a pull-down resistor. Isn't it supposed to prevent my signal from the same thing? And also, now I connected an arduino to generate a pulse.
dsPIC datasheet says, there are pins that are up to 5V tolerant, they are painted black. And there are pins that left empty, white. So, I'm not trying to give 5V to my B2 pin, So I had a transistor and I used it to control 5V coming from arduino. When I do this it doesn't count perfectly, it counts more than I send BUT when I don't use transistor, when I directly connect 5V (with 200 ohm resistor connected series) output to pin B2, it counts perfecly. Now where is the logic here? I send 10.000 pulses from arduino and dspic caught exactly 10.000 pulses while I don't use a transistor. (I don't have a voltage regulator). |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19229
|
|
Posted: Wed Aug 28, 2019 7:33 am |
|
|
No, the resistor does not prevent this. It's mechanical contact making
and breaking repeatedly.
How is your transistor wired?. |
|
|
camleot23
Joined: 16 Aug 2019 Posts: 52
|
|
Posted: Wed Aug 28, 2019 7:34 am |
|
|
I guess I solved the problem. It was about pull-down resistor. After I removed it, it counts very well. I appreciate it, thank you . |
|
|
camleot23
Joined: 16 Aug 2019 Posts: 52
|
|
Posted: Wed Aug 28, 2019 7:40 am |
|
|
I wired my signal to Base, and I got output from Emitter and I wired 3,3V to collector. H237 . But now I'm not using it. I directly wired my signal to B2. |
|
|
|