00:05Greetings friends, today I will present exercises developed with microcontrollers. The first exercise will deal with the simulation of the ignition.
00:13of LEDs, as a sequence of lights from Knight Rider, for this I will use VASCOMA BR and Proteus version 9.
00:22This project is very similar to that of disco lights, with the difference that this one turns on by
00:28left to right and then right to left.
00:33We will use offsets, which are nothing more than picking up a logical one to the left or right of the
00:39Exit from the ports, to carry out the displacements is written as follows.
00:44Rotate by left shifts one bit to the left in the port; rotate by drive shifts one bit to the right.
00:51bit on the port, for which use the ADMega328P of the ABR family, which is incorporated in the Arduino
00:59I simulate LidlPad.
01:00For the simulation it was configured according to the datasheet, but in this case it was configured according to the image.
01:10And we observed the simulation, which is functioning correctly, the sequence of the LEDs turning on, with a time of
01:1740 millisecond wait.
01:47Subscribe to the channel!
01:51Now I will present the following exercise with pushbuttons; the exercise consists of turning on two LEDs when a pushbutton 1P1 is pressed.
01:59and turn off the LED when the 2P2 push button is pressed.
02:02Pushbuttons P1 and P2 have been connected to port D on pins RD0 and RD1 respectively.
02:10In the program, the variables turn on and turn off are defined by the directives define turn on bittest, by T0, define turn off
02:17bittest, by T1, which allow testing the state of the inputs.
02:26Here the programming was done with PICC with PICC with PICC.
02:41The connections for controlling pushbuttons are shown here; with this connection, the port pins, RD0 and RD1, are directly connected.
02:49in logical state of 1.
02:50Therefore, pressing the button determines that the ports are activated.
02:57The microcontroller is the 18F4450 from the 18F family.
03:33Okay, that's all, thank you.
Comentarios