Electronic Components Datasheet Search
  English  ▼

X  

P87LPC778 Datasheet(PDF) 20 Page - NXP Semiconductors

Part # P87LPC778
Description  CMOS single-chip 8-bit 80C51 microcontroller 128-byte data RAM, 8 kB OTP
PDF  79 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  PHILIPS [NXP Semiconductors]
Direct Link  http://www.nxp.com
Logo PHILIPS - NXP Semiconductors

P87LPC778 Datasheet(HTML) 20 Page - NXP Semiconductors

Back Button P87LPC778 Datasheet HTML 16Page - NXP Semiconductors P87LPC778 Datasheet HTML 17Page - NXP Semiconductors P87LPC778 Datasheet HTML 18Page - NXP Semiconductors P87LPC778 Datasheet HTML 19Page - NXP Semiconductors P87LPC778 Datasheet HTML 20Page - NXP Semiconductors P87LPC778 Datasheet HTML 21Page - NXP Semiconductors P87LPC778 Datasheet HTML 22Page - NXP Semiconductors P87LPC778 Datasheet HTML 23Page - NXP Semiconductors P87LPC778 Datasheet HTML 24Page - NXP Semiconductors Next Button
Zoom Inzoom in Zoom Outzoom out
 20 / 79 page
background image
Philips Semiconductors
P87LPC778
CMOS single-chip 8-bit microcontroller
Product data
Rev. 01 — 31 March 2004
20 of 79
9397 750 12378
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
8.5.5
Comparator configuration example
The code shown below is an example of initializing one comparator. Comparator 1 is
configured to use the CIN1A and CMPREF inputs, outputs the comparator result to
the CMP1 pin, and generates an interrupt when the comparator output changes.
CmpInit: b
mov
PT0AD,#30h
; Disable digital inputs on pins that are used
;
for analog functions: CIN1A, CMPREF.
anl
P0M2,#0cfh
; Disable digital outputs on pins that are used
orl
P0M1,#30h
;
for analog functions: CIN1A, CMPREF.
mov
CMP1,#24h
; Turn on comparator 1 and set up for:
;
- Positive input on CIN1A.
;
- Negative input from CMPREF pin.
;
- Output to CMP1 pin enabled.
call
delay10us
; The comparator has to start up for at
;
least 10 microseconds before use.
anl
CMP1,#0feh
; Clear comparator 1 interrupt flag.
setb
EC1
; Enable the comparator 1 interrupt. The
;
priority is left at the current value.
setb
EA
; Enable the interrupt system (if needed).
ret
; Return to caller.
The interrupt routine used for the comparator must clear the interrupt flag (CMF1 in
this case) before returning.
8.6 Pulse width modulator
The P87LPC778 contains four Pulse Width Modulated (PWM) channels which can
generate pulses of programmable length and interval.
The output for PWM0 is on P0.1, PWM1 on P1.6, PWM2 on P1.7 and PWM3 on
P0.0.
After chip reset the output of the each PWM channel is reflect by the setting of
UCFG1.5, PRHI, if set to a zero the outputs are low, if set to one the outputs are high.
In this case PRHI is set to zero, before the pin will reflect the state of the internal
PWM output a ‘1’ must be written to each port bit that serves as a PWM output.
A block diagram is shown in Figure 8.
The interval between successive outputs is controlled by a 10–bit down counter
which uses the internal microcontroller clock as its input.
When bit 3 in the UCFG1 register is a ‘1’ (6-clock mode) the microcontroller clock,
and therefore the PWM counter clock, has the same frequency as the clock source:
(2)
When bit 3 in the UCFG1 register is a ‘0’ (12-clock mode) the microcontroller and
PWM counter clocks operate at half the frequency of clock source:
(3)
f
CPWM
f
OSC
=
f
CPWM
f
OSC
2
------------
=



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com