Type in the full discussion title or a part of it.
Discussion Title Created date
Versatile AVR Code for Dividing 32-Bit Number by 24-Bit Constant
The fast algorithm used to divide 16 bits by 8-bit constant works also for 24bits-16bits, 32bits-24bits... etc.   The two previous related threads are: https://www.avrfreaks....
Thursday, 24 February 2022 - 02:15
Fast AVR Code for Dividing 16-Bit Number by 8-Bit Number
On the previous thread “Versatile AVR Code for Dividing 16 Bits by 8-Bit Constant”, the trick that lets the code be rather fast is that the long division by reg_N is made already...
Sunday, 20 February 2022 - 09:31
ATmega8 – Delta Modulation – Audio Sinewave Generator
This is a project in progress. [ 1 ] Let us assume that a code is written to create a table for one cycle of a normalized sinewave digitized by {N} samples. [ 2 ] Let us assume...
Monday, 24 January 2022 - 18:18
Versatile AVR Code for Dividing 16 Bits by 8-Bit Constant
Lately, I needed dividing two 8-bit registers by various 8-bit constants. I ended up having one common code for all constant divisors [1 to 255] [2 to 255]. I liked sharing...
Tuesday, 11 January 2022 - 20:59
Fast division of 32 bits by 5, code in assembly
As you know, a function can be made faster if more registers are used in its algorithm. Based on this, I guess the following code (div32b_5: in assembly) is the fastest one for...
Monday, 30 March 2020 - 11:39
Digital Audio Sinewave Generator, a project draft
Lately, I needed to build an audio sinewave generator to produce, as a first step, 30 frequencies around the ones listed below (18 KHz to 615 Hz):   18,000 15,500 13,500 12,...
Thursday, 13 February 2020 - 12:30
Overvoltage Protection for AC-DC supply (SMPS)
This project helps in extending the upper voltage rating of an SMPS (for example, 24V/1A) from 250 Vrms to 380 Vrms while increasing its lowest voltage by about 4V only (for...
Friday, 7 February 2020 - 14:55
Overvoltage Protection for Low Power SMPS
Lately, I needed to extend the upper voltage rating of an SMPS (24V, 1A) from 250 to 380Vrms. So I added to it a circuit in series to act as an active high-voltage zener.   I...
Thursday, 6 February 2020 - 12:58
Controller for 8 AC LED Strips on a Christmas Tree
It happened that some local retailers imported, from China, LED strips made for 220V (50Hz). One strip could have a length of 1m, 2m, 3m... etc. But it (as a single LED) has...
Monday, 16 December 2019 - 18:57
Six-Input AC Voltmeter
Hi, Lately, I built this voltmeter, having six inputs, as an in-house tool (at workplace). It measures the tap voltages of a transformer of a mains relay-stabilizer (having...
Wednesday, 18 September 2019 - 11:03
Quiz for fun, two I/O pins and 16 levels
On the thread https://www.avrfreaks.net/forum/quiz-fun-io-pin-and-4-levels we found out that, by adding two external resistors (pull-up and pull-down), an I/O pin (as of ATmega8)...
Sunday, 14 July 2019 - 00:56
Quiz for fun, I/O pin and 4 levels
Let us assume; we like to monitor on a scope the timing of 4 stages while an MCU code is running. But one I/O pin only is free for this task.   As we know, an I/O pin (as of...
Thursday, 11 July 2019 - 17:59