element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum STM32L4 With DMX512
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 31 replies
  • Answers 11 answers
  • Subscribers 464 subscribers
  • Views 9297 views
  • Users 0 members are here
  • dmx512
  • stm32l4
Related

STM32L4 With DMX512

p.congre
p.congre over 3 years ago

Hello there,

 

I am trying to control 2 LED strips (one with a WS2811 LED driver and one with a USC512C4 LED driver) with my STM32L4 with integrated RS485.

Do you have any idea how to do this?

 

Best regard.

P.Congré

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 3 years ago in reply to p.congre +1 suggested
    In xxx_project.h, #ifndef __C459_PROJECT_H #define __C459_PROJECT_H // INCLUDES #include "stm32f0xx.h" #include <stdio.h> #include <stdbool.h> #include <stdint.h> // DEFINES #define VERSION 100 #define…
  • michaelkellett
    0 michaelkellett over 3 years ago in reply to p.congre

    In xxx_project.h,

     

    #ifndef __C459_PROJECT_H
    #define __C459_PROJECT_H
    
    // INCLUDES 
    #include "stm32f0xx.h"
    #include <stdio.h>
    #include <stdbool.h>
    #include <stdint.h>
    
    
    // DEFINES
    
    #define VERSION 100
    #define VERSION_STR "1.0.0"
    
    #define FALSE     (false)
    #define TRUE     (true)
    
    #define MAX_GCI_SKIPS         10
    
    #define FLASH_SIZE            0x200000
    #define SECTOR_SIZE            0x10000
    #define FLASH_SECTORS        32
    #define CONTEXT_SECTOR        0
    #define CONTEXT_BLOCK_SIZE    1024
    #define SERIALISE_VERSION    0            // must never be 0xff because also used to loactae written areas of flash
    
    
    //#define SET_DMX_TX_EN    {GPIOA->BSRR = DMX_TX_EN;}
    //#define CLR_DMX_TX_EN    {GPIOA->BSRR = (DMX_TX_EN) << 16;}
    //#define SET_FLASH_NSS    {GPIOB->BSRR = FLASH_NSS;}
    //#define CLR_FLASH_NSS    {GPIOB->BSRR = (FLASH_NSS) << 16;}
    //#define SET_FLASH_WP    {GPIOB->BSRR = FLASH_WP;}
    //#define CLR_FLASH_WP    {GPIOB->BSRR = (FLASH_WP) << 16;}
    //#define SET_PROX_STX    {GPIOC->BSRR = PROX_STX;}
    //#define CLR_PROX_STX    {GPIOC->BSRR = (PROX_STX) << 16;}
    //#define SET_PROX_MD        {GPIOC->BSRR = PROX_MD;}
    //#define CLR_PROX_MD        {GPIOC->BSRR = (PROX_MD) << 16;}
    //#define SET_PROX_SC        {GPIOC->BSRR = PROX_SC;}
    //#define CLR_PROX_SC        {GPIOC->BSRR = (PROX_SC) << 16;}
    
    
    
    // PORTA
    #define IR_RX            1 << 8
    #define DMX_TX            1 << 9
    #define DMX_RX            1 << 10
    #define DMX_TX_EN        1 << 11
    #define LED_9            1 << 12
    #define UART2_RX        1 << 15
    
    
    // PORTB
    #define FLASH_SCK         1 << 3
    #define FLASH_MISO         1 << 4
    #define FLASH_MOSI         1 << 5
    #define FLASH_NSS        1 << 6
    #define FLASH_WP        1 << 7
    #define LED_8            1 << 15
    
    
    // PORTC
    #define LED_2            1 << 0
    #define LED_3            1 << 1
    #define LED_4            1 << 2
    #define LED_5            1 << 3
    #define PROX_PRX        1 << 6
    #define PROX_STX        1 << 7
    #define PROX_MD            1 << 8
    #define PROX_SC            1 << 9
    #define LED_12            1 << 10
    #define LED_13            1 << 11
    
    
    // PORTF
    #define LED_6            1 << 4
    #define LED_7            1 << 5
    #define LED_10            1 << 6
    #define LED_11            1 << 7
    
    
    
    #define    ASC_LF            0x0a
    #define ASC_CR            0x0d
    
    #endif

     

    Hope this helps.

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube