Skip to main content

Posts

Showing posts from December, 2017

Project 2 - Flashing all onboard-LED colour combinations

From the previous project we have seen how to blink LED (white colour). This project post will demonstrate how to flash the on board LED colour combinations without much math. So the LED is connected as follows. RED → PF1 BLUE → PF2 GREEN → PF3 Therefore to display red we need to output 0x02, here '2' because PF0 is not being used. Similarly to display purple/violet → 0x06, blue → 0x04, aqua blue/ greenish blue → 0x0c, green → 0x08, yellow  → 0x09, white  → 0x0e and none  → 0. Now lets focus on the sequence: 0, R, RG, G, GB, B, RB, RGB. For the above mentioned sequence the system states are as follows: Here the states are addressed as D2D1D0 and the next state as O2O1O0 Present State     Next State     Output       000                  001              000       001                  101              001       101                  100              101       100                  110              100       110                  010              110

Project 1 - LED Blink (without libraries)

So lets get started with the first basic project with TM4C123GXL eval board. Objective of this project is to blink on board LED (R+G+B) without libraries or tivaware. *Port F2 is connected to blue and F3 to green Launch Code composer studio or other relevant IDE. In CCS, open a new CCS project. Select "Tiva C series" and "Tiva TM4C123GH6PM" as target and "Stellaris In-Circuit Debug Interface" as connection. Assign a Project Name and click on "Finish". According to objective, tivaware or libraries are not used in this project else we need to include the tivaware location as mention in the link provided in the project home page of this project series, in the include option in the "properties/build/include options". Double click on main file and start programming. Program:  Click here to view the file Back to Project Home Page .

Getting started with TM4C123GXL

The Tiva™ C Series TM4C123G LaunchPad Evaluation kit package includes LaunchPad Board USB cable ReadMe pamphlet On the first power up of the board, a demo program executes. Reset button resets the mcu and the LED glow pattern restarts. User buttons Sw1 and Sw2 are used to move LED glow pattern back and forth. If both the user buttons are pressed at once for 3 secs, the mcu goes into hibernate mode and can be resumed by pressing Sw2. On connecting the board via TTY terminal, it provides a prompt '>'. Type "help" for information. Try experimenting with the other commands. To connect the board via serial port plugin the usb cable into debug port and let the switch be in debug position. This switch routes power from debug usb port or device/otg usb port. For information on ports provided by this board, refer the ReadMe pamphlet. Back to Project Home Page .

TM4C123GH6PMI Specifications

Specifications: CPU: 32-bit ARM® Cortex™-M4F clocked at 80 MHz FPU: IEEE754 - compliant single-precision FPU Performance: 100DMIPS SRAM: 32KB single-cycle ROM: 256KB Flash EEPROM: 2KB Peripherals GPIO: 6 blocks UART: 8 SSI: 4 I2C: 4 CAN: 2 USB: OTG/Device DMA: 32-channel configurable μDMA Controller Timer: 6 -16/32-bit GPTM blocks 6 - 32/64-bit Wide GPTM blocks WDT: 2 Hibernation Module: 2 PWM: 2, each with 4 PWM generator blocks and a control block, for a total of 16 PWM outputs QEI: 2 ADC: 2, 12 bit modules with max sampling rate of 1MSPS ACC: 2 JTAG: 1 Refer Datasheet for more details. Back to Project Home Page .