Uwe Zimmermann
Uwe Zimmermann
  • 94
  • 191 850
Animation: General Purpose Input/Output on the AVR microcontrollers
A short unnarrated Manim animation about the GPIO pins on the AVR microcontrollers. The GPIO pins are controlled by a set of three registers: PINx for input, PORTx for output and pull-up activation and DDRx for the data direction (input or output).
Not included in the video is the possibility to toggle an output bit by writing to the PINx register.
zhlédnutí: 249

Video

Uppsala Forsränningen 2023
zhlédnutí 603Před rokem
Den 30 april 2023 var det dags igen för forsränningen på Fyrisån i Uppsala. Här kommer en bildserie med alla 120 flottar. Musik: Green Fields by Azovmusic, License #: 19192455483 Kamera: Pentax K200, Sigma 28-300mm; Panasonic GX800, Lumix 45-150mm Software: ThumbsPlus, Davinci Resolve
Building a 3D star with neopixel illumination
zhlédnutí 305Před 2 lety
A too long video about my project building a scale model of a Christmas ornament from the city of Stralsund - a 12-pointed star with LED illumination. 1:20 About neopixels 5:30 The inspiration 7:55 Receiving the printed circuit boards 12:35 The components - a neopixel and a capacitor 14:30 3D-assembly of the circuit boards 21:25 The second hemisphere 25:30 Laying out the data track 31:50 Platfo...
Uppsala Forsränningen 2022
zhlédnutí 2,2KPřed 2 lety
Efter 2 år med Coronarestriktioner var det den 30 april 2022 dags igen för forsränningen på Fyrisån i Uppsala. Här kommer en bildserie med alla 130 flottar. Musik: Green Fields by Azovmusic, License #: 19192455483 Kamera: Pentax K200, Sigma 28-300mm; Panasonic GX800, Lumix 45-150mm Software: ThumbsPlus, Davinci Resolve
Charlieplexing - 10 LEDs from 4 pins including homebrew pcb
zhlédnutí 406Před 2 lety
In a project for Uppsala University we want to have a charge indicator. The module consists of 10 individual LEDs, but instead of wasting 10 GPIO-pins on this task, here I show how we can use Charlieplexing and reduce the number of pins to just four. I'll also go briefly through my procedure on making y own circuit boards using the toner transfer process. This video is related to my previous vi...
Identifying a problem with a camera lens
zhlédnutí 122Před 2 lety
I disassembled a zoom lens for my USB desk-camera in order to find the cause of a hazy spot in the field of view. Stay tuned for my try to fix the problem.
Using external libraries with PlatformIO and Arduino
zhlédnutí 3,5KPřed 2 lety
One of the few comments under aprevious video asked for an explanation on how to use an external library in an Arduino-project under PlatformIO. Here I show the example of the FastLED library to control neopixel LED-chips. This video is unsponsored and not monetized, as usual. 00:35 looking at the circuit boards 01:10 the layout in KiCAD 02:40 soldering connection pins 04:00 connecting the boar...
Controlling 24 LEDs with just 6 pins - the Berlin Clock (Charlieplexing)
zhlédnutí 643Před 2 lety
I just received back the circuit boards I ordered for two new projects, one of which I will present here: a famous street clock in Berlin. The 24 LEDs of the display are connected to the microcontroller with just 6 GPIO pins, using Charlieplexing. en.wikipedia.org/wiki/Charlieplexing en.wikipedia.org/wiki/Mengenlehreuhr This video is unsponsored and not monetized, as usual. 00:50 unboxing the p...
Two LEDs on a single GPIO pin!
zhlédnutí 571Před 2 lety
You want to connect two LEDs to your microcontroller but you have only one GPIO-pin left? In this video I present an alternative solution to the one presented by Ralph Bacon in his recent video czcams.com/video/Yq7KdIC6Xu4/video.html
🇸🇪 1TE720 - fasförskjutningar och det komplexa talplanet
zhlédnutí 484Před 2 lety
Ett försök att visualisera fasförskjutningar mellan sinusformade signaler. Verktyg: manimce 0.14
ATmega328 and PlatformIO - no Arduino!
zhlédnutí 11KPřed 2 lety
Should I abandon Microchip (Atmel) Studio for programming AVR microcontrollers? PlatformIO, an extension for VSCode, allows not only to program Arduino code, but also plain avr-gcc including the upload with an USBasp programmer. A student of mine showed me how to configure platformio and I had to find out that the avrdude which comes with platformio is somewhat limited in its functionality. The...
🇸🇪 1TM121 VT 2022 - Labb 2 del 3
zhlédnutí 87Před 2 lety
Här visar jag vad vi måste göra för att visa fler än en siffra på en multiplexad display.
🇸🇪 1TM121 VT 2022 - Labb 2 del 2
zhlédnutí 58Před 2 lety
I den här delen anslutar vi en 7-segmentsdisplay till vår Eduino. Först bara för att lysa upp en siffra på denna display med gemensama anoder (pluspoler).
🇸🇪 1TM121 VT 2022 - Labb 2 del 4
zhlédnutí 48Před 2 lety
Nu styr vi 7-segmentsdisplayen med hjälp av biblioteket SevSeg av Dean Reading.
🇸🇪 1TM121 VT 2022 - Labb 2 del 1
zhlédnutí 70Před 2 lety
Vi tittar på 8 lysdioder som ansluts till en 8-bit GPIO port hos en ATmega32U4 på en Arduino.
🇸🇪 Ingångsresistansen hos en voltmeter
zhlédnutí 122Před 2 lety
🇸🇪 Ingångsresistansen hos en voltmeter
LogScale
zhlédnutí 173Před 2 lety
LogScale
🇸🇪 Mätningar med oscilloskopet 3/5
zhlédnutí 115Před 2 lety
🇸🇪 Mätningar med oscilloskopet 3/5
🇸🇪 Mätningar med oscilloskopet 2/5
zhlédnutí 192Před 2 lety
🇸🇪 Mätningar med oscilloskopet 2/5
🇸🇪 Mätningar med oscilloskopet 5/5
zhlédnutí 125Před 2 lety
🇸🇪 Mätningar med oscilloskopet 5/5
🇸🇪 Mätningar med oscilloskopet 4/5
zhlédnutí 203Před 2 lety
🇸🇪 Mätningar med oscilloskopet 4/5
🇸🇪 Mätningar med oscilloskopet 1/5
zhlédnutí 386Před 2 lety
🇸🇪 Mätningar med oscilloskopet 1/5
1TE663/723 HT2021 - Lab 8 summary
zhlédnutí 144Před 2 lety
1TE663/723 HT2021 - Lab 8 summary
1TE663/723 HT2021 - Lab 6 summary
zhlédnutí 134Před 2 lety
1TE663/723 HT2021 - Lab 6 summary
1TE663/723 HT2021 - Lab 5 summary
zhlédnutí 130Před 2 lety
1TE663/723 HT2021 - Lab 5 summary
Timer interrupt latency on the ATmega328
zhlédnutí 561Před 2 lety
Timer interrupt latency on the ATmega328
Fast versus phase-correct PWM
zhlédnutí 4,2KPřed 2 lety
Fast versus phase-correct PWM
1TE663/723 HT2021 - Lab 4 part 1b
zhlédnutí 100Před 2 lety
1TE663/723 HT2021 - Lab 4 part 1b
1TE663/723 HT2021 - Lab 5 part 1
zhlédnutí 188Před 2 lety
1TE663/723 HT2021 - Lab 5 part 1
1TE663/723 HT2021 - Lab 4 part 1
zhlédnutí 220Před 2 lety
1TE663/723 HT2021 - Lab 4 part 1

Komentáře

  • @serdartoren
    @serdartoren Před 20 hodinami

    Arduino framework increases RAM usage a lot and I don't like cpp files. This is exactly what I was looking for, hopefully I'll be able to compile it into a much smaller size

  • @campbellmorrison8540

    Extremely thoughtful and careful teardown, actually this video is more a disassembly. I love trying to find out how these sorts of devices work so I really enjoyed listening to you impart your knowledges as you progressed A1

  • @MikeThena-r5j
    @MikeThena-r5j Před 15 dny

    I love his cursor so BAD!

    • @uwezimmermann5427
      @uwezimmermann5427 Před 14 dny

      you'll have to take your own hand though - mine is not for sale 😎

    • @uwezimmermann5427
      @uwezimmermann5427 Před 14 dny

      in case you have not seen the other recent comment about the cursor: here is the (Windows) tool czcams.com/video/kwSqtNvT7to/video.html

  • @tester428
    @tester428 Před 16 dny

    Hii could you please provide a tutorial on how to change the cursor pointer to the one you use in this video ?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 16 dny

      luckily I don't have to: czcams.com/video/kwSqtNvT7to/video.htmlsi=pu2uKx6T8CqcjTRU&t=487

  • @mnavarrotube
    @mnavarrotube Před 26 dny

    This is a great video. Exactly what I needed. Thanks 👍🏼

  • @Jesperrnyman
    @Jesperrnyman Před měsícem

    Thank you so much!! Had so much problem with microchip studio so I really needed this😁

  • @vulcanbespock
    @vulcanbespock Před měsícem

    Dark mode is in options got it, change the theme to dark 🙂

    • @uwezimmermann5427
      @uwezimmermann5427 Před měsícem

      have a look at my newer videos - I have abandoned Microchip Studio and converted to PlatformIO under VSCode

  • @vulcanbespock
    @vulcanbespock Před měsícem

    How did you set-up Atmel Studio 7 up in dark mode? Super Video too!

  • @garavel28
    @garavel28 Před 2 měsíci

    Hello Sir, can I ask you a question via email about the MPPT algorithm that I am trying to make using Arduino Mega 2560?

  • @MathCuriousity
    @MathCuriousity Před 3 měsíci

    I have one final question - and I apologize for not putting them all in one: I see we have sine graph shown but could we just as easily show the cosine graph by changing the perspective so the imaginary and real axis change places?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 3 měsíci

      If you knew the system behind youtube and how comments are presented to makers, you would have posted everything as a single question. Adding to some other comments here and there makes it a mess behind the scenes to find all your small questions... yes, sine and cosine do not really matter, yet I start by showing a sine wave which starts at 0, and in order to maintain this context I need to rotate the axes at a later point....

    • @MathCuriousity
      @MathCuriousity Před 3 měsíci

      Well if we have the sine wave pre rotation I don’t understand why u needed to rotate at all?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 3 měsíci

      @@MathCuriousity When I made this animation in povray I had a certain context with my students in mind - it was never meant to be a fully self-sustained, self-explaining video. I mostly put it on youtube because it was the simplest way to make it accessible for my students and because I wanted to show how to make mathematical animations in povray. I rotated the curve, because we usually tend to comprehend the real part of the complex function as the observable quantity in the real world, and in the context of electronics the observable quantity (usually a voltage) is shown on the vertical axis of e.g. an oscilloscope.

  • @MathCuriousity
    @MathCuriousity Před 3 měsíci

    What does “t” stand for?

  • @ArcAiN6
    @ArcAiN6 Před 3 měsíci

    yea... pastebin isn't the best place for it. ""Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it. ""

  • @ArcAiN6
    @ArcAiN6 Před 3 měsíci

    Is the source code available for this?

  • @WesLindstrom-Chalpin-tn6ol
    @WesLindstrom-Chalpin-tn6ol Před 3 měsíci

    Yo is there a way to use this to visualize a 3d sine wave on the tonic (root note in music) and 7th note of the scale this could potentially give insight into a 4d visualization. Let me know, thanks

    • @uwezimmermann5427
      @uwezimmermann5427 Před 3 měsíci

      yo I have no idea what you are talking about

    • @WesLindstrom-Chalpin-tn6ol
      @WesLindstrom-Chalpin-tn6ol Před 3 měsíci

      I did a terrible job explaining. In music if you use a visualizer to look at the frequencies of 2 sine waves tuned together (“tonic note” played with the “7th” note) they harmonize and their interference pattern creates a 3d illusion. So if we could simulate what this video does with 2 specifically tuned sine waves played at the same time they may create a 4d shape or at least something cool. Lowkey I’m garbage at explaining this shit but if you need help just copy my comment into chat gpt and ask for it to rephrase it. I appreciate it!

    • @uwezimmermann5427
      @uwezimmermann5427 Před 3 měsíci

      @@WesLindstrom-Chalpin-tn6ol you can visualize the addition of sine waves, but I would not call it 4D. You can have a look at 3blue1brown's videos and learn how to use his tool Manim.

  • @AlejandroGutierrez-Bit
    @AlejandroGutierrez-Bit Před 3 měsíci

    How to program an AT91SAM9G45 with microchip studio?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 3 měsíci

      I have no experience with the ATSAM family nor with ARM processors in general in Microchip Studio.

  • @whatever3041
    @whatever3041 Před 3 měsíci

    How can we do this for currents? Aliases are only showing node voltage.

    • @uwezimmermann5427
      @uwezimmermann5427 Před 3 měsíci

      set a label, then right-click to change its properties - there you should find all your currents as well.

  • @ozturkosman
    @ozturkosman Před 4 měsíci

    Hi. Thanks for this video. On the board I designed, the LED is connected to the PB4 pin. How can I change the bootloader to flash this LED?

  • @user-xb9wb8sc9l
    @user-xb9wb8sc9l Před 4 měsíci

    What's complex about it? Isn't this just a cosine and sin wave together?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 4 měsíci

      have you heard of the concept of complex numbers? Numbers which have a real and an imaginary part?

    • @user-xb9wb8sc9l
      @user-xb9wb8sc9l Před 4 měsíci

      @uwezimmermann5427 of course. But what's complex about this rather than, as i previously stated, it being a cosine and sin wave?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 4 měsíci

      @@user-xb9wb8sc9l it shows how a projection of a rotating vector in the complex plane onto the real axis gives a sine wave proceeding in time. It's the basis of treating the impedance of capacitors and inductors as imaginary entities in the so-called j-omega method, a special case of the Laplace transformation, used in electronics and electrical engineering.

    • @user-xb9wb8sc9l
      @user-xb9wb8sc9l Před 4 měsíci

      @@uwezimmermann5427 when are you going to answer my question?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 4 měsíci

      @@user-xb9wb8sc9l I don't understand what your problem with my animation here is. It is "complex" in the meaning that it shows sine and cosine on the complex plane as part of the calculation of phase angles in the ac analysis of electronic circuits. There is nothing "complex" about it in the meaning of "complicated"

  • @manfredbogner9799
    @manfredbogner9799 Před 6 měsíci

    very good

  • @akoznasovajusername
    @akoznasovajusername Před 7 měsíci

    Hello, Uwe. Are you maybe a sound engineer?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 7 měsíci

      no, sorry I'm not .

    • @akoznasovajusername
      @akoznasovajusername Před 6 měsíci

      @@uwezimmermann5427 Thank you for repliyng. I thought you were maybe a sound engineer from NDR.

    • @uwezimmermann5427
      @uwezimmermann5427 Před 6 měsíci

      @@akoznasovajusername no, actually I am not, but there are literally hundreds of us in Germany.

  • @nasrinsultana2133
    @nasrinsultana2133 Před 7 měsíci

    Very nice

  • @razeenag8478
    @razeenag8478 Před 8 měsíci

    The secret of universe

  • @CyroCoders
    @CyroCoders Před 9 měsíci

    Why the fuck was i watching this for 30 minutes straight 💀

  • @johnheitz7517
    @johnheitz7517 Před 9 měsíci

    Great Video, please do more

    • @uwezimmermann5427
      @uwezimmermann5427 Před 9 měsíci

      I think I have to - now with almost 1000 followers (how is this even possible). But currently I'm lacking the time...

  • @Tallglassofredwine
    @Tallglassofredwine Před 9 měsíci

    For the wages of sin(e) is death ✝️🙌🏼

  • @pranavivedula
    @pranavivedula Před 9 měsíci

    So, so helpful!

  • @Patten42
    @Patten42 Před 10 měsíci

    "I know I write code, I don't need comment" 😂Thanx for the tutorial!

  • @ahmadkhattab5700
    @ahmadkhattab5700 Před 10 měsíci

    Thank you

  • @Jptoutant
    @Jptoutant Před 10 měsíci

    Hey sir GREAT video! Btw what is the programmer you use to flash the chip? I would like to find an alternative to the expensive Atmel Ice

    • @uwezimmermann5427
      @uwezimmermann5427 Před 10 měsíci

      I have my own construction based on Thomas Fischl's USBasp which is open source. There a lot of commercial clones of the USBasp available from Aliexpress, eBay etc. They cost somewhere between 3$ and 10$

  • @viniciuslemos7924
    @viniciuslemos7924 Před 10 měsíci

    Steve Mould video brought me here. Thank you for your time and dedication to explain in such good animation!

  • @ianthehunter3532
    @ianthehunter3532 Před 11 měsíci

    Which is the image viewer you use?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 11 měsíci

      I mostly use Thumbsplus from www.cerious.com/ which is mainly an image database. For some purposes I also use IrfanView.

  • @Zero-zl8xw
    @Zero-zl8xw Před rokem

    I always wondered about the camera at your pfp, finally got to see some of your work. Looks amazing!!

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      It's not the same camera anymore, but yes...

    • @Zero-zl8xw
      @Zero-zl8xw Před 11 měsíci

      @@uwezimmermann5427 uh I also like to take photos and would love to see some of your recent works!

  • @prasantakumarpadhi4399

    Bravo!

  • @viniciuslongo4622
    @viniciuslongo4622 Před rokem

    worked like a charm in Ubuntu, thanks!

    • @comod
      @comod Před 7 měsíci

      With the same tweaks or out of the box?

  • @sto2779
    @sto2779 Před rokem

    4:24 - "board_build.f_cpu" is part of the AVR's SDK syntax?

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      it's part of the PlatformIO configuration syntax, but essentially it sets the F_CPU macro in gcc.

  • @doquockhoa
    @doquockhoa Před rokem

    Can you make video about I2c protocol. I see a lot of video but I not understand? Thank you very much

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      What don't you understand and to which level of detail do you want to understand the I2C bus? I would recommend to read some documentation rather than relying on a youtube video. NXP - or rather former Philips - is the inventor of I2C and they have the standard document: www.nxp.com/docs/en/user-guide/UM10204.pdf

    • @Patten42
      @Patten42 Před 10 měsíci

      @@uwezimmermann5427 You are great at explaining and I am interested too. Like a typical circuit with data input from a sensor and output on a LCD or something while using a MC as 328p and coded in AVR-C?

    • @uwezimmermann5427
      @uwezimmermann5427 Před 9 měsíci

      @@Patten42 I am currently a bit overloaded with work, hence the lack of any new videos... but... and with soon 1000 subscribers...

  • @isacdaimary9908
    @isacdaimary9908 Před rokem

    Can you please share the spice model of 555, my existing model is giving error everytime I tried to run it.

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      I am just using the NE555 model from the [Misc] category in LTSpice - what kind off error do you get? What version of (LT?) Spice are you using? Where did you get your model from? In addition I also included the TLC55x model from TI to my LTSpice which also works fine - you can find it on the TI website www.ti.com/product/TLC555

  • @doquockhoa
    @doquockhoa Před rokem

    can you tell me how to define F_CPU ? thanks 

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      did you see my follow-up video on the topic? czcams.com/video/BKO1rYMPF_k/video.html you enter it as "board_build.f_cpu = 1000000UL" (for f=1MHz) in the settings in platformio.ini

    • @doquockhoa
      @doquockhoa Před rokem

      @@uwezimmermann5427 thank you very much

  • @ogimitzev9033
    @ogimitzev9033 Před rokem

    Hi Uwe, Thank you for the nice video. Do you know the Serial protocol voltage level for AR-60 (RS232, TTL 5V/3V)? Thanks

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      I would need to check, but I am almost convinced that it should be RS232. You should be able to test this by measuring the idle voltage on the TX-line. If it is positive then it should be either TTL 3V/5V, if it is negative it is certainly RS232.

    • @ogimitzev9033
      @ogimitzev9033 Před rokem

      @@uwezimmermann5427 Thank you. It is 5V, but I was unable to get a response from the device following AccuBeat RS232 protocol for their nano product.

  • @nsummy
    @nsummy Před rokem

    Excellent explanation. I’ve been working on a couple of pwm projects and have been completely confused by the difference. My only criticism of this video is you didn’t explain why someone would use fast over phase correct or vice versa :). Either way this gave me a good start. Thanks!

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      This video was planned as a short additional material for my students, not as a self-explanatory, full tutorial... if I ever find the time... Just in short, fast-mode gives you twice the pwm frequency at otherwise same performance, but it is also the standard mode in most cases. If you run two channels at different duty cycles still they will either be switched on or off at the same time giving you larger current transients in total. Phase-correct pwm not only distributes the switching times more widely, it also can be used if you need to avoid overlaps between switching, e.g. if you use one channel for the switching of the upper and one for the lower transistors in a H-bridge.

    • @nsummy
      @nsummy Před rokem

      @@uwezimmermann5427 Thank you! that helps a lot.

  • @derekkozel
    @derekkozel Před rokem

    Thank you for the teardown! It was very interesting to see the insides of a small model like this. It would be great to see the various control signals as the oscillator turns on and locks in.

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      Yes, it probably would be - however, I don't think I will disassemble my working units, and also it will be difficult to probe the unit during operation, because of the compact design.

  • @kavinduzoysa3906
    @kavinduzoysa3906 Před rokem

    Thank you so much, this is really helpful. Since I am using the Arduino UNO as programmer, please let me add the relevant command here. I think it will be useful. `avrdude -pm328p -c arduino -P /dev/ttyACM0`

  • @vishaldotgupta
    @vishaldotgupta Před rokem

    one more thing i will like to add. when you were testing MRF321 in diode mode, it is important to check BJT in fwd , reverse mode and in between Collector and emitter. these three tests are conclusive to check good or bad devices. three test lead may be de soldered to isolate the device

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      Thank you for your comments - actually I have no ambition to fix this unit, since I got two working ones. I keep this one as educational material for my students.

  • @vishaldotgupta
    @vishaldotgupta Před rokem

    very nice and detailed information. could you find what actually was wrong with this unit. to make it work, one need right temprature (MRF tx and resistors), 6.8 Ghz feild ( can be verified using feild probes and spectrum Analyser), the continuity of coil can be verified using DMM. for infrared lamp i am not sure but can be visible using from digital camera with IR Filter removed. photo sensor could be checked using DMM and or scope. i have one of these, in which lock bit is not going down. Shell gets warm so i assume MRF is okay. Rest i need to check. I may be wrong my assumptions, so please guide

  • @vanditshah5131
    @vanditshah5131 Před rokem

    Thank you so much, man. Your video helped me a lot

  • @eroltube100
    @eroltube100 Před rokem

    Thank you for good explanations. I wonder whether I can use simulate this led blinking under platformio? (I use linux.)

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      It is very difficult to realistically simulate microcontroller code. The microcontroller is supposed to react to events from the outside in realtime... There are emulation/simulation tolls around, but as far as I know none is integrated into PlatformIO.

    • @eroltube100
      @eroltube100 Před rokem

      @@uwezimmermann5427 Thank you

  • @Mehmetemin0606
    @Mehmetemin0606 Před rokem

    ı need some help. ı want to keep first pwm stabil and control second pwm with potentiometer

    • @uwezimmermann5427
      @uwezimmermann5427 Před rokem

      that could almost sound like a question I ask my students... If you are using an ATmega and you are using the same timer for both pwm-channels, then you can change the duty cycles individually by setting the OCRxA and OCRxB to different values. E.g. for Timer1 this would be OCR1A and OCR1B. Now you can use one of the ADC channels to read the potentiometer value and use this value to set the corresponding OCR-value. In Timer1 there is are 10bit PWM modes which suit the 10bit ADC of the Atmega ideally. In the main loop you would periodically start an AD-conversion and then just write OCR1A=ADC. In Arduino-speech you could do almost the same by writing analogWrite(analogRead(chan)/4) here you need to divide by 4 because in the default settings analogRead is 10bit wide but analogWrite only 8bit.

    • @Mehmetemin0606
      @Mehmetemin0606 Před rokem

      @Uwe Zimmermann It is so important proposal for my school project. thanks a lot for your help.

  • @helmutalexanderrubiowilson6835

    very nice!!!!

  • @danhellgren5671
    @danhellgren5671 Před rokem

    I use this for motor control on a STM32. But I have never heard the expression phase-correct, I have only heard center aligned.