Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

ISE - Instrumentación y sistemas empotrados.

Procesadores digitales de señal, microcontroladores -no PIC-, AVR, Atmel, Arduino, Parallax, ISIS....

Jose AB

on 31 January 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of ISE - Instrumentación y sistemas empotrados.

(AVR, Arduino, Parallax Propeller, ISIS Proteus, Fritzing, Instructables, ...) DSPs y Microcontroladores http://cafe.ual.es
jaberme@ual.es José Antonio Álvarez Bermejo Líneas de trabajo
Criptografía aplicada. #micros #java
#oolong #processing language #tinkering #android #active ageing #c++ #p2p #perl networking #open frameworks #cibersecurity ¿Cómo nos vamos a organizar? ¿De qué vamos a hablar?
[1] Diferencia entre DSPs y Microcontroladores
Análisis y debate sobre la idoneidad de usar móviles, dsps, ...
[2] Microcontroladores y sensorización
ISIS proteus
Propeller Parallax
[3] Internet Of Things !!! [1] 30 minutos.
[2] 180minutos.
AVR + fritzing <30'>
Arduino <90'>
HW real y pruebas
[3] 30 minutos. DSP y/o Microcontrolador Ambos se implementan con procesadores http://en.wikipedia.org/wiki/Harvard_architecture Incluso siguen la arquitectura Harvard La línea divisoria realmente se ha difuminado http://electronics.stackexchange.com/questions/3067/what-is-the-difference-between-a-dsp-and-a-standard-microcontroller Experts says... ¿Dónde está el límite entre los dos conceptos? Un "building-block" muy interesante. AVR microcontroller Es de bárbaros considerar que un microcontrolador (RISC) es capaz de trabajar como un DSP, si a Galileo lo ajusticiaron por menos, a tí .... http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sbas203&track=no https://www.dropbox.com/s/ziv32n92zpqlk8d/an219.pdf Realmente la decisión depende de cómo programemos y del problema a resolver https://www.dropbox.com/s/yugernww508z7v8/Junio2006.pdf AVR, un microcontrolador muy potente ...¿y el tiempo real? https://www.dropbox.com/s/jnp43hpjub66e5k/06116595.pdf Simulando para aprender Una buena opción para el trabajo con DSPs y Micros AVR El "buen" amigo Arduino WASPMOTES Cómo "bichear" con ISIS Proteus Proyectos Fritzing Hardware real OMG Quizá una de las tareas más complejas es tratar de conectar dispositivos, aún habiendo leído las características. Simulémoslos Prepararlo todo para la capa superior : Arduino ! What's next ??? ¿Cómo programarlos? A formal approach... Arduino Podemos parar ahora y ver una introducción light a Arduino. Cómo preparar nuestro equipo para trabajar con Arduino https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/Swiss-AVR-Knife.pdf ¿vemos un ejemplo? Vamos a otro más sencillo (8 bits) https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/Help%253a-An-Absolute-Beginner-s-Guide-to-8-Bit-AVR-Pr.pdf Depurar https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/Debugging-AVR-code-in-Linux-with-simavr.pdf En linux... https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/Getting-started-with-ubuntu-and-the-AVR-dragon.pdf Microsoft (vsto2010) https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/Use-Visual-Studio-2010-to-Compile-AVR-Hex-Files.pdf Desde el principio https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/Start-up-Instructions-for-Programming-Microcontrol.pdf https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/dsp/Low-speed-AVR-oscilloscope.pdf Relacionado con el tratamiento de señales ... https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/dsp/Low-speed-AVR-oscilloscope.pdf Analizador de espectro acústico https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/dsp/Easy-Atmel-Xmega-Sine-Wave-Generator.pdf Generador de ondas https://www.dropbox.com/s/w0c6baim73e6lfe/How-to-choose-a-MicroController.pdf Cómo elegir el microcontrolador o el DSP si ese fuera el caso ArduLAB en realidad estamos instalando el avr-gcc Práctica WASPMOTES Práctica PROPELLER (PARALLAX) Some hacks https://dl.dropbox.com/u/10908941/MasterISEDOCS/AVR/Getting-started-C-programming-Atmel-AVR.pdf en c! http://winavr.scienceprog.com/ http://www.atmel.com/Images/novice.pdf Lo elemental The Internet of Things Comenzando... Atmel Atmega328. The “328” is a 28 pin,
8-bit microcontroller. The architecture is based on the Reduced Instruction Set Computer (RISC)
concept which allows the processor to complete 20 million instructions per second (MIPS) when
operating at 20 MHz! El núcleo: • Memory system,
• Port system,
• Timer system,
• Analog-to-digital converter (ADC),
• Interrupt system,
• and the Serial communications. Programar un robot Cómo abordar el problema con un microcontrolador Memoria The ATmega328 is equipped with three main memory sections: flash electrically erasable programmable read only memory (EEPROM), static random access memory (SRAM), and byteaddressable
EEPROM for data storage. ISP
Bulk programmable flash EEPROM is used to store programs. It can be erased and programmed
as a single unit. Also, should a program require a large table of constants, it may be included as a
global variable within a program and programmed into flash EEPROM with the rest of the program.
Flash EEPROM is nonvolatile meaning memory contents are retained when microcontroller power
is lost.The ATmega328 is equipped with 32K bytes of onboard reprogrammable flash memory. This
memory component is organized into 16K locations with 16 bits at each location. Byte-addresable
Byte-addressable memory is used to permanently store and recall variables during program execution.
It too is nonvolatile. It is especially useful for logging system malfunctions and fault data during
program execution. It is also useful for storing data that must be retained during a power failure but
might need to be changed periodically. Examples where this type of memory is used are found in
applications to store system parameters, electronic lock combinations, and automatic garage door
electronic unlock sequences. The ATmega328 is equipped with 1024 bytes of EEPROM. Static RAM memory is volatile. That is, if the microcontroller loses power, the contents of SRAM
memory are lost. It can be written to and read from during program execution. The ATmega328
is equipped with 2K bytes of SRAM. A small portion of the SRAM is set aside for the general
purpose registers used by the processor and also for the input/output and peripheral subsystems
aboard the microcontroller. A complete ATmega328 register listing and accompanying header file
is provided in Appendices A and B, respectively. During program execution, RAM is used to store
global variables, support dynamic memory allocation of variables, and to provide a location for the
stack. The Atmel ATmega328 is equipped with four, 8-bit general purpose, digital input/output (I/O)
ports designated PORTA, PORTB, PORTC, and PORTD. All of these ports also have alternate
functions, each port has three registers associated with it
• Data Register PORTx —- used to write output data to the port.
• Data Direction Register DDRx —- used to set a specific port pin to either output (1) or input (0).
• Input Pin Address PINx —- used to read input data from the port. The ATmega328 is equipped with a complement of timers which allows the user to generate a
precision output signal, measure the characteristics (period, duty cycle, frequency) of an incoming
digital signal, or count external events. Specifically, the ATmega328 is equipped with two 8-bit
timer/counters and one 16-bit counter. The ATmega328 is equipped with a host of different serial communication subsystems including
the Universal Synchronous and Asynchronous Serial Receiver andTransmitter (USART), the serial
peripheral interface (SPI), and the Two-wire Serial Interface. The ATmega328 is equipped with an eight channel analog to digital converter (ADC) subsystem.
The ADC converts an analog signal from the outside world into a binary representation suitable for
use by the microcontroller. The ATmega328 ADC has 10 bit resolution. This means that an analog
voltage between 0 and 5 V will be encoded into one of 1024 binary representations between (000)16
and (3FF)16. This provides the ATmega328 with a voltage resolution of approximately 4.88 mV. //include files
//function prototypes
A list of functions and their format used within the program
//program constants
#define TRUE 1
#define FALSE 0
#define ON 1
#define OFF 0
//interrupt handler definitions
Used to link the software to hardware interrupt features
//global variables
Listing of variables used throughout the program
//main program
void main(void)
body of the main program
//function definitions
A detailed function body and definition
for each function used within the program Programación AVR-C Vamos a entrar ahora en processing language para hacer lo mismo ... ¿es más fácil? Ventajas de avr-c : interrupciones Interrupts are functions that are written by the programmer but usually called by some hardware
event during system operation Tomando como ejemplo el robot El sensor central IR del robot se conecta al DAC a través del pin 1.
El sensor genera una salida inversamente proporcional a la distancia de la pared
Si deseamos iluminar un led cuando el robot esté < 10 cm -> 2.5 voltios a 10cm if (PORTC[1] > 2.5) {
PORTB = 0x02; //LED on PORTB[1]
PORTB = 0x00; //extinguish the LED on PORTB[1]
} Vamos a comenzar con el robot we modify the robot platform by equipping it with
three Sharp GP12D IR (sparkfun electronics) The IR sensor provides a voltage output that is inversely proportional to the sensor distance from the maze wall. It is desired to illuminate the LED if the robot is within 10 cm of the maze wall. The sensor provides an output voltage of 2.5 VDC at the 10 cm range The output from the IR sensor will be converted from an analog to a digital
value using the built-in Arduino “analogRead” function. The “analogRead” function requires the pin for analog conversion variable passed to it and returns the analog signal read as an integer value (int) from 0 to 1023. So, for this example, we need to declare an integer value to receive the returned value.We have called this integer variable “IR_sensor_value.” Sistemas empotrados An embedded system contains a microcontroller to accomplish its job of processing system inputs and generating system outputs. The link between system inputs and outputs is provided by a coded algorithm stored within the processor’s resident memory.What makes embedded systems design so interesting and challenging is the design must also take into account the proper electrical interface for the input and output devices, limited on-chip resources, human interface concepts, the operating environment of the system, cost analysis, related standards, and manufacturing aspects Proceso (usando UML) Descripción del proyecto (condiciones, etc)
Busqueda de información sobre los items del paso 1 (codigos, protocolos, y estándares relacionados con el proyecto).
Prediseño: diseños alternativos (selección de las caracteristicas del microcontrolador, ADC, PWM, ..)
Diseño. Buena idea usar un diagrama de actividad de UML.
Documentación Robot Descripción del problema y búsqueda de información: Modificar Blinky 602A para que sea controlado por un Arduino Duemilanove.

Reemplazamos la circuitería de control analógica por el Arduino Duemilanove. Modificamos la funcionalidad del robot, de ser un "sigue líneas" a ser capaz de detectar muros. Requirements: navegar siguiendo marcas en los muros sin tocarlos. El robot usará sus sensores Sharp IR y tomará decisiones para evitar la colisión.

•3 sensores Sharp IR
• 2 ruedas propulsadas Blinky 602A y una rueda drag .
• Arduino Duemilanove processing board.
• (LEDs) como si fueran intermitentes
• LEDS para cada IR indicando que ha detectado una pared. Prediseño: arduino :) Diseño (circuito) Diagrama de estructura UML robot https://www.dropbox.com/s/zsv7lutem1srgvb/codigoRobot.doc avanzado https://dl.dropbox.com/u/10908941/MasterISEDOCS/ArduinoSerial/arduinoEmbedded%28serial%29.pdf https://dl.dropbox.com/u/10908941/MasterISEDOCS/ArduinoExperot/arduinoInterfaces.pdf Multi-core architecture

Each of the eight 32-bit cores (called a cog) has a CPU which has access to 512 32-bit long words (2 KB) of instructions and data. Self-modifying code is possible and is used internally, for example by an instruction that is used to create a subroutine call/return mechanism without the need for a stack. Access to shared memory (32 KB RAM; 32 KB ROM) is controlled in round-robin fashion by an internal bus controller called the hub. Each cog also has access to two dedicated hardware counters and two special "video registers" for use in generating PAL, NTSC, VGA, servo-control, or other timing signals.[3] http://en.wikipedia.org/wiki/Parallax_Propeller
Full transcript