IBM EM78M611E manual Control Register, Sampling Rate and Debounce Length

Page 30

EM78M611E

Universal Serial Bus Series Microcontroller

Pattern Detect Application (PDA) can calculate the length of one pattern and interrupt the MCU while the serial signal is transiting from high to low (or vise-versa). Then the MCU reads the length value from a specified register.

8.9.2 Control Register

The PDA includes an enable control bit, one control register and 4-length counter registers in 0x10 ~0x13.

IOCA [2] PDA Enable Control Bit

When this bit is set, the PDA function starts and the P92 and P93 become input pin automatically to sample the serial signal.

0 : disable PDA function

1 : enable PDA function

RB (PDA Control Register) Default Value: (0B_0000_0000)

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

 

 

 

 

 

 

 

 

SE2.F

SE1.F

SR.2

SR.1

SR.0

DB2

DB1

DB0

This register is used to define two parameters of PDA function; signal sampling rate and debounce length. When a pattern ends, the value in the counter is loaded into its respective register and the RB[6] or RB[7] is set to indicate which type of pattern (high or low) is at its end or which type of pattern counter is on overflow.

0: low pattern

1: high pattern

R10 (P.92 Low Pattern Counter)

This register records the length of P.92 in low status.

R11 (P.92 High Pattern Counter)

This register records the length of P.92 in high status.

R12 (P.93 Low Pattern Counter)

This register record the length of P.93 in low status.

R13 (P.93 High Pattern Counter)

This register records the length of P.93 in high status.

R10~R13 function as general registers if this function is not enabled. Once the enabled bit is set, these four registers will be loaded with the value of the pattern counter.

8.9.3 Sampling Rate and Debounce Length

Although the two-pattern detect pins are separate, and each pin has its own pattern counter, both pins use the same Sampling Rate and Debounce Length parameters.

The PDA samples the serial signal every fixed interval. The pattern counter will be incremented by one at sampling time if the signal remains unchanged. If the signal is at

26

Product Specification (V1.1) 11.22.2006

(This specification is subject to change without further notice)

Image 30
Contents EM78M611E Trademark Acknowledgments 2.1 Product Specification V1.1 AppendixFeatures General DescriptionUniversal Serial Bus Series Microcontroller Product Specification V1.1 Type Definition ApplicationOriginal With Both Pin Assignment VNNEM78M611EXBP/BM/DM 20-Pin DIP/SOP/SSOP Symbol Function Pin DescriptionBlock Diagram ALU ACC Data & Control BUSFunction Description Program MemoryData Memory Special Purpose Register2.2 R1 Timer / Clock Counter Default Value 0B00000000 2.3 R2 Program Counter & Stack Default Value 0B00000000Operation Registers 2.4 R3 Status Register Default Value0B00011XXX R3 0 Carry/Borrow FlagBit Condition Program Memory Page Address2.5 R4 RAM Select Register Default Value 0B00XXXXXX EP0Busy Stall Default Value 0B00000000 RF Interrupt Status RegisterControl Registers AccumulatorControl Register Default Value 0B00111111 TCC Rate WDT RateOperation Mode PS/2DualFrq.1 DualFrq.0 Frequency Bit P96 P95 P94 P93 P92 P91 P90PH95 PH93 PU8 PU6 PU5 Extra Control Register USB Application FIFOsUSB Application USB Device ControllerReset Saving Power ModeDual Clock Mode InterruptPattern Detect Application PDA Function DescriptionControl Register Sampling Rate and Debounce LengthDB.2 DB.1 DB.0 Debounce Time SR.2 SR.1 SR.0 Sampling RateDuty Cycle Erepwm Control Register Default Value 0B00000001Pulse Width Modulation PWM R10 PWM1 Duty Cycle RegisterERA AD Channel Select Register Default Value 0B00011111 Analog-To-Digital Converter ADCClock Hz Period/255 s ERB AD LSB Data Register Default Value 0B00000000 Channel PortERC AD MSB Data Register Default Value 0B00000000 ERD AD Control Register Default Value 0B00000000Command Value Action Execution Time Symbol Parameter Condition Min Type Max Unit DC Electrical CharacteristicSymbol Min Max Unit Absolute Maximum RatingsUSB Interface Application Circuit Address Name Bit Bit1 Default Value Special Register MapOperation Registers Address Name Bit Default Value Extra Register IOCA3 =Instruction Set Binary Instruction Hex Mnemonic Operation Status AffectedThis instruction is not recommended for RE, RF operation Code Option Register Address11 16ms Bits 4~12 User ID Address EM78M611E