Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How to make GPIO Signals to Control Hardware

803 views

Published on

M5Stack User Meeting Vol.7 at Shiodome, Tokyo 2020/Feb/4

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

How to make GPIO Signals to Control Hardware

  1. 1. 5 7 2020/2/4
  2. 2. 16 5 5940 M5Stack
  3. 3. TLC5940 74HC595 TBD62783 8 Anodes for each Module 16 Cathodes of each Segment GSCLK BLANK XLAT SCLK S-IN S-OUT
  4. 4. LED 0 LED 1 LED 2 LED 3 LED 4 LED 5 LED 6 LED 7 16ms ( > 60Hz) 2ms ~GSCLK BLANK = LED off XLAT = Latch SCLKS-IN 4096 pulse / 2ms → 2MHz PWM data: 12bit x 16segment
  5. 5. BLANK XLAT SCLK GSCLK BLANK, XLAT: 2.048ms
  6. 6. BLANK XLAT SCLK GSCLK XLAT: 112ns BLANK: 328ns GSCLK: 2MHz 124ns/376ns
  7. 7. BLANK XLAT SCLK GSCLK SCLK: 8MHz 60ns/65ns
  8. 8. 32
  9. 9. LEDC Channel 0 GSCLK 2MHz0-3164MHz 25% Divider Counter APB_CLK 80MHz Duty Channel GPIO2 Frequency (2MHz) Resolution (5bit) Duty (8/32) LEDC Channel(0) --> GPIO(2) Resolution Frequency × 2 <= APB_CLK 2MHz × 32 = 64MHz < 80MHz
  10. 10. Timer 0 2.05ms1MHz Divider Counter APB_CLK 80MHz App-CPU Divider (80) Alarm (2050 count) Interrupt Interrupt Handler - digitalWrite BLANK XLATGPIO15 GPIO12
  11. 11. Timer 0 2.05ms App-CPU Interrupt Interrupt Handler - digitalWrite - SemaphoreGive Non-privileged Task - SemaphoreTake - Make data - Send data Resume
  12. 12. TLC5940 GPIO5 GPIO23(MOSI) GPIO18(SCK) GPIO4 GPIO14 S-IN SCLK SS(Slave Select) LCD
  13. 13. ハードウェア・タイマがダントツで優秀
  14. 14. 5940
  15. 15. 120 16 4096 2005. TLC5940 Constant Current Driver PWM Control Register 12bit Serial Data Interface 16 channels LEDs MCU PWP NT GSCLK (Gray –Scale Clock)
  16. 16. 25% 50% 75% Pulse Cycle Duty OffOn Time Current

×