Lab 4
Lab 4
Part 1: SSH.
Theory Concepts:
SSH comes from “Secure Shell” and is a remote Administration protocol that
enables the control of a remote device.
Part 2: Timers.
▸ Timers are used to generate operations according to some events during
the time.
▸ Generally, we will generate interruptions to the main routine when a timer
is executed.
▸ We can use delay to interrupt all the program execution and timers to
change the main routine for a sub routine.
We must set the timer to work correctly. For that, is needed to define a Frequence
Sample or FS that works as a Prescaler for our timer. The following formula can
help us to select the proper FS:
timerFreq=clockfreq/FS
With the FS selected we have to start the processor interruption and then enable
the timer:
The timer uses an external function to execute the sub routine. This routine will
stop the main routine and depending on if the timer is periodic, or one shot will
keep executing.
We must declare the timer function in the startup file of the project.
This process will help us to generate a timer sequence and use it to make an
interruption to the main process.
Exercises:
• Blink the user LED PN1 with timer interruptions in the Tiva. Initially blink
the LED every second, then modify the code to blink the LED every 2
seconds and finally change the code to blink the LED every 5 seconds.
• Make a decimal sequence with the user leds that changes each 2 seconds.
• Modify the previous excercise to change the interval to 1 and 0,5 seconds
when a user switch is pressed.
• Modify the binary counter exercise from lab 3 to use timers, each
sequence should change without buttons and in a 1.5 second interval.
Then add a new functionality, when a button is pressed change the time
interval to 3 seconds.