数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

MPXM2010D 数据表(PDF) 6 Page - Freescale Semiconductor, Inc

部件名 MPXM2010D
功能描述  Water Level Monitoring
PDF  24 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  FREESCALE [Freescale Semiconductor, Inc]
网页  http://www.freescale.com
标志 FREESCALE - Freescale Semiconductor, Inc

MPXM2010D 数据表(HTML) 6 Page - Freescale Semiconductor, Inc

Back Button MPXM2010D Datasheet HTML 2Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 3Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 4Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 5Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 6Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 7Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 8Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 9Page - Freescale Semiconductor, Inc MPXM2010D Datasheet HTML 10Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 6 / 24 page
background image
AN1950
Sensors
6
Freescale Semiconductor
where H1 and H2 are the maximum and minimum water levels
respectively and D is the possible datapoints available per
character.
Resolution = (160mm– 0mm) / 8.0 = 20 mm / data point.
The graphical history is displayed using the eight special
characters. To update the graphics, all the characters have to
be updated. The characters are updated by first positioning a
pixel for the most recent water level reading in the first column
of the first character. Then the four right columns of the first
character are shifted to the right. The pixel in the last column
of that character is carried to the first column of the next
character. This column shifting is continued until all 40 data
points have been updated in the eight special characters.
LfNx Function
The LfNx function calculates the water level from the
current A/D pressure reading. The A/D Pressure value is
stored in Register A before this function is called. Using the
A/D value and the calibration values stored in the flash, the
water level is calculated from the following function:
RBRA: = (NX –N1) * 160 / (N2 – N1),
where NX is the current A/D Value
N1 is the A/D Value at 0 mm H20
N2 is the A/D Value at 160 mm H20
To simplify the calculation, the multiplication is done first.
Then the function NdivD is called to divide the values.
NdivD Function
The NdivD function performs a division by counting
successive subtractions of the denominator from the
numerator to determine the quotient. The denominator is
subtracted from the numerator until the result is zero. If there
is an overflow, the remainder from the last subtraction is the
remainder of the division.
wrflash and ersflsh Functions
The wrflash and ersflsh functions are used to write to and
erase values from the flash. For more information regarding
flash functionality, refer to Section Four, Flash Memory from
the MC68HC908QY4/D Databook.
ALLINIT Function
The Allinit function disables the COP for this version of
software, sets the data direction bits, and disables the data to
the LCD and turns off the LCD enable line. It also sets up the
microcontroller's internal clock to half the speed of the bus
clock. See Section 15, Computer Operating Properly, of the
MC68908QT4 datasheet for information on utilizing the COP
module to help software recover from runaway code.
WARMUP Function
The Warmup function alternates the blinking of the two
LEDs ten times. This gives the LCD some time to warm up.
Then the function warmup calls the LCD initialization function,
lcdinit.
bintasc Function
The binasc function converts a binary value to its ascii
representation.
A/D Functions
The A/D functions are used to input the amplified voltage
from the pressure sensor from channel 0 of the A/D converter.
The function adcbyti will set the A/D control register, wait for
the A/D reading and load the data from the A/D data register
into the accumulator. The function adcbyta is used to obtain an
averaged A/D reading by calling adcbyti 256 times and
returning the resulting average in the accumulator.
LCD Functions
The LCD hardware is set up for multiplexing three pins from
the microcontroller using an eight-bit shift register. Channels
three, four, and five are used on port A for the LCD enable (E),
the LCD reset (RS), and the shift register clock bit,
respectively. The clock bit is used to manually clock data from
channel four into the eight-bit shift register. This is the same
line as the LCD RS bit because the MSB of the data is low for
a command and high for data. The RS bit prepares the LCD
for instructions or data with the same bit convention. When the
eight bits of data are available on the output pins of the shift
register, the LCD enable (E) is toggled to receive the data.
The LCD functions consist of an initialization function lcdinit
which is used once when the system is started and five output
functions. The functions lcdcmdo and lcdchro both send a
byte of data. The function shiftA is called by both lcdcmdo and
lcdchro to manually shift eight bits of data into the shift register.
The function lcdnibo converts the data to binary before
displaying. The lcdnibo displays a byte of data by calling
lcdnibo for each nibble of data. The function lcdnibo enables
strings to be easily added to the software for display. The
function accepts a comma- delimited string of data consisting
of 1–2 commands for clearing the screen and positioning the
cursor. It then continues to output characters from the string
until the @ symbol is found, signally the end of the string.
CONCLUSION
The water level reference design uses a MPXM2010GS
pressure sensor in the low cost MPAK package, the low cost,
eight-pin microcontroller, and a quad op-amp to amplify the
sensor output voltage. This system uses very few
components, reducing the overall system cost. This allows for
a solution to compete with a mechanical switch for water level
detection but also offer additional applications such as
monitoring water flow for leak detection, and the other
applications for smart washing machines.



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


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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