pic tutorial
download pic simulator ide, ide pic, pic, pic english tutorial, pic simulator, pic spanish 0 Comments »
here spanish translation is given in english for word by word by keeping spanish in order to help spanish and english readers
> Chapter 01 - Interface: Debido a que se trata de un software concebido desde el vamos como un entorno, la integración entre los diferentes módulos que lo componen es completa y sin problemas. Because software is designed from scratch as an environment, integration between different modules that comprise it is complete and without problems.
Una vez instalado el programa, el icono que lo representa aparecerá en nuestro escritorio, y haciendo doble clic sobre el se abrirá la pantalla principal del programa, que al menos hasta la versión sobre la que se desarrolla este tutorial (la 5.91) esta en ingles: Once installed the program, the icon representing it will appear on your desktop, and double-clicking on the main screen opens the program, at least until the version on which to develop this tutorial (the 5.91) is in English :
Antes de ver en que consiste cada opción del menú principal, vamos a analizar rápidamente cada sección de esta pantalla: Before seeing what each main menu item, we will quickly analyze each section of this screen:
En la parte superior, y justo debajo de la barra de menú tenemos tres cuadros de texto que nos muestran la ruta completa hacia el programa que tenemos cargado en el simulador ( Program Location ), el microcontrolador que hemos seleccionado para nuestro proyecto ( Microcontroller ) y la frecuencia de clock elegida ( Clock Frequency ). At the top, and just below the menu bar we have three text boxes that show the full path to the program you have open in the simulator (Program Location), the microcontroller we have chosen for our project (Microcontroller) and selected clock frequency (Clock Frequency).
En la parte superior, y justo debajo de la barra de menú tenemos tres cuadros de texto que nos muestran la ruta completa hacia el programa que tenemos cargado en el simulador ( Program Location ), el microcontrolador que hemos seleccionado para nuestro proyecto ( Microcontroller ) y la frecuencia de clock elegida ( Clock Frequency ). At the top, and just below the menu bar we have three text boxes that show the full path to the program you have open in the simulator (Program Location), the microcontroller we have chosen for our project (Microcontroller) and selected clock frequency (Clock Frequency).
Todos estos valores pueden ser cambiados, como veremos en el segundo capitulo, desde la barra de menú. All these values can be changed, as discussed in the second chapter, from the menu bar.
El recuadro que esta inmediatamente debajo del anterior nos muestra (cuando estamos corriendo una simulación de nuestro programa) cual es la instrucción assembler en curso ( Last Instruction ) y cual será la siguiente a ejecutar ( Next Instruction ): The box is immediately below the above shows (when we ran a simulation of our program) assembler instruction which is in progress (Last Instruction) and what will be the next to run (Next Instruction):
El recuadro que esta inmediatamente debajo del anterior nos muestra (cuando estamos corriendo una simulación de nuestro programa) cual es la instrucción assembler en curso ( Last Instruction ) y cual será la siguiente a ejecutar ( Next Instruction ): The box is immediately below the above shows (when we ran a simulation of our program) assembler instruction which is in progress (Last Instruction) and what will be the next to run (Next Instruction):
Luego tenemos un cuadro con información relativa a la ejecución del programa, en la que vemos instrucción a instrucción durante todo el tiempo en que estemos corriendo la simulación, el valor que va tomando el contador de programa ( PC o Program Counter ), el registro de trabajo ( W Register , por "working") y sobre la derecha la cantidad de instrucciones simuladas ( Instructions Counter ), la cantidad de ciclos de reloj transcurridos ( Clock Cycles Counter ) y el tiempo de ejecución que llevaría en realidad dicho programa ( Real Time Duration ). Then we have a table with information on the program, in which we see instruction to instruction during the entire time we are running the simulation, the value that is taking the program counter (PC or Program Counter), registering work (W Register, for "working") and on the right the number of instructions simulated (Instructions Counter), the number of elapsed clock cycles (Clock Cycles Counter) and the runtime that the program would actually (Real Time Duration). Cabe aclarar, que como en todo simulador, la relación entre el tiempo real y el tiempo de simulación varia dependiendo de los recursos de nuestro ordenador, y en general los programas simulados demoran mucho mas tiempo que el real en ejecutarse. It is worth noting that, as in any simulation, the relationship between real time and simulation time varies depending on the resources of our computer, and in general the simulated programs take much longer than the actual run.
A continuación, sobre la izquierda, vemos una lista de desplazamiento que contiene el valor de todos los registros especiales con los que cuenta el microcontrolador elegido. Then, on the left, we see a scrolling list that contains the value of all special registers with which the microcontroller has chosen. Esta lista varia, por supuesto, con cada microcontrolador, y en el momento de correr la simulación va reflejando instrucción a instrucción el valor de cada timer, puerto, registro de estado, interrupciones, etc. This list varies, of course, with each microcontroller, and the simulation run time instruction to instruction will reflect the value of each timer, port status register, interrupts, etc.. Los valores se muestran en hexadecimal ( Hex Value ) y en binario ( Binary Value ). The values displayed in hexadecimal (Hex Value) and binary (Binary Value). Cada registro se identifica mediante su dirección ( Address ) y también por el nombre con el que figura en la hoja de datos ( Name ). Each record is identified by its address (Address) and also the name that appears in the data sheet (Name).
Por ultimo, ya la derecha del cuadro anterior, tenemos el valor de todos los registros de propósito general ( GPRs , o general purpose register). Finally, and right of the table above, we have the courage of all general purpose registers (GPRS, or general purpose register). La lista tiene dos columnas, cada una indicando la dirección del registro ( Addr .) y su valor en hexadecimal ( Hex. Value ): The list has two columns, each showing the address of the register (Addr.) And their value in hex (hex. Value):
> Capitulo 02 - El menú principal: > Chapter 02 - The main menu:
La mayoría de las funciones de las que dispone esta herramienta están agrupadas dentro del menú principal de la aplicación. Most of the functions that this tool has grouped within the main application menu. Es de destacar que todos los módulos que se pueden invocar desde aquí se abren en ventanas separadas, y pueden ser configuradas (como veremos) para que se sitúen permanentemente delante de las demás ventanas, de manera que no las perdamos de vista. It is noteworthy that all modules that can be invoked from here open into separate windows, and can be configured (as we shall see) to be placed permanently in front of other windows, so you do not lose sight. Este es el menú principal: This is the main menu:
La mayoría de las funciones de las que dispone esta herramienta están agrupadas dentro del menú principal de la aplicación. Most of the functions that this tool has grouped within the main application menu. Es de destacar que todos los módulos que se pueden invocar desde aquí se abren en ventanas separadas, y pueden ser configuradas (como veremos) para que se sitúen permanentemente delante de las demás ventanas, de manera que no las perdamos de vista. It is noteworthy that all modules that can be invoked from here open into separate windows, and can be configured (as we shall see) to be placed permanently in front of other windows, so you do not lose sight. Este es el menú principal: This is the main menu:
Como es costumbre en toda aplicación de windows, la opción File es la primera del menú. As is customary in any Windows application, the File is the first menu. Contiene solo dos comandos: Clear Memory (Limpiar memoria) que se encarga de eliminar de la memoria del simulador el programa que estuviese cargado, que puede ser invocada mediante las teclas CTRL+R; y Load Program (Cargar Programa), que nos lleva a un cuadro de dialogo típico que nos permite seleccionar el archivo HEX que queremos simular. It contains only two commands: Clear Memory (Clear Memory) that is responsible for eliminating memory simulator program that was loaded, which can be invoked by using the CTRL + R, and Program Load (Load Program), which leads to typical a dialog box that allows to select the HEX file you want to simulate. Esta función puede invocarse con CTRL+L. This feature can be invoked with CTRL + L.
Dentro de la segunda opción, Simulation , tenemos tres opciones que se encargan de manejar la simulación en curso: Start , Step y Stop . Under the second option, Simulation, we have three options that are handling the simulation in progress: Start, Step and Stop. La primera de ellas arranca la simulación, la segunda se encarga de avanzar una instrucción (solo esta habilitada cuando en Rate hemos seleccionado el modo paso a paso) y la tercera detiene la simulación. The first one starts the simulation, the second is responsible for advancing an instruction (only enabled when on Rate this we selected the step mode) and the third stops the simulation. Es muy practico utilizar F1, F2 y F3 para invocar estas opciones. It is very practical to use F1, F2 and F3 to invoke these options.
Rate es el submenú que determina el modo de ejecución de la simulación, brindando 6 posibilidades: Rate is the sub that determines the mode of execution of the simulation, providing 6 possibilities:
Dentro de la segunda opción, Simulation , tenemos tres opciones que se encargan de manejar la simulación en curso: Start , Step y Stop . Under the second option, Simulation, we have three options that are handling the simulation in progress: Start, Step and Stop. La primera de ellas arranca la simulación, la segunda se encarga de avanzar una instrucción (solo esta habilitada cuando en Rate hemos seleccionado el modo paso a paso) y la tercera detiene la simulación. The first one starts the simulation, the second is responsible for advancing an instruction (only enabled when on Rate this we selected the step mode) and the third stops the simulation. Es muy practico utilizar F1, F2 y F3 para invocar estas opciones. It is very practical to use F1, F2 and F3 to invoke these options.
Rate es el submenú que determina el modo de ejecución de la simulación, brindando 6 posibilidades: Rate is the sub that determines the mode of execution of the simulation, providing 6 possibilities:
Estas son: Step By Step (paso a paso), Slow (Lenta), Normal (Normal), Fast (Rápida), Extremely Fast (muy rápida) y Ultimate (No Refresh) que es la mas rápida de todas, pero que no actualiza la pantalla principal del simulador. These are: Step By Step (Step by step), Slow (Slow), Normal (Normal), Fast (Fast), Extremely Fast (very fast) and Ultimate (No Refresh) which is the fastest of them all, but not updates the main display of the simulator. Esta opción resulta muy útil para "adelantar" partes del programa que sabemos que no tienen problemas. This option is useful to "carry out" parts of the program that we know have no problems. Todas pueden ser invocadas con CTRL+F1 a CTRL+F6, tal como se ve en la figura anterior. All can be invoked with CTRL + F1 to CTRL + F6, as shown in the figure above.
Tools es el submenú encargado de invocar a cada uno de los módulos que integran el simulador, y que veremos en detalle en capítulos siguientes. Tools submenu is responsible for invoking each of the modules of the simulator, and we shall see in detail in subsequent chapters. Tal como se ve en la figura, la mayoría de ellos se pueden activar mediante la combinación de la tecla CTRL y alguna mas. As seen in the figure, most of them can be triggered by the combination of CTRL and some more.
Tools es el submenú encargado de invocar a cada uno de los módulos que integran el simulador, y que veremos en detalle en capítulos siguientes. Tools submenu is responsible for invoking each of the modules of the simulator, and we shall see in detail in subsequent chapters. Tal como se ve en la figura, la mayoría de ellos se pueden activar mediante la combinación de la tecla CTRL y alguna mas. As seen in the figure, most of them can be triggered by the combination of CTRL and some more.
Desde Options (Opciones) tenemos acceso a un conjunto de alternativas de configuración. From Options (Options) have access to a set of configuration alternatives. Dedicaremos bastante espacio a cada una de ellas en los capítulos correspondientes, pero podemos adelantar que las mas importantes y que debemos revisar en cada proyecto son Select Microcontroler (seleccionar microcontrolador) que nos permite elegir el modelo concreto de PIC a utilizar; Change Clock Frecuency (cambiar frecuencia de clock) y Configuration Bits (bits de configuración) desde la que se puede elegir la función de algunos pines (Reset o I/O, etc), el tipo de oscilador a usar, etc. Devote considerable space to each of them in those chapters, but we anticipate that the most important and that we should review each project in Select Microcontroller (select microcontroller) that allows us to choose the particular model of PIC to use, Change Clock Frequency ( clock frequency change) and the Configuration Bits (configuration bits) from which you can select the function of some pins (reset or I / O, etc.), the type of oscillator to use, and so on. La ultima opción de este submenú permite cambiar los colores de la interfaz ( Change Color Theme ). The last option in this submenu to change the colors of the interface (Change Color Theme).
> Capitulo 03 - Herramientas (primera parte): > Chapter 03 - Tools (Part One):
PIC SIMULATOR IDE posee una nutrida caja de herramientas. PIC SIMULATOR IDE has a large toolbox. Estas se encuentran agrupadas en la opción Tools del menú principal, ya continuación veremos en que consiste cada una de ellas. These are grouped in the main menu option Tools, and then will see what each of them.
La primera es el visor de la memoria de programa ( Program Memory Viewer ), modulo que podemos invocar presionando CTRL-M en cualquier momento. The first is the display of the program memory (Program Memory Viewer) module that can invoke by pressing CTRL-M at any time. Se lista la memoria completa, cuya extensión dependerá del microcontrolador que tengamos seleccionado, y se pueden ver tres columnas: dirección ( Address ), valor en hexadecimal de esa dirección ( Hex. Value ) y el valor en binario ( Binary Value ). List memory is full, whose length depends on the microcontroller that we select, and you can see three columns: address (Address), hexadecimal value in that direction (hex. Value) and the value in binary (Binary Value). Al igual que las demás herramientas, existe un check box que permite poner la ventana correspondiente siempre al frente ( Always On Top ). Like other tools, there is a checkbox that allows the corresponding window always put forward (Always On Top).
PIC SIMULATOR IDE posee una nutrida caja de herramientas. PIC SIMULATOR IDE has a large toolbox. Estas se encuentran agrupadas en la opción Tools del menú principal, ya continuación veremos en que consiste cada una de ellas. These are grouped in the main menu option Tools, and then will see what each of them.
La primera es el visor de la memoria de programa ( Program Memory Viewer ), modulo que podemos invocar presionando CTRL-M en cualquier momento. The first is the display of the program memory (Program Memory Viewer) module that can invoke by pressing CTRL-M at any time. Se lista la memoria completa, cuya extensión dependerá del microcontrolador que tengamos seleccionado, y se pueden ver tres columnas: dirección ( Address ), valor en hexadecimal de esa dirección ( Hex. Value ) y el valor en binario ( Binary Value ). List memory is full, whose length depends on the microcontroller that we select, and you can see three columns: address (Address), hexadecimal value in that direction (hex. Value) and the value in binary (Binary Value). Al igual que las demás herramientas, existe un check box que permite poner la ventana correspondiente siempre al frente ( Always On Top ). Like other tools, there is a checkbox that allows the corresponding window always put forward (Always On Top).
La segunde herramienta disponible recibe el nombre de EEPROM Memory Editor , y como su nombre indica, nos permite modificar los valores almacenados en la memoria EEPROM del microcontrolador. The second tool available called EEPROM Memory Editor, and as its name suggests, allows us to modify the values stored in the EEPROM of the microcontroller. El contenido de la EEPROM se lista en 16 columnas numeradas del 0 al 15, y por supuesto, su extensión depende del micro seleccionado. The contents of the EEPROM is listed in 16 columns numbered 0 through 15, and of course, its length depends on the selected micro. Haciendo click sobre cualquiera de los valores se puede cambiar su contenido, que se encuentra en formato hexadecimal. Clicking on any of the values you can change its content, which is in hexadecimal format.
Hardware Stack Viewer nos permite conocer el valor de cada uno de los niveles del stack (generalmente llamado pila en español). Hardware Stack Viewer lets us know the value of each level of the stack (usually called battery in Spanish). Esto puede resultar útil para depurar los programas que tienen muchas subrutinas anidadas o cuando sospechamos que hay desbordamientos del stack. This can be useful to debug programs with many nested subroutines or suspect that there are stack overflows. Además de ver el nivel de stack ( Stack Level ), el contenido en hexadecimal ( Hex Value ) y en binario ( Binary Value ), en la parte inferior de la ventana una etiqueta nos informa de cual es el nivel apuntado en cada paso de la simulación. In addition to seeing the level of stack (Stack Level), the contents in hexadecimal (Hex Value) and binary (Binary Value), in the bottom of the window a label informs us pointed which is the level at each step of the simulation.
La herramienta Microcontroller View es una de las mas útiles, ya que en una ventana separada (y que como las demás se puede poner en frente de todas) nos muestra un esquema del micro elegido, con el rotulo correspondiente a cada pin, y lo mas importante, el estado en cada momento de la simulación de cada uno. Microcontroller Tool View is one of the most useful, since in a separate window (which like the others can be put in front of all) shows a diagram of the micro elected, with the label for each pin, and most important, the state in each simulation time each. En caso de ser un pin E/S nos muestra el estado (ON/OFF) que presenta, y si se trata de una referencia de voltaje muestra el valor asignado. In case of a pin I / S shows the status (ON / OFF) it presents, and if it is a voltage reference shows the value assigned. Además, en cada pin hay un botón que permite cambiar el estado presente en el ( T , supongo que por "toggle", que significa "cambiar"), y los resultados se toman como entradas para la simulación. In addition, each pin is a button that allows you to change the present state in the (T, suppose that "toggle" which means "change"), and the results are taken as inputs for simulation.
Existe también una vista alternativa del estado de los registros especiales, que pude resultar mas cómoda en algunos casos. There is also an alternate view of the state of the special registers, which could be more convenient in some cases. Es la correspondiente a la opción Alternative SFR Viewer , y muestra en columnas la dirección en hexa del registro, el nombre "de pila" del mismo (TMR0, PCL, STATUS, etc), y el valor del mismo, en hexadecimal y en binario. It is the option for SFR Alternative Viewer, and displayed in columns in hex address of record, the name "stack" of it (TMR0, PCL, STATUS, etc.) and the value thereof, in hex and binary .
PIC Disassembler es ni mas ni menos que un desensamblador, que nos brinda un texto con el contenido en assembler del programa cargado en la memoria del PIC SIMULATOR IDE. PIC Disassembler is neither more nor less than a disassembler, which gives us a text with the assembler of the program content uploaded to the memory of the PIC SIMULATOR IDE. Este listado se genera independientemente del origen del programa, es decir, podemos obtener el código a partir de un archivo ya compilado con cualquier compilador (con extensión .HEX) oa partir de un .HEX generado con el compilador BASIC incluido en el paquete. This list is generated regardless of the origin of the program, ie, we can get the code from a file and compiled with any compiler (with a. HEX) or from a. HEX generated by the BASIC compiler included in the package. Se muestra, por cada instrucción, la dirección ( Address ), el opcode y la instrucción ( instruction ). It shows, for each instruction, the address (Address), the opcode and instruction (instruction). Ideal para aprender assembler a partir de instrucciones BASIC, por ejemplo. Ideal for learning assembler instructions from BASIC, for example.
El manejador de "puntos de inspección" o Breakpoint Manager es una herramienta que permite definir hasta 10 puntos en los que la simulación se interrumpirá (luego podremos reanudar la ejecución desde ese punto) para analizar con tranquilidad el estado de los registros, los puertos, etc. The handle of "checkpoints" or Breakpoint Manager is a tool that lets you define up to 10 points in the simulation is interrupted (then we can resume the execution from that point) to calmly analyze the state of registers, ports, etc. Hay un par de opciones adicionales, como el botón que permite eliminar todos los breakpoints definidos ( Clear All Breakpoints ) o mantener siempre en foco el contador de programa ( PC o Program Counter). There are a couple of additional options, such as the button to remove all breakpoints defined (Clear All Breakpoints) and always keep in focus the program counter (PC or Program Counter). El contenido de la ventana es el código assembler en el mismo formato que comentamos en la herramienta anterior. The contents of the window is the assembler code in the same format as discussed in the previous tool.
Además de los diez puntos de parada anteriores, se pueden definir cinco puntos especiales, mediante la herramienta Special Breakpoints . Besides the ten previous stopping points, five points can be defined especially by Special Breakpoints tool. La diferencia entre esta y la anterior herramienta (y lo que la hace tan especial) es que en este caso los puntos de inspección se fijan mediante una condición ( Break Condition ) o por el estado de algún registro ( Register Address ). The difference between this and the previous tool (and what makes it so special) is that in this case the inspection points are determined by a condition (Condition Break) or the state of a register (Register Address). Los botones SET y DEL permiten habilitar y deshabilitar individualmente cada una de las condiciones. The SET and DEL buttons allow you to enable and disable individually each of the conditions.
La herramienta assembler tendrá su capitulo propio, por que es aquí donde se escribe el código en dicho lenguaje para luego compilarlo. The assembler tool will have its own chapter, that is where the code is written in that language and then compile it.
Al igual que el editor de assembler, el BASIC tendrá varios capítulos dedicados a el, ya que estudiaremos cada una de las instrucciones disponibles. As the editor of assembler, BASIC will have several chapters devoted to it, and we will study each of the commands available. Podemos adelantar que se trata de un editor bastante decente, con verificación de sintaxis y coloreado de palabras reservadas y comentarios, y que la sintaxis del BASIC es compatible en un 90% con otros BASICs mas populares, como PBP o PROTON. We anticipate that this is a pretty decent editor with syntax checking and coloring of reserved words and comments, and that the syntax of BASIC is 90% compatible with other popular BASICs as PBP or Proton. Desde aquí podemos compilar y cargar en la memoria del simulador el archivo HEX resultante en un solo paso. From here we can compile and load into memory the simulator resulting HEX file in one step.
Las herramientas siguientes son las que podemos usar como "periféricos" del microcontrolador, para simular las E/S, o analizar su estado. The following are tools we can use as "peripheral" microcontroller, to simulate the I / S, or analyze their status. La primera de este grupo es la llamada 8xLED Board que es ni mas ni menos que un grupo de 8 LEDs virtuales, a los que podemos asignar un puerto y un bit dentro de el, de manera que se enciendan o apaguen en tiempo real de acuerdo al estado de dichos pines al ejecutar la simulación. The first of this group is called 8xLED Board which is neither more nor less than a virtual group of 8 LEDs, which can assign a port and a bit within it, so as to switch on or off in real time according the state of these pins to run the simulation.
El Keypad Matrix es ni mas ni menos que un teclado matricial de 4 filas y cuatro columnas que podemos configurar con total flexibilidad para utilizarlo en nuestros proyectos simulados. The Matrix Keypad is neither more nor less than a keyboard matrix with 4 rows and four columns that you can set with complete flexibility for use in our mock draft. Se puede elegir el pin de cada fila y columna, y dinámicamente, durante la simulación, el estado de cada tecla. You can choose the pin for each row and column, and dynamically during simulation, the state of each key. En los ejemplos de los capítulos dedicados a la programación usaremos esta herramienta a menudo. The examples in the chapters on programming will use this tool often.
El LCD Module es la versión virtual del típico display LCD con controlador Hitachi que usamos en todos nuestros proyectos. The LCD Module is the virtual version of a typical LCD display with Hitachi controller we use in all our projects. Es posible configurar completamente su funcionamiento, mediante el botón Setup . You can configure your entire operation through the Setup button. Al presionarlo, la ventana aumenta su tamaño y aparecen una serie de cuadros de selección desde donde podremos elegir el numero de filas y columnas del display, el color del mismo, a que puerto están conectadas las líneas de datos y si son 4 u 8, y donde están conectadas (puerto y pin) las líneas RS, R/W y E. By pushing the button, the window increases in size and appear a series of selection boxes where we can choose the number of rows and columns of the display, the color of the same port are connected to data lines and if there are 4 or 8, and where they are connected (port and pin) RS lines, R / W and E. También se pueden configurar los tiempos de delay del display, para que su simulación sea lo mas fiel posible a la realidad. You can also configure the delay time of the display, so that your simulation is as close as possible to reality.
Graphical 128x64 LCD Module es el equivalente de la herramienta anterior, pero para simular LCDs gráficos de 128x64 pixeles. 128x64 Graphical LCD Module is equivalent to the previous tool, but to simulate graphics 128x64 pixel LCDs. Las opciones de configuración también se esconden detrás del botón Setup , y son muy similares a las ya vistas, incorporándose la posibilidad de configurar el puerto y pin de las líneas CS1 y CS2. The settings are also hidden behind the Setup button, and are very similar to those already seen, incorporating the ability to configure the port and pin lines CS1 and CS2.
Mediante las herramientas Hardware UART Simulation Interface, Software UART Simulation Interface y PC's Serial Port Terminal podremos simular una comunicación vía RS-232. Using the tools UART Simulation Interface Hardware, Software UART Simulation Interface and PC's serial port can simulate a communication terminal via RS-232. Se trata de herramientas muy completas que tendrán su propio capitulo, por lo que momentáneamente nos limitamos a mencionarlas. It is very comprehensive tool that will have its own chapter, so we just briefly mention.
Otras dos herramientas sumamente útiles para comprender que esta haciendo en cada momento el microcontrolador son el osciloscopio ( Oscilloscope ) de cuatro canales, con posibilidad total de configuración de cada uno de ellos, y el Signal Generator (generador de señales) también de cuatro canales y con posibilidad de generar pulsos de periodo y relación cíclica ajustable. Two other very useful tools to understand who is doing at every moment the microcontroller are the oscilloscope (Oscilloscope) four-channel configuration with total potential of each, and Signal Generator (signal generator) and also four channels with potential to generate pulses of adjustable period and cyclical relationship. Por supuesto, habrá capítulos en que haremos uso de ellas. Of course, there will be chapters we will use them.
No podía faltar el modulo con los displays LED de 7 segmentos, presentes en una gran cantidad de proyectos. We could not miss the module with LED displays, 7 segment present in a large number of projects. En este caso, la herramienta 7-Segment LED Display Panel nos proporciona 4 dígitos completamente configurables (nuevamente mediante el botón Setup presente en cada uno de ellos), y podemos elegir el pin al que esta conectada cada uno de los segmentos, si son de ánodo o cátodo común, etc. In this case, the tool 7-Segment LED Display Panel provides fully configurable 4-digit (again using the Setup button present in every one of them), and can choose the pin that is connected to each of the segments, if they are anode or common cathode, etc.
La ultima herramienta es una útil lista con el valor de cada una de las variables presentes en nuestro programa. The latest tool is a useful list of the value of each of the variables in our program. Recibe el nombre de Watch Variables (ver variables) y es una lista de texto donde en una columna aparece el nombre de la variable en cuestión y en otra su valor. Watch called variables (see variables) and is a list of text where a column is the name of the variable in question and another value. Esta lista se actualiza constantemente durante la simulación. This list is constantly updated during the simulation.
> Capitulo 05 - Sistemas de numeración: > Chapter 05 - numbering:
Existen muchas maneras de representar un numero. There are many ways to represent a number. De hecho, en teoría es posible hacerlo de infinitas maneras, ya que podemos elegir como base cualquier numero entero. In fact, it is theoretically possible to do it in infinite ways, because we can choose any integer base. Generalmente, los mas usados en el mundo de la programación son el sistema decimal, que utiliza como base el numero 10; el sistema binario, que utiliza como base el numero 2; y el hexadecimal, que utiliza el numero 16 como base. Generally, the most used in the programming world are the decimal system, which uses as a basis the number 10, the binary system, using as basis the number 2, and hexadecimal, which uses the number 16 as a basis.
Existen muchas maneras de representar un numero. There are many ways to represent a number. De hecho, en teoría es posible hacerlo de infinitas maneras, ya que podemos elegir como base cualquier numero entero. In fact, it is theoretically possible to do it in infinite ways, because we can choose any integer base. Generalmente, los mas usados en el mundo de la programación son el sistema decimal, que utiliza como base el numero 10; el sistema binario, que utiliza como base el numero 2; y el hexadecimal, que utiliza el numero 16 como base. Generally, the most used in the programming world are the decimal system, which uses as a basis the number 10, the binary system, using as basis the number 2, and hexadecimal, which uses the number 16 as a basis.
Sistema Decimal: Decimal System:
Como su nombre lo indica, el sistema decimal toma como base para construir los números potencias sucesivas del numero 10. As its name implies, the decimal system builds on the numbers to build successive powers of the number 10. Se utilizan los símbolos del "0" al "9", y el peso de cada cifra esta dado por su posición, dado que se multiplica por 10 elevado a la posición en que se encuentra el digito menos uno. Symbols are used "0" to "9", and the weight of each figure is given by its position, since that is multiplied by 10 raised to the position in which the digit is less than one. Como en todos los sistemas de numeración, el digito de menos "peso" es el que esta mas a la derecha, y el de mas "peso" el que se encuentra mas a la izquierda. As with all numbering systems, the digit less "weight" is the one more to the right, and the more "weight" which is the most left.
Como su nombre lo indica, el sistema decimal toma como base para construir los números potencias sucesivas del numero 10. As its name implies, the decimal system builds on the numbers to build successive powers of the number 10. Se utilizan los símbolos del "0" al "9", y el peso de cada cifra esta dado por su posición, dado que se multiplica por 10 elevado a la posición en que se encuentra el digito menos uno. Symbols are used "0" to "9", and the weight of each figure is given by its position, since that is multiplied by 10 raised to the position in which the digit is less than one. Como en todos los sistemas de numeración, el digito de menos "peso" es el que esta mas a la derecha, y el de mas "peso" el que se encuentra mas a la izquierda. As with all numbering systems, the digit less "weight" is the one more to the right, and the more "weight" which is the most left.
Potencia de 10: Power of 10: | 10^7 10 ^ 7 | 10^6 10 ^ 6 | 10^5 10 ^ 5 | 10^4 10 ^ 4 | 10^3 10 ^ 3 | 10^2 10 ^ 2 | 10^1 10 ^ 1 | 10^0 10 ^ 0 |
Valor: Value: | 10000000 10000000 | 1000000 1000000 | 100000 100000 | 10000 10000 | 1000 1000 | 100 100 | 10 10 | 1 1 |
Dado que este sistema es el que usamos todo el tiempo, no nos detenemos a pensar en como se construye cada numero, pero cuando leemos el numero "123" en realidad esta "construido" de la siguiente manera: Since this system is what we use all the time, do not stop to think about how to build each issue, but when we read the number "123" is actually "built" as follows:
(1 * 10^2) + (2 * 10^1) + (3 * 10^0) = (1 * 10 ^ 2) + (2 * 10 ^ 1) + (3 * 10 ^ 0) =
(1 * 100) + (2 * 10) + (3 * 1) = (1 * 100) + (2 * 10) + (3 * 1) =
100 + 20 + 3 = 100 + 20 + 3 =
123 123
(1 * 100) + (2 * 10) + (3 * 1) = (1 * 100) + (2 * 10) + (3 * 1) =
100 + 20 + 3 = 100 + 20 + 3 =
123 123
Sistema binario: Binary system:
El sistema binario, el ideal para usar en electrónica debido a que solo posee dos símbolos, el 0 y el 1, que pueden ser codificados como presencia o ausencia de tensión, utiliza como base el numero 2 en lugar del 10. The binary system, ideal for use in electronics because it only has two symbols, 0 and 1, which can be encoded as presence or absence of tension, builds upon the number 2 instead of 10. En todo lo demás, es exactamente igual al decimal. In everything else, is exactly equal to decimal. Si nos parece mas complicado, es solamente por que no tenemos la suficiente practica con el. If it seems more complicated, it's just that we do not have enough practice with it.
Un numero binario esta construido mediante una secuencia de dígitos binarios (que para abreviar llamamos "bits"). A binary number is constructed by a sequence of binary digits (which for short we call "bits"). Muchas veces, se agrupan de diferentes maneras para poder trabajarlos mas cómodamente, ya esas agrupaciones de les da un nombre, siendo los mas utilizados los siguientes: Many times, they are grouped in different ways to work more comfortably, and these groups gives them a name, most commonly used include:
El sistema binario, el ideal para usar en electrónica debido a que solo posee dos símbolos, el 0 y el 1, que pueden ser codificados como presencia o ausencia de tensión, utiliza como base el numero 2 en lugar del 10. The binary system, ideal for use in electronics because it only has two symbols, 0 and 1, which can be encoded as presence or absence of tension, builds upon the number 2 instead of 10. En todo lo demás, es exactamente igual al decimal. In everything else, is exactly equal to decimal. Si nos parece mas complicado, es solamente por que no tenemos la suficiente practica con el. If it seems more complicated, it's just that we do not have enough practice with it.
Un numero binario esta construido mediante una secuencia de dígitos binarios (que para abreviar llamamos "bits"). A binary number is constructed by a sequence of binary digits (which for short we call "bits"). Muchas veces, se agrupan de diferentes maneras para poder trabajarlos mas cómodamente, ya esas agrupaciones de les da un nombre, siendo los mas utilizados los siguientes: Many times, they are grouped in different ways to work more comfortably, and these groups gives them a name, most commonly used include:
Nombre Name | Tamaño (bits) Size (bits) | Ejemplo Example |
Bit Bit | 1 1 | 1 1 |
Nibble Nibble | 4 4 | 0101 0101 |
Byte Byte | 8 8 | 00000101 00000101 |
Word Word | 16 16 | 0000000000000101 0000000000000101 |
Como en cualquier sistema de numeración, los ceros a la izquierda no modifican el valor del numero representado. As in any numbering system, the zeros do not change the value of the number represented. Es muy común en el sistema binario agregar ceros a la izquierda para completar un agrupación de las anteriores. It is very common in binary add leading zeros to complete a grouping of the above. Por ejemplo, si tenemos el numero binario "101" lo podemos escribir de algunas de las siguientes maneras: For example, if we have the binary number "101" we can write some of the following ways:
Nibble Nibble | 0101 0101 |
Byte Byte | 00000101 00000101 |
Word Word | 0000000000000101 0000000000000101 |
Dentro de un byte (la agrupación de bits mas común) se numeran los bits que lo componen de acuerdo a la siguiente convención: Within a byte (the most common group of bits) are numbered the bits that compose it according to the following convention:
1) El bit ubicado mas a la derecha es el bit "cero". 1) Bit located more to the right is the bit "zero".
2) Cada bit ubicado a su izquierda recibe el numero siguiente 2) Each bit located on the left receives the following number
2) Cada bit ubicado a su izquierda recibe el numero siguiente 2) Each bit located on the left receives the following number
7 7 | 6 6 | 5 5 | 4 4 | 3 3 | 2 2 | 1 1 | 0 0 |
El bit cero recibe generalmente el nombre de LSB (least significant bit o "bit menos significativo"). The zero bit usually receives the name of LSB (least significant bit or least significant bit). De la misma manera, al ubicado mas a la izquierda se lo llama MSB (most significant bit o "bit mas significativo"). Similarly, when located more to the left is called MSB (most significant bit or most significant bit). Y nos referimos a los demás bits intermedios por su numero de bit correspondiente: bit 2, bit 3, etc. We refer to the other intermediate bits by their number of corresponding bit: bit 2, bit 3, etc..
De todo esto podemos deducir que el tipo de dato mas pequeño que podemos manejar es el bit, que solo puede tener dos valores: 1 o 0. From all this we can deduce that the smallest data type that can handle the bit, which can only have two values: 1 or 0. Estos dos estados representan generalmente "encendido" o "apagado", "verdadero" o "falso", "si" o "no", etc. These two states represent generally "on" or "off", "true" or "false", "yes" or "no", etc..
Como podemos ver en la tabla de mas arriba, el nibble es la unión de cuatro bits. As we can see from the table above, the nibble is the union of four bits. Dado que 2x2x2x2 = 16, este es el numero de valores posibles que puede tomar un nibble. Since 2x2x2x2 = 16, this is the number of possible values that can take a nibble.
La estructura mas utilizada es el byte, que agrupa 8 bits (o dos nibbles), y que puede tomar valores entre 0 y 255 (2^8 valores posibles). The most used structure is a byte, which includes 8 bits (or two nibbles) and can take values between 0 and 255 (2 ^ 8 possible values). Si tomamos dos bytes y los "pegamos" uno detrás del otro, obtenemos una palabra ( word ), que permite 65536 (2^16) valores diferentes. If we take two bytes and "paste" one after the other, we get a word (word), which allows 65536 (2 ^ 16) different values.
De todo esto podemos deducir que el tipo de dato mas pequeño que podemos manejar es el bit, que solo puede tener dos valores: 1 o 0. From all this we can deduce that the smallest data type that can handle the bit, which can only have two values: 1 or 0. Estos dos estados representan generalmente "encendido" o "apagado", "verdadero" o "falso", "si" o "no", etc. These two states represent generally "on" or "off", "true" or "false", "yes" or "no", etc..
Como podemos ver en la tabla de mas arriba, el nibble es la unión de cuatro bits. As we can see from the table above, the nibble is the union of four bits. Dado que 2x2x2x2 = 16, este es el numero de valores posibles que puede tomar un nibble. Since 2x2x2x2 = 16, this is the number of possible values that can take a nibble.
La estructura mas utilizada es el byte, que agrupa 8 bits (o dos nibbles), y que puede tomar valores entre 0 y 255 (2^8 valores posibles). The most used structure is a byte, which includes 8 bits (or two nibbles) and can take values between 0 and 255 (2 ^ 8 possible values). Si tomamos dos bytes y los "pegamos" uno detrás del otro, obtenemos una palabra ( word ), que permite 65536 (2^16) valores diferentes. If we take two bytes and "paste" one after the other, we get a word (word), which allows 65536 (2 ^ 16) different values.
Sistema hexadecimal: Hexadecimal:
Si tomamos 16 símbolos para representar los números (en lugar de dos o diez), obtenemos un sistema que se llama hexadecimal. If we take 16 symbols to represent numbers (instead of two or ten), we obtain a system called hexadecimal. A los símbolos 0..9 se agregan las letras A, B, C, D, E y F, y es un sistema de numeración muy utilizado en programación. For the symbols 0 .. 9 are added the letters A, B, C, D, E and F, and a numbering system is widely used in programming. Algunas de sus ventajas son que cada digito de un numero hexadecimal es exactamente un nibble, o que cada dos dígitos hexadecimales son un byte. Some of its advantages are that each digit of a hexadecimal number is just a nibble, or each two hexadecimal digits is a byte. Esto proporciona una forma muy compacta de representar valores. This provides a very compact way to represent values.
Si tomamos 16 símbolos para representar los números (en lugar de dos o diez), obtenemos un sistema que se llama hexadecimal. If we take 16 symbols to represent numbers (instead of two or ten), we obtain a system called hexadecimal. A los símbolos 0..9 se agregan las letras A, B, C, D, E y F, y es un sistema de numeración muy utilizado en programación. For the symbols 0 .. 9 are added the letters A, B, C, D, E and F, and a numbering system is widely used in programming. Algunas de sus ventajas son que cada digito de un numero hexadecimal es exactamente un nibble, o que cada dos dígitos hexadecimales son un byte. Some of its advantages are that each digit of a hexadecimal number is just a nibble, or each two hexadecimal digits is a byte. Esto proporciona una forma muy compacta de representar valores. This provides a very compact way to represent values.
Decimal Decimal | Binario Binary | Hexadecinal Hexadecinal |
| 1 1 | 0000 0001 0000 0001 | 1 1 |
| 10 10 | 0000 1010 0000 1010 | A A |
| 233 233 | 11101001 11101001 | E9 E9 |
| 255 255 | 1111 1111 1111 1111 | FF FF |
| 15280 15280 | 0011 1011 1011 0000 0011 1011 1011 0000 | 3BB0 3BB0 |
0 Responses to "pic tutorial"
Post a Comment