Successfully challenged 89C52 to drive WS2812

Publisher:学海星空Latest update time:2020-08-13 Source: 51heiKeywords:89C52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

https://v.youku.com/v_show/id_XNDM1MDczMDc0OA==.html

WS2812 is a chip with a relatively fast communication speed, while the 89 MCU is a relatively slow MCU. The
89 MCU uses a 32M crystal oscillator and 12T mode, and uses the IO port to directly drive the WS2812 lamp beads. The following video is the source code of
the effect of driving WS2812 : #ifndef WS2812B_Drive //If this label is not found #define WS2812B_Drive //Then put this label sbit WS2812_GPIO=P2^0; u8 data WS2812_Write_Buffer[25]; void WS2812_Write_Data(u8 *Point,u8 len) {         u8 data i,j,k;         u8 bdata Value;         for(i=0;i>=1;                         }                 }                 Point+=3;         } } void WS2812_Display_Ser() {         static xdata u8 count=0;         if(count<100)         {                 WS2812_GPIO=0;                 count++;         }         else         {                 EA=0;                 WS2812_Write_Data(WS2812_Write_Buffer+1,8);                 EA=1;                 count=0;         } } #endif


















































Keywords:89C52 Reference address:Successfully challenged 89C52 to drive WS2812

Previous article:STC12C5604AD voltage alarm detection module schematic diagram and MCU source program
Next article:Teach you how to control mg995 servo with 51 MCU

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号