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.
You are not cooperative, don't answer questions, don't confirm my doubts, don't follow my recommendations.
I hope you don't mind when I leave now.
No, not "Vbe"
No, "Vemiter-Vbase" is posititive.
V_BE is negative.
Vb > Vc
It is an emitter follower.
R8 makes the base...
Please confirm: "vdd_3" means "+3V"
Also mind that on schematic usually the most positive supply is on top and the most negative supply is on bottom af a sheet.
So +3V should be on top, GND on bottom. Your PNP symbol should be rotated that emitter is on top, collector on bottom, base on...
Eventually read some documents???
read the code you posted in post#7:
The interrupt executes the TMR0_ISR(). (every related C tutorial, every library tutorial will tell you this)
...within the TMR0_ISR the counter is handled an on match/overflow the TMR0_CallBack is executed.
The benefit of the interrupt is that you usually don`t need to care about it.
The interrupt is triggered automatically and the callback function is executed automatically.
So please tell us why you think you need to wait for it .. or check for it?
* TMR0IF does not work.
A BJT never can work the same as a MOSFET.
A BJT has different states with different operation modes.
Why do you refer to an internet page with explanations, but neither use the example circuits ... nor use the given math?
What should I do now? Copy the pictures and the text?
The discussion is "measured results vs simualted results".
While the simulation does not care about capacitor polarity, in the real circuit a wrongly oriented capacitor may shift DC operating point of the BJT.... modifying the AC measurement results.
You have a simulation tool, so use it...
C2 polarity seems to be wrong.
.. then it's a good idea to tell us
* the simulation results and the
* the measured results
And how you measured them.
AC measurement is not a simple as DC measurement. There are different AC measurement and calculation methods with different results.
The circuit (upper of post#5) is called "high side open collector"
* "high side" because it is switching the positive (high) supply voltage (+3V) instead of GND.
* "open collector" because the collector is the output....and it's left open ... so the end user may connect whatever he wants to...
Implementing means you design (or prepare) the physical interface.
(Shift registers, address registers, data registers, acknowledge, data direction switch...)
And you design (or prepare) the protocol. (In parts already mentioned above)
SPI is simplest ... basically just shift registers ...
Please follow the recommendations that memers gave at your other thread: https://www.edaboard.com/threads/how-to-make-pae-graph-smoother.397839/post-1710955
Still the step size is too coarse.
While post#9 is correct it still does not fit to your code.
The code of post#7 uses a C library, while your explanation is raw silicon behaviour.
Decide whether you want to use C library or not. Yes or no. Then focus on your decision, read the regarding document, give us the link. Don´t mix...
You don´t understand how it works.
May I ask which tutorials you´ve read which videos you watched ... to get to this conclusion?
Please provide links to them, so we can discuss about it. Step by step.
We need technical informations.
What frequency is the PWM?
What source impedance is the signal? (Type, datasheet....)
In simplest case an RC filter should work.
Maybe two RCs, maybe an active circuit with Opamps.