VEEK-MT2 User Manual
43
www.terasic.com
July 4, 2016
4.9
E-Compass Demonstration
This demonstration shows an e-compass on the LCD panel based on information measured by
accelerometer and magnetometer in the MPU9250. There are two I
2
C controllers are used in this
demonstration. One is use to communicate with touchscreen chip in the LCD module, and another is
used to communicate with the MPU9250 to retrieve the measured gravity and magnetic field
information. The compass angel is calculated based on the gravity and magnetic field measured by the
MPU9250. The calculated compass angle will be displayed on the LCD panel. A bubble level is also
displayed on the LCD panel to indicate the level surface. Note, the magnetometer should be calibrated
before the e-compass will work accurately. The calibration process is also included in this
demonstration.
shows the graphic interface of the e-compass demonstration. The left area show the gravity
information measured by accelerometer in the MPU9250. Also, a bubble level is shown on the LCD.
The center of LCD panel shows the e-compass. The north direction and magnetic field information are
shown on the LCD panel. The Calibration button is used to start the calibration process for the
e-compass.
Figure 4-18 Graphic Interface of e-compass demonstration
shows the hardware system block diagram of this demonstration. The system is clocked by
an external 50MHz Oscillator. Through the internal PLL module, the generated 100MHz clock is used
for Nios II processor, SDRAM, SSRAM, and other high speed controllers. The PLL also generate a
20MHz for low-speed peripherals, such as LEDs and buttons. The NIOS II program is running on the
SRAM and the SDRAM is used as video frame buffers in Altera VIP block. The I2C_OpenCore
controllers are used to communicate with the touch screen chip and the MPU9250 chip. The VIP block
is used to implement video streaming for displaying graphic on the LCD panel. The video steaming is:
Nios II Processor
SDRAM
VIP: Frame Reader
VIP: Clocked Video Output
LCD Panel.
Содержание VEEK-MT2
Страница 1: ...1 ...