Sine Wave Generator circuit with simple microcontroller - Part 17 Microcontroller Basics (PIC10F200)

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • Creating a sine wave generator without a hardware DAC and only 3 GPIOs may seem like an impossible task but Sergey was up to it! In this tutorial, we show how, using an R-2R resistor array and a PIC10F200, you can create a simple and low cost sine wave generator.
    This video has a little more complicated hardware and the written tutorial goes into more detail on both the hardware and how Sergey selected the values used. Also, while a lot simpler than our more recent tutorials, if you want the code that you can copy and paste or need some more time going through everything line by line, check out the written tutorial that this video is based off of: www.circuitbread.com/tutorial...
    If you find this interesting, subscribe to the CircuitBread channel for more videos on microcontrollers and other beginner and intermediate electronics!
    Table of Contents
    0:00 Introduction
    0:21 Hardware setup with an R-2R resistor array
    1:31 Discussion on the resolution of the sine wave with only 3 GPIOs
    2:12 How we did the math to know what to output
    3:48 Reviewing the very simple assembly code
    4:47 Showing the outputs at different points in the R-2R array
    8:07 Restrictions and ways around the restrictions with this setup
    For electronics tools, tutorials, equations and more check out our site: www.circuitbread.com
    And check out our Friends of CircuitBread, who offer special discounts, product samples, resources and more to our users: www.circuitbread.com/friends
    CircuitBread is joining the fight to help people more easily learn about and use electronics. With an ever-growing array of equations, tools, and tutorials, we're striving for the best ways to make electronics and electrical engineering topics more accessible to everyone.
    Connect with CircuitBread:
    Instagram ➤ / circuitbread
    Facebook ➤ / circuitbread
    Twitter ➤ / circuitbread
  • НаукаНаука

Комментарии • 20

  • @CircuitBread
    @CircuitBread  3 года назад +1

    Hey everyone! As always, if you want a more in-depth analysis of the code and setup, go check out Sergey's written tutorial: www.circuitbread.com/tutorials/sine-wave-generator-part-17-microcontroller-basics-pic10f200 Have fun!

  • @ashveet420
    @ashveet420 4 года назад +2

    Amazing channel I love it keep up the great work

  • @raghuannavarapu9982
    @raghuannavarapu9982 4 года назад +2

    Excellent website and youtube channel

    • @CircuitBread
      @CircuitBread  4 года назад

      Thanks Raghuvaran, we appreciate the feedback!

  • @zetaconvex1987
    @zetaconvex1987 3 года назад

    Subscribed! Very inspiring. A sine wave generator using one of the simplest of MCUs.
    I tried combining an NE555 with a capacitor once, and you can get some pretty smooth waves even with just that.

    • @CircuitBread
      @CircuitBread  3 года назад

      Thanks! Yeah, I'm amazed at the things Sergey can squeeze out of these simple PICs. I don't think I would have even attempted it, I would've just gone the 555 route if I needed a sine wave, though this is slightly more flexible.

  • @dhruvgoyal7163
    @dhruvgoyal7163 3 года назад +1

    dammit your channel is freaking awesome.. keep teaching

  • @vengug7303
    @vengug7303 3 года назад

    Hi Sir Thanks for sharing how much frequency of this sine and how to configure 100Hz please guide me

  • @Mrjeje0
    @Mrjeje0 4 года назад

    What version of MPLAB X are you using? I recently started learning this stuff but with MPLAB X 5.4 the MPASM compiler is gone, leaving only XC8 which is, as far as I was able to see, a strange mix of C and assembly

    • @CircuitBread
      @CircuitBread  4 года назад

      I haven't tested it recently, but when MPLAB X stopped working on my Mac because I updated my OS (stupid move, I know), I switched over to MPLAB Xpress. Which is giving me some warnings about data migration at the moment, so I don't know how much I'd recommend that. In general, I have my issues with Xpress but it does MPASM if you change the settings and the interface is simplified for those of us that aren't going to be doing production level development.

    • @Mrjeje0
      @Mrjeje0 4 года назад

      @@CircuitBread I am working with MPLAB X 5.35 now. MPASM is still usable in that version and all your examples work on it. However, it does say that MPASM is not compatible with 64 bit systems, and obviously the newest version, 5.4, does away with mpasm entirely. I suggest maybe doing something about the xc8 compiler since this seems to be where Microchip is going in the future. Moreover, there is nothing quite like what you guys are doing out there, especially not for xc8.

    • @CircuitBread
      @CircuitBread  4 года назад

      We have considered doing a series that is based on C instead of assembly but that's not our next planned series. The xc8 compiler is for C only, so wouldn't work for this series. Odd that they'd get rid of mpasm completely, though - there must be more to that story. Assembly may not be incredibly popular but it still has its uses.

    • @jeanramirez99
      @jeanramirez99 4 года назад

      ​@@Mrjeje0 Same happened to me. You can download a downgraded version of MPLAB here because I have read that from version 4 MPASM is gone.

  • @mnada72
    @mnada72 3 года назад

    Hello again, is this output all positive (Unipolar) ?

    • @CircuitBread
      @CircuitBread  3 года назад

      Hey there! That is correct - all of the output is positive, it does not swing around 0VDC.

  • @sweekarkhadka4595
    @sweekarkhadka4595 3 года назад

    Can you please help me writing a programme such that for a single input the output comes forever until the input is send again.....as in a sound sensor

    • @CircuitBread
      @CircuitBread  3 года назад

      Hi there! Unfortunately, Sergey doesn't have the time to do individual lessons but if you go through all of the tutorials (which, the "gaps" are on the website - no videos for those yet, but the written tutorials are more in-depth anyway) this should be something you can achieve without any further instruction.

    • @sweekarkhadka4595
      @sweekarkhadka4595 3 года назад

      Yeah......I did it but please help me......should we use internal pull up resistors

  • @dreamyrhodes
    @dreamyrhodes 2 года назад

    Can you change the frequency in program?

    • @CircuitBread
      @CircuitBread  2 года назад

      Yep, you can decrease the frequency by adding some delays. It mentions how briefly in the written tutorial.