Verilog implements breathing running water lamp

1. Design purpose Realize a breathing running water lamp that changes from dark to bright within 1 second, and then from bright to dark again in the next 1 second. 2. Design ideas Design a square wave with a gradually increasing duty cycle to change from dark to bright; then the duty cycle gradually becomes […]

Linux non-root user installation lamps

#Install lamps-7Aug19 (version: 2019-08-07) For convenience, I created a folder /home/hsiung/software/lammps. All files are downloaded and installed in this folder. cat /etc/redhat-release Use the cat command to check the version: CentOS Linux release 7.9.2009 (Core) 1. Download and install openmpi (mpich can also be used, see the installation process of lamps-10Aug15 below for details) openmpi […]

LED running water lamp experiment based on STM32 standard library function

1. A brief introduction to STM32 standard library functions and the difference from register programming The STM32 Standard Library is a set of software libraries provided by STMicroelectronics to simplify the process of developing applications on STM32 microcontrollers. It contains many commonly used functions and drivers that can be used to configure and operate various […]

[STM32F103 running water lamp lighting version 1]

? Foreword STM32CubeMX is a graphical configuration tool launched by STMicroelectronics. Relevant configurations can be achieved through fool-proof operations. It can ultimately generate C language code and supports multiple tool chains, such as MDK, IAR For ARM, TrueStudio, etc. It is particularly worth mentioning that TrueStudio has been acquired by ST and provides a completely […]

STM32 based on HAL library running water lamp experiment

STM32 based on HAL library running water lamp experiment 1. Set up the STM32 development environment 2. Periodic flashing of three LED traffic lights on the GPIO port of the HEL library 3. External interrupt mode control light turns on and off 4. Summary 1. Build a development environment for STM32 (1) Install jdk Since […]

Use Cube to implement the running water lamp, and use interrupts to control the running water lamp to turn on and off.

Article directory 1. Cube lights up the water lamp 1.1. Install Cube 1.2. New construction 1.3. Code writing 1.4. Burning program 1.5. Operation effect 2. Interrupt control of running lights 2.1. New construction 2.2. Rewrite the interrupt callback function 2.3. Operation effect 3. Observe the waveform diagram with an oscilloscope 4. Interrupt to control a […]

STM32 based on HAL library running water lamp experiment

STM32basedonHALlibraryrunningwaterlampexperiment 1.SetuptheSTM32developmentenvironment 1.InstallSTM32CubeMX 1.Downloadaddress:STM32CubeMX-STM32Cubeinitializationcodegenerator-STMicroelectronics 2.Runtheinstallationprogramasanadministratorandclicknext: Edit 3.Click”Iacceptthetermsofthislicenseagreement”,andthenselectNext: Edit 4.Justcheckthefirstone Edit 5.Selecttheinstallationlocation.ThedefaultlocationistoinstallintheCdrive(note:donothaveChinesecharactersintheinstallationlocation): Edit 6.Starttheinstallationdirectly: Edit 2.InstallHALlibrary 1.OpentheinstalledSTMCubeMX Edit 2.ClickHELP->Manageembeddedsoftwarepackages: Edit 3.ChecktheHALlibraryyouwanttoinstallandclick”InstallNow”untiltheinstallationissuccessful. Edit 2.Newproject 1.ReturntothemaininterfaceofSTMCubeMXandcreateanewproject: Edit 2.Selectyourownchipinthepartname,clickonthespecificchipinformationintheinformationcolumntoselectit,andclickstartproject: Edit 3.Clicksystemcore,enterSYS,andselectserialwireunderdebug: Edit 4.Configuretheclockandentertherccabove.Therearetwoclocks,oneishseandlse.WeneedtousetheGPIOinterface,andtheseinterfacesareallinAPB2: Edit Next,observetheclockarchitecture.TheclockoftheAPB2busiscontrolledbyhse.Atthesametime,youmustselecttherightsideofPLLCLKinthisinterface: Edit 5.SethsetoCrystal/CeramicResonator: Edit 6.Thenextstepistoclickonthecorrespondingpintosettheoutputregister,whichistheoutputitem.Therearethreeselectedintotal,whicharePA4,PB9,andPC15: Edit Edit 7.Clickprojectmanager,configureyourpathandprojectname,andthenchangetheIDEitemtoMDK-ARM: Edit 8.Enterthecodegenerateinterface,selecttogeneratetheinitialization.c/.hfile,thenclickgeneratecode,selectopenproject,andthengotoKEIL5:?Edit keilsimulationdebugging 1Openthe.uvprojxfile(orselectopenprojectinthepreviousstep) Edit 2.Openthemain.cfileandfindthemainfunctionpart: Edit 3.Putthefollowingcodeintothemainfunction(replacethecontentinside) SystemClock_Config();//Systemclockinitialization MX_GPIO_Init();//gpioinitialization while(1) { HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_RESET);//PA4lightsup HAL_GPIO_WritePin(GPIOB,GPIO_PIN_9,GPIO_PIN_SET);//PB9lightsout HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,GPIO_PIN_SET);//PC15lightsout HAL_Delay(1000);//Delay1s HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_SET);//PA4lightsout […]

Running water lamp based on HAL library

Article directory 1. Use the GPIO port to complete the periodic flashing of three LED traffic lights. (1) Install STM32CubeMX 1.Download 2. Installation process (2) Install HAL library (3) New projects (4) keil simulation debugging (1)Write code (2) Compilation settings (3) Burning (4) Observe the waveform of the GPIO port 2. Use interrupt mode programming. […]

STM32 based on HAL library running water lamp experiment

Experimental background: LED running water lamp is an electronic device composed of multiple LED lamp beads arranged and controlled according to certain rules. In various display situations, LED running lights are often used to display dynamic effects, such as billboards, stage lighting, etc. In addition, LED running lights are also widely used in education, scientific […]