Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Hi mehtarock026,
Sorry but I can't write code for a mcu I don't know, and of course code is different if it's in assembly, in c, or what else (but the trick is the same).
It's not more complicated than writing the rest of your program, just don't forget to initialize the counter in the...
Hi adnan_merter,
First, dtr and rts are output signals from the PC. So your probe is powered by these line, you probably just have to feed your probe with a voltage between 5V and 9V (applied on DTR or RTS).
In RS232 a logic low is a voltage between 3 and 25 Vdc and a logic high is a voltage...
Hi mehtarock026,
I don't know how the 8052 works but in the general case I would implement a counter in the ISR (Interrupt Service Routine) and do the job if the counter is 4 and then reset it.
Hi mohidden,
I think all is there. It's up to you.
But for cost reason I would use in this case a low pass filter (a 1st order passive RC filter) plus a hi-pass filter (an other 1st order passive RC) separated by a one gain (or more) op-amp.
Of course it depends how fast you want to cut unwanted...
Hi MjWasHEre,
May be by using a binary counter feed by your data stream, and you test the bit 0. But it should be 1 if odd and 0 if even, so just add an inverter.
So, even if I think what you are trying to do is nonsense. I can explain these points.
1)
Create an hysteresis by changing VR
In your case you have set de Vref to 13/24 of vdd.
If the external voltage on AN1 decreases under this value the comparator detect that transition A (Vin- < Vin+).
In...
Hi speedEC, in your source code in comment it's written :
It's not 1.93v, it's 13/24 of Vdd.
If Vdd is 3.6v then Vref is 1.95v, if Vdd is decreasing to 3.3v (for example) then Vref is 1.79v.
If I understand what you are trying to do, you want to compare this voltage with the battery voltage...
I don't know if you've understood what I was trying to point out. :-?
No matter the hysteresis, no matter the circuit you are going to use, the most important is the reference voltage your are comparing the battery voltage with. It has to be a fixed one (not varying with the battery voltage)...
So you are trying to detect a voltage variation of the battery voltage but the Vdd of your pic is varying according to the battery voltage (so do the Vref of the pic).
According to microchip data sheet:
To make it work better you have to consider a fixed voltage ref.
Hi speedEC,
Can you explain what is your voltage reference for the comparator ?
If I'm right, internal voltage ref of the pic16f628a is relative to vdd...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.