Download Adjustable buzzer frequency using STM8S

Transcript
Contents
AN3277
Contents
1
Application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1
Hardware required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2
Application schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3
Application principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2
Option byte configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3
Software description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4
2/13
3.1
Touch sensing library configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2
Standard STM8S firmware library configuration . . . . . . . . . . . . . . . . . . . . 9
3.3
Application software flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3.1
Main loop flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3.2
ExtraCode_StateMachine flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Doc ID 17979 Rev 1