ST STM8L1528-EVAL Скачать руководство пользователя страница 7

UM1000

Demonstration applications

Doc ID 17964 Rev 1

7/23

3.4 Calendar 

demo

The STM8L15x features a real-time clock (RTC) including an independent BCD 
timer/counter, time-of-day clock /calendar, a software programmable alarm, and a periodic 
programmable wakeup flag with interrupt capabilities that can be used to exit the device 
from Low power modes.

The calendar submenus allow to configure the system time, date and alarm. 

3.4.1 Setting 

the 

time

The 

TIME

 submenu offers two options allowing to adjust and display the current time. Once 

set, the time is used to configure the RTC time.

Time adjust

Use the 

Time adjust

 option either to modify the current time, or to change the time to the 

current time after the STM8L1528-EVAL evaluation board is powered up. 

1.

To set the time, select the 

Time adjust

 option. The 

Time adjust

 

submenu is then 

displayed to show the current time value. (see 

Figure 6

). 

2. 

Enter the first digit of the hour field:

Pressing the joystick 

UP

 increments the current digit value. 

Pressing the joystick 

DOWN

 decrements the current digit value. 

The digit value is limited to a range depending on the time field (hours, minutes or 
seconds).

3. 

After selecting the digit value press 

SEL

. The cursor then jumps automatically to the 

next digit. 

4. 

When all the time digits are set, the 

Time adjust 

submenu is displayed again to show 

the current time. (see 

Figure 6

). 

Figure 6.

Time adjust message

Time show

Select 

Time show

 to display the current time. The time start counter from (00:00:00) after 

the first run for the demo the time is cleared if the STM8L1528-EVAL evaluation board is 
powered down. The 

Time adjust

 option is used to configure the time. 

When this option is selected, the following message is displayed on the LCD screen:

Figure 7.

Time show message

To exit from the 

Time show

 submenu press the joystick 

UP

.

Time adjust

HH:MM:SS

Time show

HH:MM:SS

www.BDTIC.com/ST

Содержание STM8L1528-EVAL

Страница 1: ...stored in the Flash program memory of the microcontroller The firmware is based on the STM8L15x firmware library and provides an example of how to use this library It is divided into various smaller...

Страница 2: ...e time 7 3 4 2 Setting the date 8 3 4 3 Setting the alarm 9 3 5 Thermometer demo 10 3 6 IDD measurement demo 11 3 7 Low power demo 12 3 7 1 Run mode 12 3 7 2 Wait for interrupt mode 12 3 7 3 Wait for...

Страница 3: ...nt the keywords in bold indicate user actions on the joystick 5 way switch and the RV3 potentiometer The present document follows the conventions shown in Table 1 Up Up Up Up Up Up Left Right Left Rig...

Страница 4: ...menu items on the left SEL Enters submenu UP Exits from a submenu 2 4 STM8L1528 EVAL board jumper configuration To be able to run the STM8L1528 EVAL demo correctly configure the following STM8L1528 EV...

Страница 5: ...part of the demonstration firmware STM8L1528 Welcome message Main menu HELP HELP CALENDAR Date THERMOMETER About Adjust Show Time Adjust Show Alarm Adjust Show Low Power Audio Audio Player Voice Recor...

Страница 6: ...sage The main menu is then activated and the message shown in Figure 4 is displayed Figure 4 Main menu 3 3 Help mode Pressing SEL from the main menu enters the Help mode The following messages are dis...

Страница 7: ...displayed to show the current time value see Figure 6 2 Enter the first digit of the hour field Pressing the joystick UP increments the current digit value Pressing the joystick DOWN decrements the cu...

Страница 8: ...digit value Pressing the joystick DOWN decrements the current digit value The digit value is limited to a range depending on the date field month day or year 3 After selecting the digit value press SE...

Страница 9: ...is displayed Figure 10 Alarm Adjust message Alarm show Select the Alarm show option to display the current alarm After power up the default alarm time 00 00 00 is displayed till the Alarm adjust optio...

Страница 10: ...When the joystick RIGHT is pressed the temperature in degrees Fahrenheit is displayed on LCD screen as shown in Figure 14 for two seconds then the temperature in degrees Celsius is displayed again Fi...

Страница 11: ...own in Figure 16 is displayed Figure 16 Temperature sensor error message 3 6 IDD measurement demo The STM8L15x microcontroller features an ADC peripheral It measures the IDD current in Run mode by usi...

Страница 12: ...mode submenu contains four submenu items 8 MHz the application runs at 8 MHz 4 MHz the application runs at 4 MHz 2 MHz the application runs at 2 MHz 16 MHz the application runs at 16 MHz Press SEL to...

Страница 13: ...hen the alarm time is reached the system exits from WFI mode the system clock frequency is set to 16 MHz and the application execution resumes The message shown in Figure 23 is then displayed on the L...

Страница 14: ...e system exits from WFE mode and the application execution resumes The message shown in Figure 27 is then displayed on the LCD screen Figure 27 Exit from WFE with comparator interrupt message Note If...

Страница 15: ...upt wakes up the device then all LEDs are ON and a sound is played for 10s The RTC alarm wakes up the MCU from Active halt mode The LEDs blink until SEL is pressed from the Active halt menu see Figure...

Страница 16: ...Halt mode the system clock is set to 16 MHz and the application execution resumes The following message is displayed on the LCD Figure 33 Exit from Halt with EXTI message A Comparator 1 interrupt can...

Страница 17: ...the following message is displayed on the LCD screen Figure 36 Start voice recorder message This message remains displayed until SEL is pressed The STM8L15x then starts erasing the voice data previous...

Страница 18: ...bmenu by pressing the SEL on the joystick The following message remains displayed unless SEL is pressed Figure 41 Audio Player menu message When SEL is pressed the STM8L15x starts playing the voice an...

Страница 19: ...time of sampling Sample rate may be 8000 11025 22050 or 44100 Hz Bits Per Sample 8 bit Audio sample data values are in the range 0 255 Number of Channels 1 Mono The maximum wave files number that can...

Страница 20: ...and the menu shown in Figure 47 is displayed When the audio stream is stopped the stream position is reset and the menu shown in Figure 44 is displayed Note If the SD card is removed the demo will sto...

Страница 21: ...folder to your own SD memory 4 2 Programming the demonstration To upgrade the demonstration firmware running on your board perform the following steps 1 Download the latest version of STM8L1528 EVAL d...

Страница 22: ...mo ADC1 IDD measurement Voice recorder DAC Audio Player COMP 1 Low power External interrupts EXTI Low Power GPIO All demo Clock controller All demo I2C1 Thermometer Audio Player TIM1 Voice recorder TI...

Страница 23: ...OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRES...

Отзывы: