![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
This project serves as a template for work with the Freescale FRDM-KL46 board. Support will be added to all on-board peripherals, sensors and I/O.
Dependencies: FRDM_MMA8451Q MAG3110 TSI mbed
Fork of FRDM-KL46-Template by
Project Information:
Theory
This project has been created to serve as a template for those who wish to use the Freescale Freedom FRDM-KL46Z board. Existing drivers within mbed have been brought together and board specific configurations for certain inputs and outputs have included.
Libraries
- TSI (source: http://mbed.org/users/emilmont/code/TSI/ ) Capacitive Touch library to support the on-board Touch-Slider
- FRDM_MMA8451Q (source: http://mbed.org/users/clemente/code/FRDM_MMA8451Q/ ) Freescale MMA8451 Accelerometer connected on I2C0
- MAG3110 (source: http://mbed.org/users/mmaas/code/MAG3110/) (based on: http://mbed.org/users/SomeRandomBloke/code/MAG3110/)
TODOs
- Add support for Segment LCD - intend to use driver in example code: http://cache.freescale.com/files/32bit/software/KL46_SC.exe
Hardware Information:
FRDM-KL46Z Information
- User Guide Guide: http://cache.freescale.com/files/microcontrollers/doc/user_guide/FRDM-KL46Z_UM.pdf
- Schematics: http://cache.freescale.com/files/microcontrollers/hardware_tools/schematics/FRDM-KL46Z_SCH.pdf
Freescale Kinetis L-Series Microcontroller Information
- Kinetis KL46 Drop Page: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=KL4x
- Kinetis KL46 Fact Sheet: http://cache.freescale.com/files/microcontrollers/doc/fact_sheet/LSERIESKL4FS.pdf
- Kinetis KL46 Reference Manual: http://cache.freescale.com/files/microcontrollers/doc/ref_manual/KL46P121M48SF4RM.pdf
- Kinetis KL46 Data Sheet: http://cache.freescale.com/files/microcontrollers/doc/data_sheet/KL46P121M48SF4.pdf
Freescale Sensor Information
MMA8451Q
MAG3110
Diff: main.cpp
- Revision:
- 7:9e1d22b35dab
- Parent:
- 6:aaf347dfd538
- Child:
- 8:b61a953b6128
diff -r aaf347dfd538 -r 9e1d22b35dab main.cpp --- a/main.cpp Sat Jan 04 02:33:13 2014 +0000 +++ b/main.cpp Sat Jan 04 04:40:00 2014 +0000 @@ -38,7 +38,8 @@ // PTC5 / INT1_ACCEL = INT1 output of MMA8451Q // PTD1 / INT2_ACCEL = INT2 output of MMA8451Q (shared with MAG3110) // -// MAG3110 +// MAG3110 (source: http://mbed.org/users/mmaas/code/MAG3110/) +// (based on: http://mbed.org/users/SomeRandomBloke/code/MAG3110/) // Freescale MAG3110 Magnetomoter connected on I2C0 // PTE24 / I2C0_SCL = I2C bus for communication (shared with MMA8451) // PTE25 / I2C0_SDA = I2C bus for communication (shared with MMA8451) @@ -177,7 +178,7 @@ printf("Slider:\r\n %2.0f %% \r\n\r\n", sensorData.sliderPosition); printf("Light Sensor:\r\n %1.3f \r\n\r\n", sensorData.lightSensor); printf("Accelerometer:\r\n X = %1.3f\r\n Y = %1.3f\r\n Z = %1.3f\r\n\r\n", sensorData.accXVal, sensorData.accYVal, sensorData.accZVal); - printf("Magnetometer:\r\n X = %d\r\n Y = %d\r\n Heading = %f \r\n\r\n", sensorData.magXVal, sensorData.magYVal, sensorData.magHeading); + printf("Magnetometer:\r\n X = %d\r\n Y = %d\r\n Heading = %.2f \r\n\r\n", sensorData.magXVal, sensorData.magYVal, sensorData.magHeading); printf("\r\n");