S9S08SG16E1CTJ Freescale, S9S08SG16E1CTJ Datasheet - Page 142
![no-image](/images/manufacturer_photos/0/2/261/freescale_sml.jpg)
S9S08SG16E1CTJ
Manufacturer Part Number
S9S08SG16E1CTJ
Description
Manufacturer
Freescale
Datasheet
1.S9S08SG16E1CTJ.pdf
(330 pages)
Specifications of S9S08SG16E1CTJ
Cpu Family
HCS08
Device Core Size
8b
Frequency (max)
40MHz
Interface Type
SCI/SPI
Total Internal Ram Size
1KB
# I/os (max)
16
Number Of Timers - General Purpose
1
Operating Supply Voltage (typ)
3.3/5V
Operating Supply Voltage (max)
5.5V
Operating Supply Voltage (min)
2.7V
On-chip Adc
12-chx10-bit
Instruction Set Architecture
CISC
Operating Temp Range
-40C to 85C
Operating Temperature Classification
Industrial
Mounting
Surface Mount
Pin Count
20
Package Type
TSSOP
Program Memory Type
Flash
Program Memory Size
16KB
Lead Free Status / RoHS Status
Compliant
- Current page: 142 of 330
- Download datasheet (2Mb)
Chapter 9 Analog-to-Digital Converter (S08ADC10V1)
9.4.5
The compare function is enabled by the ACFE bit. The compare function can be configured to check for
an upper or lower limit. After the input is sampled and converted, the compare value (ADCCVH and
ADCCVL) is subtracted from the conversion result. When comparing to an upper limit (ACFGT = 1), if
the conversion result is greater-than or equal-to the compare value, COCO is set. When comparing to a
lower limit (ACFGT = 0), if the result is less than the compare value, COCO is set. An ADC interrupt is
generated upon the setting of COCO if the ADC interrupt is enabled (AIEN = 1).
The subtract operation of two positive values (the conversion result less the compare value) results in a
signed value that is 1-bit wider than the bit-width of the two terms. The final value transferred to the
ADCRH and ADCRL registers is the result of the subtraction operation, excluding the sign bit. The value
of the sign bit can be derived based on ACFGT control setting. When ACFGT=1, the sign bit of any value
stored in ADCRH and ADCRL is always 0, indicating a positive result for the subtract operation. When
ACFGT = 1, the sign bit of any result is always 1, indicating a negative result for the subtract operation.
Upon completion of a conversion while the compare function is enabled, if the compare condition is not
true, COCO is not set and no data is transferred to the result registers.
An example of compare operation eases understanding of the compare feature. If the ADC is configured
for 10-bit operation, ACFGT=0, and ADCCVH:ADCCVL= 0x200, then a conversion result of 0x080
causes the compare condition to be met and the COCO bit is set. A value of 0x280 is stored in
ADCRH:ADCRL. This is signed data without the sign bit and must be combined with a derived sign bit
to have meaning. The value stored in ADCRH:ADCRL is calculated as follows.
The value to interpret from the data is (Result – Compare Value) = (0x080 – 0x200) = –0x180. A standard
method for handling subtraction is to convert the second term to its 2’s complement, and then add the two
terms. First calculate the 2’s complement of 0x200 by complementing each bit and adding 1. Note that
prior to complementing, a sign bit of 0 is added so that the 10-bit compare value becomes a 11-bit signed
value that is always positive.
Then the conversion result of 0x080 is added to 2’s complement of 0x200:
142
Automatic Compare Function
+
The compare function can monitor the voltage on a channel while the MCU
is in wait or stop3 mode. The ADC interrupt wakes the MCU when the
compare condition is met.
+
%101 1111 1111
---------------
%110 0000 0000
%000 1000 0000
%110 0000 0000
---------------
%110 1000 0000
%1
MC9S08SG32 Data Sheet, Rev. 8
<= 1’s complement of 0x200 compare value
<= 2’s complement of 0x200 compare value
<= Subtraction result is –0x180 in signed 11-bit data
NOTE
Freescale Semiconductor
Related parts for S9S08SG16E1CTJ
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![TWR-ELEV](/photos/9/0/90062/twr-elev_inside_tmb.jpg)
Part Number:
Description:
TOWER ELEVATOR BOARDS HARDWARE
Manufacturer:
Freescale Semiconductor
Datasheet:
![TWR-SER](/photos/9/0/90065/twr-ser_tmb.jpg)
Part Number:
Description:
TOWER SERIAL I/O HARDWARE
Manufacturer:
Freescale Semiconductor
Datasheet:
![TWR-LCD](/photos/37/59/375952/twr-lcd_bd_tmb.jpg)
Part Number:
Description:
LCD MODULE FOR TWR SYSTEM
Manufacturer:
Freescale Semiconductor
Datasheet:
![MCIMX51LCD](/photos/37/58/375843/mx51-lcd_tmb.jpg)
Part Number:
Description:
DAUGHTER LCD WVGA I.MX51
Manufacturer:
Freescale Semiconductor
Datasheet:
![TWR-MPC5125](/photos/37/59/375933/twrmpc5125_tmb.jpg)
Part Number:
Description:
TOWER SYSTEM BOARD MPC5125
Manufacturer:
Freescale Semiconductor
Datasheet:
![MCIMX51EVKJ](/photos/9/23/92399/mcimx51evkj_tmb.jpg)
Part Number:
Description:
KIT EVALUATION I.MX51
Manufacturer:
Freescale Semiconductor
Datasheet:
![MCIMX25WPDKJ](/photos/37/58/375856/imx25pdk_bd_tmb.jpg)
Part Number:
Description:
KIT DEVELOPMENT WINCE IMX25
Manufacturer:
Freescale Semiconductor
Datasheet:
![TWR-MPC5125-KIT](/photos/9/25/92581/mfg_twr-mpc5125-kit_tmb.jpg)
Part Number:
Description:
TOWER SYSTEM KIT MPC5125
Manufacturer:
Freescale Semiconductor
Datasheet:
![TWR-K40X256](/photos/30/35/303578/twr-kx0n_tmb.jpg)
Part Number:
Description:
TOWER SYSTEM BOARD K40X256
Manufacturer:
Freescale Semiconductor
Datasheet:
![TWR-K40X256-KIT](/photos/37/58/375861/twr-kx0n-kit_tmb.jpg)
Part Number:
Description:
TOWER SYSTEM KIT K40X256
Manufacturer:
Freescale Semiconductor
Datasheet:
![MCIMX28EVK](/photos/16/13/161325/imx28_tmb.jpg)
Part Number:
Description:
Microcontrollers (MCU) MX28 PLATFORM DEV KIT
Manufacturer:
Freescale Semiconductor
Datasheet:
![TWR-K60N512-IAR](/photos/18/26/182613/twr-kx0n_tmb.jpg)
Part Number:
Description:
MCU, MPU & DSP Development Tools IAR KickStart Kit for Kinetis K60
Manufacturer:
Freescale Semiconductor
Datasheet:
![MCIMXHDMICARD](/photos/40/32/403220/mcimxhdmicard_tmb.jpg)
Part Number:
Description:
24BIT HDMI MX535/08
Manufacturer:
Freescale Semiconductor
Datasheet:
![MC14560BCP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
![MC12034AP](/images/manufacturer_photos/0/2/263/freescale_semiconductor__inc_tmb.jpg)
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet: