TM4C123 Tutorial: Timers (Periodic Mode)

preview_player
Показать описание
An ARM microcontroller programming tutorial where you will learn to use the timers in your microcontroller in periodic mode to control the rate at which an LED's state toggles.

Tiva™ TM4C123GH6PM Microcontroller DATA SHEET:

Tiva™ C Series TM4C123G LaunchPad Evaluation Board:

Stellaris® LM4F120H5QR Microcontroller DATA SHEET:

Stellaris® LM4F120 LaunchPad Evaluation Board:
Рекомендации по теме
Комментарии
Автор

Thank you very much for creating these videos. Showing how to retrieve the information needed from the datasheet is very helpful. Thanks!

luis
Автор

Thanks for these useful videos. It is great that you show the fundamentals of the registers and why things work. Keep up the great work

markpullman
Автор

Thank you for your time and your videos are great, keep going 👍👍👍

danielvoss
Автор

What timer mode do you use when you are using the ultrasonic ranger? I need three functions, one to initialize the ultrasonic ranger, another one to output a signal, and another one to read the rise and the drops of the pulse created by the echo. Any input you can provide will be greatly appreciated.

jandon
Автор

@11:45
This is not the default value that my MC resets to according to my debugger. I am using Keil v5 and according to the register viewer the MC is running with PLL /4 (200 /4 = 50 MHz).

rommio
Автор

what about tutorial on input edge timer? ..i want to measure time between two events. event 1st = when i set one of the pin as high and then event 2nd = when the pin goes low. so what is the time for which the pin was high.

rajtttt
Автор

i can witness that in your previous tutorial video it was main code was there. but in this tutorial you added cstartup_M.c file in your project. and you mention that in Stellaris Board has 16Mhz on-board oscillator. so are you added any system control codes in your cstartup_M.c file. please reply me dude.

sathish
Автор

Hi, those vidoes are great, but can you add the raw code to the description? The 720p video quality is not good enough to see the code when not in fullscreen. Thanks

Klimovitsky
Автор

in simulator mode the registers are not changing they are showing the garbage values

rajasekhar
Автор

Hi, thanks for the time and effort you put into your videos! What's bugging me is the loaded value into the interval load, what calculation did you use to end up with 0x00F42400? From what I calculated is: 1/(16Mhz) = 63nSec. Where to have an interval of 1 second would be: 1Sec/63nSec = 15873015 ticks = 0x00F233F7. Any clarification would be appreciated.

jaimemartinezdiaz
Автор

This was a really helpful video. I had a problem. The code like you have does not work in my microcontroller so I put two more lines of code to wait to set the clock to the timer and to Port F. If you are also having this problem, try this:
SYSCTL_RCGCGPIO_R |= (1 << 5); //clock to Port F

while(SYSCTL_RCGCGPIO_R & (1 << 5) == & (1 << 5));

GPIO_PORTF_AFSEL_R &= ~(1 << 2);
GPIO_PORTF_DIR_R = (1 << 2);
GPIO_PORTF_DEN_R = (1 << 2); //digital enable
GPIO_PORTF_DATA_R |= (1 << 2);

//Timer Configuration

SYSCTL_RCGCTIMER_R |= 0x1; //clock to timer 0
while(SYSCTL_RCGCTIMER_R & 1 == & 1);

henr
Автор

Great videos, however you did not enable the interrupt in the interrupt mask register.

TIMER0->IMR |= (1<<0);

fourtwenty
Автор

Plz give the code for above thanks, I can share email id in case u need to share the program

amrapalicollections
join shbcf.ru