How I program GPIOs in C | Embedded System Project Series #12

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

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

  • @redwoodenjoyer
    @redwoodenjoyer Год назад +2

    You are so, so smart and good at explaining this. Coming from Arduino and slowly leveling up my knowledge and realizing that even something as simple as direct bit banging was the TIP OF THE ICEBERG for all of firmware

    • @artfulbytes
      @artfulbytes  Год назад +2

      Thanks! haha yep, lots of details hiding underneath :)

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

    Thank you for this wonderful series. Can't wait to see what's next.

  • @needywallaby2030
    @needywallaby2030 7 месяцев назад

    i was searching for copper but found a gold
    this channel is best imo

  • @renanpils
    @renanpils 9 месяцев назад

    This series is awesome man! Very good content!

  • @codsweat5152
    @codsweat5152 14 дней назад

    Is there a roadmap to do this I Alr know C nd some arduino

  • @3deesuk
    @3deesuk Год назад

    in 16:55 min ,
    what is pin_bit? i understand pin number and port number.
    what is different between io_pin_bit and io_pin_idx?
    (io & IO_PORT_MASK) >> IO_PORT_OFFSET this gives port 0 instead of port one for IO_10?

    • @artfulbytes
      @artfulbytes  Год назад +1

      pin_bit is the bit value and pin idx is the position idx of that bit value.
      For example, for pin number 7, the bit value (pin_bit) is 0b10000000 (dec: 128), the 7th bit is set. Pin idx is 7, because it's the 7th bit position. For pin number 3, the bit value is 0b00001000 (dec: 8), and pin idx 3.
      Yes (io & IO_PORT_MASK) >> IO_PORT_OFFSET gives value 0 for IO_10. But in io_port_e enum, value 0 corresponds IO_PORT1 (there is no IO_PORT0). I did it like this because in TI calls the first port 1 (not 0) in the datasheet.

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

    Hi there, just found this channel, and this is exactly what I would love to do. I'm learning self-taught, but gets to hard for me. Can you please tell me something like a routemap so I can use to study?. (Something like: first you have to learn C, then electronics, then ...).

    • @artfulbytes
      @artfulbytes  Год назад +3

      Firstly, I would just focus on writing programs in C without any microcontroller, just programs running on your host machine, to get familiar with it. Once you feel somewhat comfortable you can pick up a simpler microcontroller, like an 8-bit one. Start small. Try to blink an LED with a GPIO, detect a button press with interrupt, hook up a sensor and write a driver to talk to it learning about uart/i2c/spi... You will have to do some simple circuits to connect things so you will learn some electronics as you go along. You don't need to be an expert in electronics if you purely want to focus on embedded software. Also I don't like the word "study", you don't learn embedded systems by reading a book, you learn by doing. Note, I'm not saying you shouldn't read, but that you should read what you need to know to do what you want to do. So not "How to learn C", instead more "How do I blink an LED with GPIO on the microcontroller I have in front of me"... Something like that :)

  • @zDoubleE23
    @zDoubleE23 9 месяцев назад

    Any good sources where the preprocessors like #ifndef, #end, etc are explained and exemplified with use cases?

    • @artfulbytes
      @artfulbytes  9 месяцев назад

      No resource to cover them all, I've just picked it up here and there. But as I mention somewhere in the series, avoid them when you can because they can lead to hard-to-debug issues down to road.

    • @sternowl2345
      @sternowl2345 3 месяца назад

      gcc.gnu.org/onlinedocs/cpp.pdf

  • @BrandonJJackson
    @BrandonJJackson 3 месяца назад

    Bro die i understand it right? The driver codeblock could be also caller a Hardware abstraction layer? (HAL)

  • @Maksym_Palii
    @Maksym_Palii Год назад +1

    Only now I've realized: TI - Texas Instruments😁🤣

  • @curiosityseesomethinginter9116
    @curiosityseesomethinginter9116 4 месяца назад

    which IDE you are using?

    • @artfulbytes
      @artfulbytes  3 месяца назад

      No IDE in this video, here I'm only using Vim and alacritty-terminal. In some of the other videos I use CCStudio.

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

    👍

  • @ReganeKegane-wq9by
    @ReganeKegane-wq9by Год назад +1

    Ok

  • @bhojasd
    @bhojasd 6 месяцев назад

    CAN YOU PLEASE MAKE VIDEOS IN SLOW MANNER ....YOU MOVED FAST FARWARD YOUR CODE WHICH IS VERY UNCOMFORTABLE TO UNDERSTAND FOR ME

    • @Anbat123
      @Anbat123 2 дня назад

      you can change the speed of playback by clicking the cogwheel under the video.

  • @bhojasd
    @bhojasd 6 месяцев назад

    NEXT TIME PLEASE DON DO FARWARDING OF CODE PORTION .......PLEASE MAKE IT SLOW AND ALSO TALK SLOWLY ....LOVE FROM INDIA