首页 > > 详细

EL648代做、代写Python,c++编程语言

NYU TANDON SCHOOL OF ENGINEERING Name: ________________________________
EL648 – Real Time Embedded Systems ID: ________________________________
Exam 2, Fall 2023
Question 1 : Sensor Design
During the semester we have investigated a variety of available peripherals that our microcontrollers
implement. These include GPIO, ADC, Communications and Interrupts to name a few. We have also
learned how to use the MBED HAL to access these features using constructs like DigitalIn, DigitalOut,
AnalogIn, I2C, SPI and InterruptIn. For this question we put ourselves on the other side of embedded
development – developing the sensor that others can interface with using MBED.
You have been assigned to the Tandon MDS (Movement Disorder Sensor)Team. Your role is to help
develop a sensor that identifies 4 key symptoms of Parkinson’s disease using an accelerometer. The 4
symptoms are:
1. Tremors
2. Dyskenesia
3. Bradykenisia
4. Freezing of gait
Your particular role is to design the I2C interface of the sensor and develop the memory map for the
MDS. Your byte oriented memory address space is 8-bit, meaning you have 256 memory addresses for
your sensor (0x00 to 0xFF) each holding 1 byte. You allow an I2C Master device to access your sensor
(which is a slave device) to read and write your device’s memory in order to configure your sensor and
to read raw information. You also have several interrupt pins on your sensor, one for each symptom,
that can be configured and connected to a microcontroller so that the embedded developer using your
sensor can utilize those interrupts.
A. Write the section of your datasheet for the MDS called “I2C Interface” that informs the
embedded developer how to read/write your memory via I2C.
a. Specify a slave address for your device
b. Indicate how to read one or more bytes from your memory (provide a timing diagram)
c. Indicate how to write one or more bytes from your memory (provide a timing diagram)
This is your design. Be as creative as you wish, while maintaining the standards of I2C
communications. After reading this section of the datasheet, any developer should know
how to communicate with your sensor and read/write any bytes in your memory map
B. Write the “Memory Map/Register Descriptions” section of your datasheet that gives access to
all relevant information in your MDS. You do not need to use all memory addresses!
a. Address 0x00 should be a WHOAMI register which has a device ID (you can choose
whatever ID you wish)
b. Provide register addresses that configure your device (or use bits in registers) and give
access to raw data. Features that should be implemented are:
i. Enable/Disable MDS device
ii. Enable/Disable each of the 4 symptom (described above) interrupts. These are
normally HIGH and go LOW when the symptom is present
iii. Enable/Disable a “Data Ready” interrupt which goes LOW each time a raw data
measurement of the accelerometer is made
iv. Configure polling rate of accelerometer (rates of your choice)
v. Enable/Disable Noise filter
vi. Enable/Disable High Pass filter
vii. Access to accelerometer raw data in 3 dimensions (16 bits each dimension)
Feel free to add any additional information you feel can be useful for an embedded
developer as far as configuring your device or retrieving additional information from
your device.
Your register map should look something like this:
Your Register descriptions should look like this (example for address 0x74):
Submit your Datasheet Sections in a single PDF
Question 2: Interfacing your Sensor
Now that you have implemented your sensor, put yourself in the role of an embedded developer that
needs to access this sensor using I2C using your STM32F429 board. You have the following objectives and
you can use any MBED constructs that you wish:
A. You need 3 global uint16_t variables that hold the raw data for the accelerometer data (3
dimensions)
B. Add 4 global variables that hold the symptom status for each symptom.
C. Use InterruptIn to capture the Data Ready interrupt (on any pin of your choice). Use this interrupt
to read the 3 16 bit accelerometer raw data values from the MDS via I2C and store them in your
3 variables declared in A.
D. Use InterruptIn to capture each of the 4 symptoms (on any pin of your choice) and store them in
the variables in B.
E. Use the on-board LED to show symptom status. LED should be OFF if no symptoms present, On
if any symptom present.
For this question, submit your main.cpp file that includes A. through E.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!