Wireless Charging Sonic Electric Toothbrushes
WAS-1972EN V1.00
11 / 17
December 27, 2021
BP45F1330
ROM: 2K×14 - use 975×14, percentage: 47%
RAM: 64×8 - use 46×8, percentage: 71%
INT: key interrupt, external voltage input interrupt
Time Base: execute timing and state debounce functions every 200µs
LinearCharge: set constant current charging and charging over voltage protection
Timer: control the sonic motor to rotate backward or forward
ADC: read the battery voltage during discharging
Charging Base Main Flowchart Description
Start
Initialisation
OCP calibration
Demodulator subroutine
Has demodulated
successfully ?
Countdown is
completed ?
Begins a second countdown
for 2.5 seconds
PWM Off
Y
N
N
Y
Transmit a Ping signal
Transmit control subroutine
call PWM_ping_cycle
Automatically calibrate levels for
demodulation
call OCP_demo_trim
Demodulation data(ID code and data)
call Demodulation
Figure 8. BP45F0044
Charging Base
Main Flowchart
1.
Initialisation: RAM clear, GPIO initialisation, Timer setting, WDT setting and ID code setting.
2.
Transmit a ping signal: The ping signal is transmitted after a delay of 0.4 seconds.
3.
OCP calibration: automatic calibration at comparison points in the demodulation circuit.
4.
Demodulation subroutine: parsing ID code and data to determine whether the ID code is correct.
5.
Demodulated successfully: When the demodulation is successful, reset the 2.5-second countdown
timer. If this fails and the counter stops counting down, the PWM will be disabled.
6.
Countdown has completed: The correct ID is required to be received within 2.5 seconds after a
successful demodulation operation, otherwise the PWM will be disabled and the program will be
executed again after 2.5 seconds.