Это видео недоступно.
Сожалеем об этом.

Arduino Workshop - Chapter 4 - Bit Math

Поделиться
HTML-код
  • Опубликовано: 17 авг 2024
  • The full Arduino Workshop in step-by-step format can be found here core-electroni...
    In this section, you'll be learning about control individual bits within bytes using bit-wise operators and logic.
    We're official retailers for Arduino in Australia - powered by makers, for makers! core-electroni...

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

  • @whitefields5595
    @whitefields5595 4 года назад +3

    The difficulty in these vids is predicting the prior knowledge of the audience. I only really understood this once I had implemented a shift register on my Arduino. You have to be prepared to grind your way through this to really appreciate how you can save memory, I/O and RAM by ‘bit banging’ ......Thanks for helping us.

  • @MrTekkitWorld
    @MrTekkitWorld 5 лет назад +8

    Bless this guy

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

    nice style. i like how you included white board and IDEs. first video i've seen on bitwise operations, very informative

  • @chimpspecialist
    @chimpspecialist 4 года назад +7

    It's a "no" from me. I got lost when he started describing shift registers.

    • @whitefields5595
      @whitefields5595 4 года назад +1

      Jack Smith ... Jack get the hardware and build it. Don’t give up! You will love it when you get it!

  • @defnotdev1
    @defnotdev1 Год назад

    thank you

  • @hubertmargreiter3508
    @hubertmargreiter3508 6 лет назад +1

    Excellent explanation, please continue ....

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

    BETWEEN does not include the end points. Should say; "enter value from 0 to 255"
    You should explain WHEN and WHY to use bitwise operators. Ex: to clear a specific bit, use ??? To invert a specific bit, use ???

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

    Excellent thank you!

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

    Thanks a lot for the video.
    I am just having one query...When i tried implementing the same code in Arduino...once the program solves for a particular value that we have asked for eg: 75, then it again starts solving the entire thing for 0 (which i did not gave as input at all)...it would be good if you could help me out with this...Thanks!

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

      In the serial Monitor try changing it to "No line ending"

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

    I have not heard any reference to the CARRY BIT in any lecturers. Almost all microprocessors do have one to carry or borrow with an ADD or SUBT instruction. Most microprocessors allow you to ROTATE via the CARRY bit and test or set and clear its state. There is no reference to the ROR or ROL, or RORC or ROLC through CARRY operations. These instruction can be very useful at times. A notable example is generating a CRC-16 data packet checksum. The shift out bit to carry can be used to do specific XOR bits on a standard x16 + x12 + x5, + x1 polynomial calculation at high data speeds. Perhaps these bit-wise operations do exist for C++ on the Arduino IDE, but not published?

  • @xurshidsodiqov9323
    @xurshidsodiqov9323 2 года назад +1

    Amazing 👏

  • @jean-christophesicotte-bri1315
    @jean-christophesicotte-bri1315 6 лет назад +2

    It looks like the shiftWrite function doesn't exist. i can't find any documentation on google and the core-electronics page in the description doesn't explain it either. Can you clarify this please? is there an alternative to this nonexistant function you're using? thanks!!

    • @gambozina
      @gambozina 6 лет назад +1

      see minute 17:00 (for example) and stop the video, and you can see the local function.

    • @reyhaneheskandari837
      @reyhaneheskandari837 6 лет назад

      it is a function name that we are defining not something specific. you can watch chapter 3 creating functions for more details

    • @Bill_N7FTM
      @Bill_N7FTM 6 лет назад

      JEAN-CHRISTOPHE SICOTTE-BRISSON Not ShiftWrite, its ShiftRight. It's a binary function not an Arduino command!

    • @fablesfables
      @fablesfables 5 лет назад

      @@gambozina Thank you!

    •  4 года назад

      Bill Morrison the function created by the gentleman on the tutorial is called shiftWrite().

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

    So-So not what I was looking for but it helped..

  • @alcanceweb
    @alcanceweb 6 лет назад +1

    Outstanding explanation. Thank you.

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

    very timely help. thanks.

  • @AliG.G
    @AliG.G 6 лет назад +1

    brilliant - i understand it now

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

    Thanks for your great video.
    If we used two 74HC595 shift registers connected in series, is it possible to shift bits between both shift registers? For example shift the last bit of the first shift register into the first bit of the second one?

    • @audiodiwhy2195
      @audiodiwhy2195 4 года назад +1

      Yes. That’s exactly what makes shift registers so useful. You can shift a series of bits through as many shift registers in series as you want to wire up. Then issue a latch command to present all data to the outside world.

  • @d-1381
    @d-1381 3 года назад

    I used the sample on the website but the lights wont work.

    • @newtome-jessegates6310
      @newtome-jessegates6310 3 года назад +3

      i know its been 10 months, but ive got an answer for you, because its not in their diagram! in their diagram the 7th pin on the top is empty when it actually needs a 5v wire too!

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

    Shouldn't you? have also checked for negative numbers by simply putting an OR in that IF statement?

  • @bestcreations4703
    @bestcreations4703 3 года назад +2

    I’m a programmer of 7 years I’m also high and it’s like 6am lmao idk why I’m here

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

      Is it easy for you sir?

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

      @@omniyambot9876 is what easy for me? Bit maths? Or being a programmer? Being high maybe 🤔? Or is it me being there at 6am

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

      @@bestcreations4703 hehe the bit maths sir. I'm just curious. And the port manipulation. Because I find it very hard. I've been to Arduino for about 3 months.

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

      @@omniyambot9876 port manipulation is relatively simple once you just write a simple chart down in a note book all you have to do is look up the Arduino processors data sheet and you will find a section detailing how using about two to three commands control all ports using an eight digit binary once you get that down and Lear how to control one bit at a time you can create a function you are able to call that will take in what pins you want to control and set them to

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

      @@omniyambot9876 being into Arduino and being into programming is two completly different beats I’ve been working in video game development for many years so I’ve had to get used to all this for a long time not to mention I have taken multiple classes not only in college but also high school that covered binary logic and bit wise I’ll be honest I learned to program before I even knew how or what bit wise logic was so it was an easy translation

  • @taranagnew436
    @taranagnew436 6 лет назад

    what is the difference between a OR and a XOR?

    • @aliaa1876
      @aliaa1876 6 лет назад

      XOR gives a 1 when the 2 bits are different for example :
      0101
      1000
      the result is 1101
      unlike OR that gives 1 when one or both of the bits are 1

    • @taranagnew436
      @taranagnew436 6 лет назад

      thx

    • @taranagnew436
      @taranagnew436 6 лет назад +1

      what would you use XOR for (gimme an enxample)

    • @aliaa1876
      @aliaa1876 6 лет назад

      I don't know its uses . I only know the trusth table of it

    • @massimookissed1023
      @massimookissed1023 4 года назад +1

      @@taranagnew436 , if you XOR two numbers, the result will be zero if those numbers are equal. So it's a good test for equality.
      XOR can also be used to generate parity bits. XOR two bits, an odd number of bits will result in 1, an even number will give 0.

  • @Build_the_Future
    @Build_the_Future 4 года назад +1

    This is just what I need to get my full-size 2 legged Robot to work with CAN bus. I would be honored if you check it out on my channel and tell me what you think thanks.