Perhaps, someday, I will have the chance to order such MCUs; assuming I will be allowed to download the assembler of this advanced family.
I have C51 assembler for the ATMEL old MCUs.
Do you have PIC16 or PIC18 MCUs? They're even older than AVR and should be available anywhere in the world. They have better command sets, so you should be able to do it with 2-instruction cycles. Or you can hard-code bits into the code which will give you 1-instruction cycles. 139 hard-coded sequences 100-command each will take 14k commands, which will easily fit in a relatively big PIC18.
using PIC instructions, it is possible to output serial bits ... at a rate of 2-cycle or even 1-cycle per bit?
Recently I came across a trick that apparently helps with smoothing PWM output a lot while adding minimal hardware.
As some of EDN's "Design Ideas"?
https://www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction-revisited/
https://www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction-but-no-inverter/
https://www.edn.com/double-up-on-and-ease-the-filtering-requirements-for-pwms/
Just to be sure that I understood you well, do you mean by using PIC instructions, it is possible to output serial bits (read from a table in loop) at a rate of 2-cycle or even 1-cycle per bit? Thank you.
I ask this just by curiosity. You kindly suggest me to use PIC MCUs. But since many decades ago, I don't have the privilege to download the PIC assembler (MPLAB?).
OK; being in Syria you probably can't get modern chips
I am afraid that, as I mentioned earlier, these techniques seem not to work when the application (like of a sinewave generator) needs to generate frequencies in a relatively wide bandwidth; for example, from 20 KHz down to 650 Hz. But perhaps I am wrong.
Yes, one instruction (called BTFSC) tests the bit in RAM and depending on the result executes or skips the next instruction. The second instruction (called BTG) flips the output pin...
You can download them from the Microchip web site. VPN should allow you downloading no matter where you are. They have archives of old software going many years back. You need older ones where they have MPASM assembler.
OK; being in Syria you probably can't get modern chips
I'm sure ali-express would still ship to Syria, along with other Chinese entities.
Surely that would negate the need for this thread?
I wish what you say could be true in reality now. But this was true in the golden years, before year 2011 (before the world's decided to also save the people among whom I was born and live). Now, small private businesses, as mine, are no more allowed to transfer any amount of money to order the goods they need for work, as electronic components (but, naturally, the bosses in the high class still have this privilege).
After all, you are right. In fact, if I was born where you are I would also see this topic as being somehow non-sense.
I would pull the SRAM address generation outside the uC with a synchronous reset parallel loadable binary counter to generate the address. There would be an additional column to carry the counter reset signal which is true when the address is at the end of the pattern. The clock would cause the counter to increment and when the reset signal went true, the next address would be reset to zero.
I would need some logic to allow the uC to reach the SRAM to set up the table but once initialized, no uC intervention required other than to generate the clock for the counter. Even that could be pulled outside with one of the clock divider chips. (internal PLL, dividers, etc).
Zero overhead, one clock per bit.
Recently I came across a trick that apparently helps with smoothing PWM output a lot while adding minimal hardware.
The Idea is that you make an inverted copy of the PWM signal, and then use a second RC combination, but with the resistor and capacitor in series, and then add that to the output of the original RC filter.
The Idea is that the AC part of the two "shark fin" signals cancel each other out, while maintaining the DC output, because the inverted channels is AC coupled. When you do this, you have to modify the RC time constant to fit your new circuit.
I am afraid that, as I mentioned earlier, these techniques seem not to work when the application (like of a sinewave generator) needs to generate frequencies in a relatively wide bandwidth; for example, from 20 KHz down to 650 Hz. But perhaps I am wrong.