Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 5 Other Subsystems.

Similar presentations


Presentation on theme: "ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 5 Other Subsystems."— Presentation transcript:

1 ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 5 Other Subsystems

2 ECE/CS-352: Embedded Microcontroller Systems ADC1 – the “other” ADC 8-bit ADC, 500 ksps Control registers similar to ADC0, but simpler

3 ECE/CS-352: Embedded Microcontroller Systems ADC1 AIN1.0 – AIN1.7 shared with P1.0 – P1.7 Must set P1MDIN for ANALOG inputs, and it is NOT necessary to turn on crossbar switch

4 ECE/CS-352: Embedded Microcontroller Systems Why not Crossbar? Bypass crossbar

5 ECE/CS-352: Embedded Microcontroller Systems ADC1 Equivalent Input Circuit

6 ECE/CS-352: Embedded Microcontroller Systems Timers 2 and 4 - Similar Capture: Can latch the timer value into a separate latch when certain events occur

7 ECE/CS-352: Embedded Microcontroller Systems Timer 2 – Capture Mode Capture register Capture occurs on edge of T2EX when EXEN2 enables it. Interrupt on overflow or on capture when enabled

8 ECE/CS-352: Embedded Microcontroller Systems Capture Mode to Measure Intervals TEX2 RCAP2  Timer2 value, EXF2 flag goes high, Timer2 interrupt generated if enabled RCAP2  Timer2 value, EXF2 flag goes high, Timer2 interrupt generated if enabled 8051 1 2 If time interval is less than FFFF counts, then ISR can just subtract captured value 2 from captured value 1 to find time interval. Otherwise ISR must also keep track of overflows. time interval

9 ECE/CS-352: Embedded Microcontroller Systems Programmable Counter Array The ultimate timer/counter! –SIX different possible clock sources –SIX modes of operation Capture modes (with 3 edge options) Software timer (Compare) mode (interrupt when timer register = compare register) High speed output : (output pin is toggled when timer register = compare register) Frequency output: (square wave produced at a specified frequency) 8-bit Pulse-Width-Modulation mode 16-bit Pulse-Width-Modulation mode

10 ECE/CS-352: Embedded Microcontroller Systems PCA Block Diagram Output pins for PWM and other waveforms Clock sources from timer overflow as well as external clock on ECI or sysclk derivatives

11 ECE/CS-352: Embedded Microcontroller Systems PCA Control 16-bit PCA counter/timer consists of two 8- bit SFRs: PCA0L and PCA0H. Reading PCA0H or PCA0L does not disturb the counter operation. PCA0MD and PCA0CN are the configuration registers. We will comeback to this module later on in the course

12 ECE/CS-352: Embedded Microcontroller Systems Seven Segment Display! ( recaps a lot of what we have learnt up to now)


Download ppt "ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 5 Other Subsystems."

Similar presentations


Ads by Google