Credits Menu

2:08Try commenting out the leds variable initialisation in gpio_demo.c

2:08Try commenting out the leds variable initialisation in gpio_demo.c

2:08Try commenting out the leds variable initialisation in gpio_demo.c

5:18Run our program, see the blinking lights and consider the leds variable to be dead code

🏃

5:18Run our program, see the blinking lights and consider the leds variable to be dead code

🏃

5:18Run our program, see the blinking lights and consider the leds variable to be dead code

🏃

6:03Try commenting out the GPIO_REG(GPIO_INPUT_EN) call

6:03Try commenting out the GPIO_REG(GPIO_INPUT_EN) call

6:03Try commenting out the GPIO_REG(GPIO_INPUT_EN) call

7:45Run and see that this makes no difference either

🏃

7:45Run and see that this makes no difference either

🏃

7:45Run and see that this makes no difference either

🏃

8:11Try commenting out the GPIO_REG(GPIO_INPUT_EN) call

8:11Try commenting out the GPIO_REG(GPIO_INPUT_EN) call

8:11Try commenting out the GPIO_REG(GPIO_INPUT_EN) call

9:24Run and see that the LED does not light up now1

🏃

9:24Run and see that the LED does not light up now1

🏃

9:24Run and see that the LED does not light up now1

🏃

10:55Determine to look at setting the LED intensity

10:55Determine to look at setting the LED intensity

10:55Determine to look at setting the LED intensity

13:08Take a brief look at the GPIO_REG(GPIO_OUTPUT_EN) bit-banging

📖

13:08Take a brief look at the GPIO_REG(GPIO_OUTPUT_EN) bit-banging

📖

13:08Take a brief look at the GPIO_REG(GPIO_OUTPUT_EN) bit-banging

📖

16:32Research LED-related functionality in led_fade.c

📖

16:32Research LED-related functionality in led_fade.c

📖

16:32Research LED-related functionality in led_fade.c

📖

20:15hossein1387 It is setting the output to be inverted

🗪

20:15hossein1387 It is setting the output to be inverted

🗪

20:15hossein1387 It is setting the output to be inverted

🗪

21:10Read about HW I/O Functions (IOF)2

📖

21:10Read about HW I/O Functions (IOF)2

📖

21:10Read about HW I/O Functions (IOF)2

📖

23:58hossein1387 Because in the schematic of GPIO the xor is in the pin data path, in other words, you have the option to invert the pin value by hardware, you can obviously do the same thing in software

🗪

23:58hossein1387 Because in the schematic of GPIO the xor is in the pin data path, in other words, you have the option to invert the pin value by hardware, you can obviously do the same thing in software

🗪

23:58hossein1387 Because in the schematic of GPIO the xor is in the pin data path, in other words, you have the option to invert the pin value by hardware, you can obviously do the same thing in software

🗪

25:45Consult the figure detailing the structure of a single GPIO Pin with Control Registers,3 wondering why you invert the output using a separate register

25:45Consult the figure detailing the structure of a single GPIO Pin with Control Registers,3 wondering why you invert the output using a separate register

25:45Consult the figure detailing the structure of a single GPIO Pin with Control Registers,3 wondering why you invert the output using a separate register

26:43hossein1387 No, it's pretty standard in ARM and other mcus

🗪

26:43hossein1387 No, it's pretty standard in ARM and other mcus

🗪

26:43hossein1387 No, it's pretty standard in ARM and other mcus

🗪

28:03Read about HW I/O Functions4

📖

28:03Read about HW I/O Functions4

📖

28:03Read about HW I/O Functions4

📖

29:23hossein1387 I think it is because of performance, because bit operation in C needs a couple of instructions to do the same thing while you can just setup a register to do that for you in hardware

🗪

29:23hossein1387 I think it is because of performance, because bit operation in C needs a couple of instructions to do the same thing while you can just setup a register to do that for you in hardware

🗪

29:23hossein1387 I think it is because of performance, because bit operation in C needs a couple of instructions to do the same thing while you can just setup a register to do that for you in hardware

🗪

31:08Determine to learn about the PWM

31:08Determine to learn about the PWM

31:08Determine to learn about the PWM

33:05hossein1387 IOFs are to set the functionality of the pin. Because you just have a few physical pins on your chip, you can't have a pin to do only GPIO or UART or SPI or PWM. So the IOF selects what functionality you want from that pin

🗪

33:05hossein1387 IOFs are to set the functionality of the pin. Because you just have a few physical pins on your chip, you can't have a pin to do only GPIO or UART or SPI or PWM. So the IOF selects what functionality you want from that pin

🗪

33:05hossein1387 IOFs are to set the functionality of the pin. Because you just have a few physical pins on your chip, you can't have a pin to do only GPIO or UART or SPI or PWM. So the IOF selects what functionality you want from that pin

🗪

35:11Read about the Pulse-Width Modulation (PWM) Peripheral5

📖

35:11Read about the Pulse-Width Modulation (PWM) Peripheral5

📖

35:11Read about the Pulse-Width Modulation (PWM) Peripheral5

📖

39:04Wonder if we can send different intensities over a pin

39:04Wonder if we can send different intensities over a pin

39:04Wonder if we can send different intensities over a pin

41:32Continue reading about the PWM6

📖

41:32Continue reading about the PWM6

📖

41:32Continue reading about the PWM6

📖

42:08hossein1387 No, the output is only 0 or 3.3/5 (digital). The PWM is just a pulse wave but you can tell it how long to be on or off. This way the average out put is no longer 0 or 5 but anything in between

🗪

42:08hossein1387 No, the output is only 0 or 3.3/5 (digital). The PWM is just a pulse wave but you can tell it how long to be on or off. This way the average out put is no longer 0 or 5 but anything in between

🗪

42:08hossein1387 No, the output is only 0 or 3.3/5 (digital). The PWM is just a pulse wave but you can tell it how long to be on or off. This way the average out put is no longer 0 or 5 but anything in between

🗪

43:08Wave sampling and generation

🖌

43:08Wave sampling and generation

🖌

43:08Wave sampling and generation

🖌

46:18hossein13877

🗪

📖

46:18hossein13877

🗪

📖

46:18hossein13877

🗪

📖

47:35hossein1387 If you look at the image, the PWM value is only 1 or -1, but the red line is the average

🗪

47:35hossein1387 If you look at the image, the PWM value is only 1 or -1, but the red line is the average

🗪

47:35hossein1387 If you look at the image, the PWM value is only 1 or -1, but the red line is the average

🗪

49:20hossein1387 One more thing to look is: the width of the pulse, if the pulse is 50% 1 and 50% 0, the average is 0

🗪

49:20hossein1387 One more thing to look is: the width of the pulse, if the pulse is 50% 1 and 50% 0, the average is 0

🗪

49:20hossein1387 One more thing to look is: the width of the pulse, if the pulse is 50% 1 and 50% 0, the average is 0

🗪

49:59Research pulse-width modulation8

📖

49:59Research pulse-width modulation8

📖

49:59Research pulse-width modulation8

📖

55:52hossein1387 Yup, but I don't know the third state you were talking about

🗪

55:52hossein1387 Yup, but I don't know the third state you were talking about

🗪

55:52hossein1387 Yup, but I don't know the third state you were talking about

1:01:12hossein1387 Okay, so for the pin to detect 1 in binary the pin voltage should be within a threshold, say 3v-3.3v; for binary 0 it should be between 0v-0.5v and the in between voltage is not valid. Meaning any binary value can be assigned

🗪

1:01:12hossein1387 Okay, so for the pin to detect 1 in binary the pin voltage should be within a threshold, say 3v-3.3v; for binary 0 it should be between 0v-0.5v and the in between voltage is not valid. Meaning any binary value can be assigned

🗪

1:01:12hossein1387 Okay, so for the pin to detect 1 in binary the pin voltage should be within a threshold, say 3v-3.3v; for binary 0 it should be between 0v-0.5v and the in between voltage is not valid. Meaning any binary value can be assigned

🗪

1:02:21hossein1387 The voltage threshold is dictated by the CMOS process

🗪

1:02:21hossein1387 The voltage threshold is dictated by the CMOS process

🗪

1:02:21hossein1387 The voltage threshold is dictated by the CMOS process