EasyManua.ls Logo

Holtek BS82B12A-3 - P�Og�Amming Conside�Ations

Holtek BS82B12A-3
168 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.20 68 January 23, 2015 Rev. 1.20 69 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
Bit1~0 PCPS1~PCPS0:PC3~PC0sourcecurrentselect
00:source=Level0(min.)
01:source=Level1
10:source=Level2
11:source=Level3(max.)
ThesebitsareavailablewhenthecorrespondingpinisconguredasaCMOSoutput.
SLEDC1 Register – BS82C16A-3/BS82D20A-3
Bit 7 6 5 4 3 2 1 0
Name PDPS1 PDPS0
PCPS3 PCPS2 PCPS1 PCPS0
R/W R/W R/W R/W R/W R/W R/W
POR 0 1 0 1 0 1
Bit7~6 Unimplemented,readas"0"
Bit5~4 PDPS1~PDPS0:PD3~PD0sourcecurrentselect
00:source=Level0(min.)
01:source=Level1
10:source=Level2
11:source=Level3(max.)
ThesebitsareavailablewhenthecorrespondingpinisconguredasaCMOSoutput.
Bit3~2 PCPS3~PCPS2:PC7~PC4sourcecurrentselect
00:source=Level0(min.)
01:source=Level1
10:source=Level2
11:source=Level3(max.)
ThesebitsareavailablewhenthecorrespondingpinisconguredasaCMOSoutput.
Bit1~0 PCPS1~PCPS0:PC3~PC0sourcecurrentselect
00:source=Level0(min.)
01:source=Level1
10:source=Level2
11:source=Level3(max.)
ThesebitsareavailablewhenthecorrespondingpinisconguredasaCMOSoutput.
Programming Considerations
Withintheuserprogram,oneoftherstthingstoconsiderisportinitialisation.Afterareset,allof
theI/Odataandportcontrolregisterswillbesethigh.ThismeansthatallI/Opinswilldefaultto
aninputstate,thelevelofwhichdependsontheotherconnectedcircuitryandwhetherpull-high
selectionshavebeenchosen.Iftheportcontrolregisters,PAC~PDC,arethenprogrammedtosetup
somepinsasoutputs,theseoutputpinswillhaveaninitialhighoutputvalueunlesstheassociated
portdataregisters,PA~PD,arerstprogrammed.Selectingwhichpinsareinputsandwhichare
outputscanbeachievedbyte-widebyloadingthecorrectvaluesintotheappropriateportcontrol
registerorbyprogrammingindividualbitsintheportcontrolregisterusingthe"SET[m].i"and
"CLR[m].i"instructions.Notethatwhenusingthesebitcontrolinstructions,aread-modify-write
operationtakesplace.Themicrocontrollermustrstreadinthedataontheentireport,modifyitto
therequirednewbitvaluesandthenrewritethisdatabacktotheoutputports.
PortAhastheadditionalcapabilityofprovidingwake-upfunctions.Whenthedeviceisinthe
SLEEPorIDLEMode,variousmethodsareavailabletowakethedeviceup.Oneoftheseisahigh
tolowtransitionofanyofthePortApins.SingleormultiplepinsonPortAcanbesetuptohavethis
function.

Table of Contents

Related product manuals