Retis.sssup.it The dsPic33 and FLEX board Paolo Pagano RETIS Laboratory, Scuola Superiore Sant'Anna, Pisa, Italy Corso di Sistemi in.

Slides:



Advertisements
Similar presentations
Corso di Sistemi in Tempo Reale Laurea in Ingegneria dell‘Automazione a.a Paolo Pagano
Advertisements

Corso di Sistemi in Tempo Reale Laurea in Ingegneria dell‘Automazione a.a Paolo Pagano
MM Player Supervised by: Dr. Luai Malhis. Prepared by: Mustafa Assaf & Mahmoud Musa.
1 iHome Automation System Home Automation System Team: Million Dollar Contingency Regiment Adam Doehling Chris Manning Ryan Patterson.
StreamBlade SOE TM Initial StreamBlade TM Stream Offload Engine (SOE) Single Board Computer SOE-4-PCI Rev 1.2.
Lab7: Introduction to Arduino
Multi-DNC Data Collection/Monitoring
Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
MotoHawk Training Model-Based Design of Embedded Systems.
Travis Reed Todd Hummel Kwan-Truc. Concept USB 1.1 SPI b.
Guitar Effects Processor Critical Design Review October, 07, 2003 Groups Members: Adam Bernstein Hosam Ghaith Jasenko Alagic Matthew Iyer Yousef Alyousef.
Systems Programming Course Gustavo Rodriguez-Rivera.
Aztec PC Scope Preliminary Design Review Fall 2006 Michael MasonJed Brown Andrew YoungsJosh Price.
Coordinate Based Tracking System
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Introduction.
ASPPRATECH.
Lab 4 ZigBee & with PICDEM Z Boards 55:088 Spring 2007.
Introduction to the Raw Handheld Board Jason Miller, David Wentzlaff, Nathan Shnidman.
Technion-Israel Institute of Technology Electrical Engineering Department High Speed Digital Systems Laboratory Project subject: wireless biofeedback system.
PIC microcontrollers. PIC microcontrollers come in a wide range of packages from small chips with only 8 pins and 512 words of memory all the way up to.
Silicon Labs ToolStick Development Platform
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
Final Year Project Presentation A Remote FPGA Laboratory Environment David Hehir 4 th Year EE Supervisor: Fearghal Morgan.
Peripherals and their Control An overview of industrially available “peripheral devices” that use “pulse-width modulation” for information passing. Review.
COE4OI5 Engineering Design Chapter 2: UP2/UP3 board.
Lab 4 ZigBee & with PICDEM Z Boards 55:088 Fall 2006.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Daniel Pickem and Rowland O’Flaherty 12/04/2012 Mechatronics (ME 6405) Student Lecture On Arduinos *Some slides courtesy of Eoin Brazil
Introduction to PIC-C. Required Software PIC-C Compiler Firmware Downloader Driver for the USB->Serial Adapter.
Microprocessors A practical approach Subjects Goals for this module Results Subjects of the module Plans Questions.
Page 1 D&C EBV Seminar June 2003 Motor Demo C868 Chevillot/Jansen June 2003 N e v e r s t o p t h i n k i n g. Infineon C868 Hands On Training CAPCOM6.
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
Altera Technical Solutions Seminar Schedule OpeningIntroduction FLEX ® 10KE Devices APEX ™ 20K & Quartus ™ Overview Design Integration EDA Integration.
Other Chapters From the text by Valvano: Introduction to Embedded Systems: Interfacing to the Freescale 9S12.
Franz Duran INTRODUCTION TO A RDUINO PROGRAMMING & INTERFACING Engr. Franz Duran, MEP-ECE RapidSignal Electronics.
GRECO - CIn - UFPE1 A Reconfigurable Architecture for Multi-context Application Remy Eskinazi Sant´Anna Federal University of Pernambuco – UFPE GRECO.
ECS642U Embedded Systems Digital I/O William Marsh.
Speaker Control SYSTEM
Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
© 2008 RoboRubik1 11 Technical Communication Skills Practicum Theory of Operation and Hardware Design Narrative.
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
ECS642U Embedded Systems Cyclic Execution and Polling William Marsh.
Introduction to PIC-C. Installing PIC-C Goto Username/pass = guest/cpecmu Download and install:  IDEUTIL  PCWHD.
Engineering H193 - Team Project Gateway Engineering Education Coalition Lab 1P. 1Spring Quarter Introduction to Sensors Lab 1.
Nick Kwolek David Duemeler Martin PendergastStephen Edwards.
Welcome to the world of ARM. COURSE CONTENT Module 1: Introduction  Introduction of ARM Processors  Evolution of ARM  32 - bit Programming Module 2:
ChibiOS/RT Demo A free embedded RTOS
Teaching Digital Logic courses with Altera Technology
438 labs. Labs Lab 1: Refreshing C and Linux Programming 2 Lab 1: Refreshing C and Linux Programming 2 – First: Getting familiar with development.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Lab Environment and Miniproject Assignment Spring 2009 ECE554 Digital Engineering Laboratory.
4000 Imaje 4020 – Software Imaje 4020 – Content ■ Content of Chapter Software: 1. Flash Up 2. Netcenter 3. FTP 4. Active X 5. XCL commands 6. Exercise.
Introduction to EV3. Many Different Types of Robots Snake Robot.
SA developed mini-PCIe IO card By Peet Smit. RS282 x8 USB x4 WLAN Video Capture LVDS Display SATA x4 mSATA-half LAN x2 3G & SIMM Digital IO.
Networked Embedded Systems Pengyu Zhang EE107 Spring 2016 Lecture 8 Serial Buses.
A Quick Start Guide to PIC16F877 microcontroller And Microchip Development Environment A Quick Start Guide to PIC16F877 microcontroller And Microchip Development.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
iHome Automation System
Chapter 3 General-Purpose Processors: Software
Vinculum II Development Modules
Input/Output Ports and Interfacing
Microprocessor Systems Design I
COMP211 Computer Logic Design Introduction to the DE2 Board
RAILWAY TRACK SNAP NOTIFICATION
Getting Started with Programmable Logic
ECE 3551 Microcomputer Systems 1
Introduction to Microprocessors and Microcontrollers
Lab 1. Introduction to the DE2 Board
Presentation transcript:

retis.sssup.it The dsPic33 and FLEX board Paolo Pagano RETIS Laboratory, Scuola Superiore Sant'Anna, Pisa, Italy Corso di Sistemi in Tempo Reale Laurea in Ingegneria dell‘Automazione a.a

retis.sssup.it Course Outline (1/2) Second day (24 th ) FSM implementation in C (slides by prof. Di Natale) A case study Real Hardware demonstration

retis.sssup.it Outline Introduction to the FLEX board A FSM instantiation on the FLEX Visit the web site:

retis.sssup.it FLEX idea: cheap, small, easy-to-use evaluation boards Typical applications: industrial sensing and control small robots wireless sensor networks demo boards for university labs embedded boards

retis.sssup.it Flex

retis.sssup.it board layout

retis.sssup.it add-on boards mm pattern mm alternate pattern (RJ45 / RS232 connectors) mm pattern (SMD components) mm pattern (clamps) breadboard

retis.sssup.it add-on boards 1 - Serial port 2 (RS232 / RS422 / RS485 / TP-UART) 2 - Serial port 1 (RS232 / RS422 / RS485) 3 - CAN port CAN port I2C port 6 - SPI port Mbit Ethernet 8 - RJ45 Ethernet multibus

retis.sssup.it Our test device It is an extended basic flex board; We connected the dsPic33 core to: Set of buttons (input); Set of leds (output); LCD display (status display). We have in mind to simulate an elevator controller: its implementation starts from FSM modeling; the model is validated by OTS tools (Uppaal); the code generation is done by hand.

retis.sssup.it How to program our device Our FLEX board should run a specific program (firmware); We need a compiler to translate from C to machine code; We need a linker command file that allows the test code to be targeted to the dsPIC33; We need a tool to transfer the firmware from the PC to the MCU flash memory. MPLAB_C30 gld script Microchip ICD2

retis.sssup.it COFF file structure

retis.sssup.it Peripheral Mapping Expansion Board PIN I/O: Leds -> PortD (output) But’s -> PortG (input) LCD -> PortA (output)

retis.sssup.it MCU I/O A port is a set of analog/digital enabled pins. A port can be configured to catch analog or digital inputs. Digital signals can have a duration (like those generated by pushing buttons) or can be “levels” (latch mode). of course finite signals must be caught while high.

retis.sssup.it How to configure ports dsPic has 7 ports defined in the included header: #include "p33FJ256MC710.h" Configuring a port for OUTPUT void initLeds (void) { TRISDbits.TRISD0 = 0; TRISDbits.TRISD1 = 0; TRISDbits.TRISD2 = 0; TRISDbits.TRISD3 = 0; TRISDbits.TRISD4 = 0; TRISDbits.TRISD5 = 0; TRISDbits.TRISD6 = 0; TRISDbits.TRISD7 = 0; TRISDbits.TRISD8 = 0; TRISDbits.TRISD9 = 0; TRISDbits.TRISD10 = 0; TRISDbits.TRISD11 = 0; TRISDbits.TRISD12 = 0; TRISDbits.TRISD13 = 0; TRISDbits.TRISD14 = 0; TRISDbits.TRISD15 = 0; }: Configuring a port for INPUT: void initButtons (void) { TRISGbits.TRISG6 = 1; TRISGbits.TRISG7 = 1; TRISGbits.TRISG8 = 1; TRISGbits.TRISG9 = 1; } 4 Buttons 16 pels of the LCD

retis.sssup.it How to read/write ports Writing OUTPUT: void setLed ( int led, int on_off ){ switch (led){ case 0: LATDbits.LATD0 = on_off; break; case 1: LATDbits.LATD1 = on_off; break; case 2: LATDbits.LATD2 = on_off; break; case 3: LATDbits.LATD3 = on_off; break; } Reading INPUT: int getButton ( int j ){ switch (j){ case 0: return !PORTGbits.RG6; case 1: return !PORTGbits.RG7; case 2: return !PORTGbits.RG8; case 3: return !PORTGbits.RG9; }

retis.sssup.it the end Questions ?

retis.sssup.it HOWTO initialize and transit static enum State { IDLE, S0, S1, S2, S3 }; static enum Signal { ABSENT, GO_TO_S0, GO_TO_S1, GO_TO_S2, GO_TO_S3 }; void FSMInit(FSM *me){ me->state_ = IDLE; } void FSMTran_(FSM *me, unsigned int dest) { me->state_ = dest; } enum Signal FSMGetSignals(FSM *me){ if (b0) return GO_TO_S0; else if (b1) return GO_TO_S1; else if (b2) return GO_TO_S2; else if (b3) return GO_TO_S3; return ABSENT; } init transition signal generation