User manual
21
5.5 I2C Driver for the Accelerometer/Magnetometer FXOS8700CQ:
The PIC microcontroller uses I2C driver (I2C_ID_2) to communicate with the Accelerometer -
Magnetometer on board. The state machine configures the accelerometer at first as it is
recommended by the datasheet of the IC. Then it continuously reads the accelerometer and
magnetometer data and stores the readings in the structs:
ACCELDATA accelData;
MAGDATA magData;
Where these structs contain the X,Y,Z, and magnitude data.
The state machine is maintained using the function APP_Tasks_ACCEL(). Please refer to it for
more details on the implementation.
5.6 RTCC Driver:
The PIC microcontroller uses RTCC driver available in MPLAB Harmorny.
The initial values of date and time can be either acquired from the Cellular network of GPS.
The application already include a function that extracts the date time information from the
Cellular network using the function ParseDateFromTelit() and uses the values to initialize RTCC
and start it.
The state machine is maintained using the function APP_Tasks_RTC(). Please refer to it for more
details on the implementation.
5.7 SQI Driver:
The PIC microcontroller uses SQI bus to write to and read from the Flash Memory on board.
The flash memory is 4MB in size. The memory can be powered on/off through the pin
SQI_PWR. If cleared (PLIB_PORTS_PinClear(SQI_PWR)) then the memory will be powered on, and
powered off otherwise.
The demonstration application exercises SQI module in DMA mode, by reading a page in the
SQI Flash(SST26VF032/SST26VF032B) device on the PIC32MZ EC Starter Kit or the PIC32MZ EF
Starter Kit. This demonstration uses PIO mode to write the Flash. Following steps describe the
functionality per the calls during run time:
1. Sets up SQI to run at 25 MHz. (system_init.c:: SYS_Initialize, app.c:: APP_Initialize)
2. Once the clock frequency is programmed, the demonstration prepares the connected Serial
Flash device for a write readtransaction
3. Reads the device ID of the attached Flash device.
The state machine is maintained using the function APP_Tasks_Flash(). Please refer to it for
more details on the implementation. Please also refer to the file sqi_sst26vf032.c to check
read/write functions to and from the memory.
5.8 Analog and Digital IOs:
The PingPong has two 0-30V analog inputs and Four (3-state) digital inputs. A 3-State digital
input means that you can detect if the input is high, low or floating.
The analog inputs are sampled continuously and the values are stored in the float type
variables ADCCH1 and ADCCH2.