192 views|2 replies

17

Posts

0

Resources
The OP
 

【Follow me Season 2 Episode 3】Simple button control LED experiment [Copy link]

 This post was last edited by breeze_i on 2024-11-4 21:21

When learning C language, the first program must be to print "Hello World!", and the first program for microcontroller is to light a lamp. Let's try to light a lamp today.

Open e2studio and create a blank project. In order to experience the pin configuration function, do not select Board. Select the chip model (R7FA6M5BH3CFC) on our development board in Device, as shown below. Use the default values for other options and click Next.

After successful creation, the FSP Configuration is as shown in the figure below.

Open the development board schematic, you can see there are three user LEDs and two buttons. The two buttons are not connected to capacitors.

Here I use the s1 button to control the blue LED, and achieve button scan debounce through blocking button scanning; each time the button is pressed and released, the blue LED state flips.

The key scanning speed cannot be too fast, otherwise instability will occur (when the LED is off, the LED will flash quickly instead of being constantly on when the key is pressed). After many attempts, it was found that the function can be stably implemented when the scanning cycle is greater than about 350ms.

MyRA6M5Project.zip (1.42 MB, downloads: 0)

This post is from DigiKey Technology Zone

Latest reply

Is this how it starts?   Details Published on 2024-11-4 23:15
 
 

85

Posts

0

Resources
2
 

Is this how it starts?

This post is from DigiKey Technology Zone

Comments

I don’t know when the live broadcast will start, so I’ll just figure it out on my own.  Details Published on 2024-11-5 09:55
 
 
 

17

Posts

0

Resources
3
 
Juggernaut posted on 2024-11-4 23:15 So it starts like this?

I don’t know when the live broadcast will start, so I’ll just figure it out on my own.

This post is from DigiKey Technology Zone
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list