Git Product home page Git Product logo

vuquangtrong / tiva-c Goto Github PK

View Code? Open in Web Editor NEW
12.0 0.0 1.0 4.81 MB

Projects on Tiva C TM4C123G LaunchPad, handling buttons, leds, audio synthesizer, audio DAC, pressure sensor, LCD/ OLED, bootloader. Final project makes a musical instrument from breath sensors.

License: MIT License

C 65.71% C++ 32.31% Batchfile 0.74% Assembly 1.24%
tiva tiva-c tiva-c-series c cpp tm4c123 arm cortex-m4 audio oled

tiva-c's Introduction

Tiva C TM4C123G LaunchPad

This is my practice on an ARM Cortex-M4F processor (Tiva LaunchPad TM4C123G). Please kindly check sub-folders for more project details.

Board and peripherals:

setup.jpg

Play music note on presure sensors: pressure_to_sound.mp4

This bringup project use SysTick interrupt as the main task which periodically check buttons states and drives LED. It also be used to refresh LCD, read inputs, send data. You can add conditions before starting any action in SysTick routine.

In the BringUp project, main loop calls WaitForInterrupt(); to enter sleep mode. Does it actually do what you want? This project includes CpuUsage module to monitor the number of clock cycles in which CPU actually does something. Between SYSTICK cycle, CPU only uses some of its clock cycle to do its jobs. TIMER2 will only count those clock cycle when CPU is working.

Shows you how to switch your board to USB Device Firmware Update mode with on-board ROM bootloader. While pressing and holding 2 buttons, press reset to enter bootloader.

To make your own bootloader, this project requires 2 parts: BootLoaderUsb providing USB DFU, JumpToBootLoader hooks user input to enter boot loader In tm4c123gh6pm.cmd, you will add APP_BASE and RAM_BASE, re-config flash address, .intvers location. You have to flash BOOT LOADER first, then flash APPLCATION later using LM Flash Programmer only, don't use CCS flasher, start address is 0x2800

This shows a menu to user with menu item and controllable settings. It's designed to easily add new item, make new property, run on Nokia 5110 or SH1106 OLED. Each MenuItem has its own property which can be one of Label, Number, Switch or your Property inherited class. User input will send actions to MainMenu to select up/down, enter/exit menu, change value of selected item, with single click, double click, and long press. Screen is only updated when user interacts with buttons, this keesp CPU idle when not used.

oled.jpg

This project uses MCP4921 12b DAC to play sound. it also includes Audio Generator to make waves. This project uses uDMA for faster data transfer. MCP4921 is connected to SSI1 on TM4C123, running at 44.1kHz x 12b. uDMA transfer data from audio buffer to SSI1, in ping-pong mode. You can play a piece of audio, please check AUDIO_TEST definition.

sine.png

sine_wave.jpg

This project connects to multiple BMP280 sensors on I2C bus and filter received data to make musical note on speaker. You can see the data on graph by enabling PROBE_SENSOR_DATA to output data on serial. if USE_MIDI_UART is enabled, you can connect UART to any MIDI synthesizer.

filtered.jpg

two_channels.jpg

tiva-c's People

Contributors

vuquangtrong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jpsgoncalves

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.