−7. Serial Port 0 Mode 3 Transmit Timing
Serial Mode 3 Asynchronous Full-Duplex
Setting the Serial Port Mode
−4. Mode 0 Commonly Used Baud Rates
Setting the Serial Port Baud Rate
TH1 = 256 − Crystal / 192 / Baud
Baud Rate
Desired Baud
−5. Baud Rate Settings for Timer
Writing to the Serial Port
−6. Baud Rate Settings for Timer
Baud Rate 33MHz clk 25MHz clk 11.0592MHz clk Kb/s
Reading the Serial Port
Describes the interrupts of the MSC1210 ADC
JNB TF0,SKIPTOGGLE
Events That Can Trigger Interrupts
Interrupt/Event Addr Priority Flag Enable Priority Control
−1.Interrupt Sources
10-4
−2.IE A8 H SFR
Enabling Interrupts
−3.EICON D8 H SFR
−4.EIE E8 H SFR
Polling Sequence
−5.IP B8 H SFR
Interrupt Priorities
−6.EIP F8 H SFR
Exiting Interrupts
Interrupt Triggering
Serial Interrupts
Types of Interrupts
External Interrupts
Bit Name Explanation of Function
−7.EXIF 91 H SFR
Watchdog Interrupt
Timer Interrupts
Auxiliary Interrupts
−9.AIE A6 H SFR
−8.Clearing Auxiliary Interrupts
Aux Interrupt Type Method to Clear Interrupt
−11. PAI A5 H SFR
−10. Aistat A7 H SFR
Bit Name Explanation of Function Clear Interrupt
PAIx Bits Explanation of Interrupt/Event
−12. PPI Bits of PAI SFR
−13. EWU C6 H SFR
Waking Up from Idle Mode
Push PSW
Register Protection
Push R0 Error − Invalid instruction
Common Problems with Interrupts
Tone Generator 11-3
Description 11-2
PWM Generator 11-5
−1. Block Diagram
ToneFrequency +1
Tone Generator
Tone Generator Waveforms
−3. Timing Diagram of Tone Generator in Staircase Mode
−1. PWM Polarity Conditions
PWM Generator
Duty Cycle = PWM Period +1 − PWM Duty/PWM Period +1
Condition Duty Cycle
−5. Timing Diagram of a PWM Waveform
This can be expressed in code as
Stmt ‘C’ Source Code Assembly Source Code
−2. Configuring the PWM for Tone Generation
Example of PWM Tone Generation
−3. Statement Explanations
Example of PWM Tone Generation Idling
−5. Statement Explanations
−4. Configuring the PWM for Tone Generation with PWM Idling
Explanation
−6. PWM Timing
Example of Updating PWM
11-12
12-10
PGA DAC
−1. MSC1210 Architecture
Input Multiplexer
−2. Input Multiplexer Configuration
Negative Input
Positive Input
Temperature Sensor
12-6
MSB
Burnout Current Sources
Analog Input
Input Buffer
@ 10
ACLKFrequency
Programmable Gain Amplifier PGA
−1.PGA Settings
Modulator
Offset DAC
Calibration Mode
−2.Calibration Mode Control Bits
Calibration
−4. Filter Step Responses
Digital Filter
−5. Filter Frequency Responses
−3.Filter Settling
Multiplexing Channels
−4.Output Data Rate and Channel Rate
Samples to Discard Filter
Subroutines LCALL, ACALL, RET
MOV DestinationRegister,SourceValue
Register Assignment MOV
MOV R2,R1 Invalid
MOV @R0,A
Incrementing and Decrementing Registers INC, DEC
Program Loops Djnz
Setting, Clearing, and Moving Bits SETB, CLR, CPL, MOV
16-14
Bit-Based Decisions and Branching JB, JBC, JNB, JC, JNC
Lcall Debouncekey
Value Comparison Cjne
Checkless JC Aisless
Less Than and Greater Than Comparison Cjne
Performing Additions ADD, Addc
Zero and Non-Zero Decisions JZ/JNZ
Performing Additions ADD, Addc
Performing Subtractions Subb
Performing Multiplication MUL
Performing Division DIV
−1. Rotate Operations
Shifting Bits RR, RRC, RL, RLC
−2.Results of ANL
Bit-Wise Logical Instructions ANL, ORL, XRL
−3.Results of ORL
−4.Results of XRL
Assembly Language 16-25
Swapping Accumulator Nibbles Swap
Exchanging Register Values XCH
Adjusting Accumulator for BCD Addition DA
Using the Stack PUSH/POP
Assembly Language 16-29
Setting the Data Pointer Dptr MOV Dptr
Reading and Writing External RAM/Data Memory Movx
Lcall SUB
Reading Code Memory/Tables Movc
SUB INC a
Using Jump Tables JMP @A+DPTR
Describes the Keil simulator and its functions
17-2
Keil Simulator 17-3
−1. Timer/Counter 0 − Mode
Timers
−2. Timer/Counter
Timer 0 & 1 Example
−4. Timer/Counter 1 Mode
Keil Simulator 17-7
17-8
Keil Simulator 17-9
17-10
−1.Timer/Counter 2 Control Bits
Timer
Register Bit Toggle Box Name
−7. Status of Watchdog Peripheral
Watchdog Reset Facility Example
17-14
Keil Simulator 17-15
Clock Control
System Timer
Analog-to-Digital Converter
−8. Analog−to−Digital Converter Peripheral
−9. Error Message
−10. Accumulator/Shifter Peripheral
Summation/Shifter
17.8.1 ADC/Summation/Shifter Example
17-22
Keil Simulator 17-23
17-24
Keil Simulator 17-25
17-26
Keil Simulator 17-27
−11. summation/Shifter Peripheral
Keil Simulator 17-29
−13. List Box for the Interrupt Peripheral
Ports
−14. Parallel Port 0 Contents Display Window
−16. SPI Peripheral Window
Serial Peripheral Interface SPI
Keil Simulator 17-33
SPI Sample Code
Keil Simulator 17-35
Serial Peripheral Interface SPI
Keil Simulator 17-37
17.12 ∝Vision 2 Debug Program Example
−17. Keil Debugger
Serial Port I/O
−18. Serial Channel 0 Communication Peripheral
17-42
BaudRate + fOSC
Transmit Block Baud Rate Computation
BaudRate + fOSC @
Receive Block Baud Rate Computation
−19. Clock Control Peripheral
Additional Resource
Topic
Appendix a
Additional Features in the MSC1210 Compared to
Appendix B
Figure B−1. MSC1210 Timing Chain and Clock Control
MSC1210 Timing Chain and Clock Control Diagram
Appendix C
Address Routine Declarations Description
Table C−1. Boot ROM Routines
Boot ROM Routines
Page
Appendix D
JB bitAddr,relAddr Ajmp pg1Addr
8052 Instruction-Set Quick-Reference Guide
Description Instruction Set
Appendix E
Description
Acall
8052 Instruction Set
Absolute Call within 2k Block
Acall codeAddress
Add Value, Add Value with Carry
ADD, Addc
ADD A,operand
Absolute Jump within 2k Block
Ajmp
Ajmp codeAddress
Bitwise
ANL
ANL operand1,operand2
CLR
Compare and Jump if Not Equal
Clear Register
Cjne operand1,operand2,reladdr
CPL
Decimal Adjust Accumulator
Complement Register
CPL operand
Carry flag is not set when the value rolls over from 0 to
Decrementing the value causes it to reset to 255 0xFFH
DEC register
See also INC, Subb
Djnz register,relAddr
Decrement and Jump if Not Zero
Increment Reister
INC
INC register
JBC
Jump if Bit Set
Jump if Bit Set and Clear Bit
Jump if Carry Set
JNB
JMP
JNC
Lcall
JNZ
Ljmp
Not affected See also MOVC, MOVX, XCH, XCHD, PUSH, POP
MOV operand1, operand2
MOV bit1,bit2
Move into/out of Internal RAM
MOV
MOV operand1,operand2
Movc
MOV Dptr
Movx
Multiply Accumulator by B
MUL
NOP
No Operation
Bitwise or
ORL
Syntax ORL operand1,operand2
Pop Value from Stack
POP
Push
Push Value onto Stack
Return from Subroutine
RET
Reti
Return from Interrupt
RRC
RLC
Setb
Short Jump
Sjmp
Subb
Subtract from Accumulator with Borrow
XCH
Swap
Xchd
Bitwise Exclusive or
XRL
Instructions OpCode Bytes Cycles Flags ??? 0xA5
Undefined
Appendix F
Extended Interrupt Enable EIE
Enable Interrupt Control Eicon
EX2-External 2 Interrupt Enable
Bit Addressable SFRs alphabetical
Extended Interrupt Priority EIP
Interrupt Enable IE
Port 0 P0
Interrupt Priority IP
Port 2 P2
Port 1 P1
Port 3 P3
Register Bank Register Bank Addresses
Program Status Word PSW
Serial Control Scon
Serial Mode Description Baud
Tcon
Timer Control Tcon
T2CON
Timer 2 Control T2CON
Appendix G
SFR Name Description SFR Address Hex
SFR/Address Cross-Reference
SFRs/Address Cross-Reference Guide alphabetical
Spircon