Rev. 1.20 106 January 23, 2015 Rev. 1.20 107 January 23, 2015
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
Touch Key Interrupt
Thetouchkeyonlyhassingleinterrupt,whenthetimeslotcounterinallthetouchkeymodulesor
inthetouchkeymodule0overows,anactualtouchkeyinterruptwilltakeplace.Thetouchkeys
mentionedherearethekeyswhichareenabled.The16-bitC/Fcounter,16-bitcounter,5-bittime
slotcounterand8-bittimeslotcounterinallmoduleswillbeautomaticallycleared.
TheTKCFOVflag,whichisthe16-bitC/Fcounteroverflowflagwillgohighwhenanyofthe
TouchKeyModule16-bitC/Fcounteroverows.Asthisagwillnotbeautomaticallycleared,it
hastobeclearedbytheapplicationprogram.
Module0onlycontainsone16-bitcounter.TheTK16OVag,whichisthe16-bitcounteroverow
ag,willgohighwhenthe16-bitcounteroverows.Asthisagwillnotbeautomaticallycleared,
ithastobeclearedbytheapplicationprogram.Moredetailsregardingthetouchkeyinterruptis
locatedintheinterruptsectionofthedatasheet.
Programming Considerations
Aftertherelevantregistersaresetup,thetouchkeydetectionprocessisinitiatedthechangingthe
TKSTbitfromlowtohigh.Thiswillenableandsynchroniseallrelevantoscillators.TheTKRCOV
ag,whichisthetimeslotcounteragwillgohighandremainhighuntilthecounteroverows.
Whenthishappensaninterruptsignalwillbegenerated.
Whentheexternaltouchkeysizeandlayoutaredefined,theirrelatedcapacitanceswillthen
determinethesensoroscillatorfrequency.