Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
RealReal--TimeTime SystemsSystems LaboratoryLaboratory
RETIS LabRETIS Lab
Mauro Mauro MarinoniMarinoni [[[email protected]@evidence.eu.com]]
FLEX FLEX DevelopementDevelopement
EnvironmentEnvironment
OverviewOverview
��The MicrocontrollerThe Microcontroller
��The Flex BoardThe Flex Board
��Expansion boardsExpansion boards
��MultibusMultibus boardboard
��Demo boardDemo board
��How to:How to:
��Compile demoCompile demo
��Flash & RunFlash & Run
��DemosDemos
The The MicrocontrollerMicrocontroller
��The Microchip 16bit microcontrollers present:The Microchip 16bit microcontrollers present:
��16 bit (data) modified16 bit (data) modified--Harvard RISC architecture;Harvard RISC architecture;
��HighHigh--performance MCU capability;performance MCU capability;
�� Integrated DSP capability (Integrated DSP capability (dsPICdsPIC families);families);
��Separate program and data buses;Separate program and data buses;
��Powerful peripherals on chip;Powerful peripherals on chip;
�� Idle & Sleep modes;Idle & Sleep modes;
��Switch between clock sources in realSwitch between clock sources in real--time;time;
��Flexible Interrupt structureFlexible Interrupt structure..
dsPIC microcontrollerdsPIC microcontroller
��Microcontrollers basic features:Microcontrollers basic features:
�� 1616--bit core up to 40 MIPS a 80 MHz;bit core up to 40 MIPS a 80 MHz;
�� Integrated DSP Module;Integrated DSP Module;
�� 6KB6KB--256KB Flash Program Memory;256KB Flash Program Memory;
�� 256B256B--32Kb RAM Data Memory;32Kb RAM Data Memory;
�� Up to 4 DMA channels;Up to 4 DMA channels;
�� Up to 8 16Up to 8 16--bit Comparators;bit Comparators;
�� Up to 8 PWM Generators;Up to 8 PWM Generators;
�� Up to 8 16Up to 8 16--bit Timers (32 bit mode).bit Timers (32 bit mode).
dsPIC microcontrollerdsPIC microcontroller
��Microcontroller I/O capabilities:Microcontroller I/O capabilities:
��Up to 86 I/O pins16 channels;Up to 86 I/O pins16 channels;
��A/D module with:A/D module with:
�� Up to 2 A/D converters;Up to 2 A/D converters;
�� 500KSPS@12500KSPS@12--bitbit
��1MSPS@101MSPS@10--bitbit
��Motor Control Motor Control PWMsPWMs
��QuadratureQuadrature Encoder InterfaceEncoder Interface
��Analog ComparatorsAnalog Comparators
dsPIC microcontrollerdsPIC microcontroller
��Microcontroller Connectivity:Microcontroller Connectivity:
��UART ports (UART ports (IRDaIRDa support)support)
��CAN bus version 2.0A/BCAN bus version 2.0A/B
��Data Convert Interface (IData Convert Interface (I22S/AC97)S/AC97)
��Parallel Master PortParallel Master Port
�� II22C / C / SMBusSMBus
��SPI busSPI bus
Why another Why another
Evaluation Board?Evaluation Board?
�� FLEX:FLEX:�� small size (7x10 cm)small size (7x10 cm)
�� 100 pin dsPIC100 pin dsPIC
�� all pins free on connectorsall pins free on connectors
�� 2.54 pitch, no SMD expertise required!2.54 pitch, no SMD expertise required!
��PIC18 for USB connectionPIC18 for USB connection
�� Typically, demo boards are:Typically, demo boards are:�� big!big!
�� limited pin counts MCUlimited pin counts MCU
��most of the pins used for most of the pins used for LEDsLEDs, buttons, , buttons, ……
�� difficult to expand!difficult to expand!
�� poor connection with development PCpoor connection with development PC
FLEX: other featuresFLEX: other features
��switching power supplyswitching power supply
��resettableresettable fusesfuses
��dsPICdsPIC programming from USBprogramming from USB
��daughter boards (Thru Hole, CAN, daughter boards (Thru Hole, CAN,
SPI, Ethernet, RS232, RS485, SPI, Ethernet, RS232, RS485,
RS422, RS422, ……[other coming soon] )[other coming soon] )
��support support fotfot ERIKA O.S.ERIKA O.S.
FLEX: versionsFLEX: versions
LightLight
FullFull
FLEX: FLEX: addadd--on boardson boards
Available:Available:
��Thru HoleThru Hole
��MultibusMultibus(CAN, SPI, I2C, (CAN, SPI, I2C,
Serial, Ethernet, Serial, Ethernet,
KonnexKonnex))
��DemoBoardDemoBoard
FLEX: FLEX: MultibusMultibus boardboard
11 -- Serial port 2Serial port 2(RS232 / RS422 / RS485 / (RS232 / RS422 / RS485 /
TPTP--UART)UART)
22 -- Serial port 1Serial port 1(RS232 / RS422 / RS485)(RS232 / RS422 / RS485)
33 -- CAN port 1CAN port 1
44 -- CAN port 2CAN port 2
5 5 -- I2C portI2C port
66 -- SPI port SPI port
77 -- 10Mbit Ethernet10Mbit Ethernet
88 -- RJ45 EthernetRJ45 Ethernet
FLEX: Demo Board FLEX: Demo Board
LCD 2x16LCD 2x16
8 LED8 LED
4 buttons4 buttons
33--Axis AccelerometerAxis Accelerometer
2 channels DAC2 channels DAC
Temperature sensorTemperature sensor
Light sensorLight sensor
Infrared I/OInfrared I/O
RS232/485/422 socketRS232/485/422 socket
Why an embedded O.S. ?Why an embedded O.S. ?
��It reduces the complexity of the It reduces the complexity of the
application;application;
��It increases the reusability of the code;It increases the reusability of the code;
��It simplify the SW debugging;It simplify the SW debugging;
��It reduces the time to market:It reduces the time to market:
��......
Why a Why a RealReal--TimeTime
embedded O.S. ?embedded O.S. ?
��An embedded applications typically An embedded applications typically
presents a lot of presents a lot of interactionsinteractions with the with the
environment;environment;
��That requires a management of the That requires a management of the
response timeresponse time to an external event.to an external event.
ERIKA EnterpriseERIKA Enterprise
ERIKA EnterpriseERIKA Enterprise
�� OSEKOSEK--like RTOS for minimal embedded systemslike RTOS for minimal embedded systems
�� 11--4 Kb ROM footprint4 Kb ROM footprint
�� enhanced scheduling algorithmsenhanced scheduling algorithms
�� support for debug tools (support for debug tools (LauterbachLauterbach, ICD2), ICD2)
RTRT--DruidDruid
�� RTOS configuration using OSEK OILRTOS configuration using OSEK OIL
�� schedulabilityschedulability analysisanalysis
�� integrated in integrated in eclipse.orgeclipse.org
Erika Erika -- supported MCUsupported MCU
Currently available as a product for:Currently available as a product for:
�� Microchip dsPICMicrochip dsPIC
�� AtmelAtmel AVRAVR
�� Altera NIOS II Altera NIOS II (with multi(with multi--core support!)core support!)
Also available for:Also available for:
�� ARM7TDMI ARM7TDMI
(Samsung KS32C50100, (Samsung KS32C50100, TriscendTriscend A7, ST Janus, ST STA2051)A7, ST Janus, ST STA2051)
�� Hitachi H8 (RCX/Lego Hitachi H8 (RCX/Lego MindstormsMindstorms))
�� TricoreTricore 11
�� PPC 5xx (PPC 566EVB)PPC 5xx (PPC 566EVB)
�� C167/ST10 (C167/ST10 (ErtecErtec EVA 167, tiny/large EVA 167, tiny/large memmem. model). model)
Development ChainDevelopment Chain
��To obtain a running demo:To obtain a running demo:
��HardwareHardware::
��FLEX Board;FLEX Board;
��Microchip ICD2; Microchip ICD2;
��SoftwareSoftware::
��Microchip Microchip MPLabMPLab IDE;IDE;
��Microchip C30 compiler;Microchip C30 compiler;
��Evidence Evidence Erika EnterpriseErika Enterprise..
Erika PackageErika Package
��It contains:It contains:
��CygwinCygwin Environment;Environment;
��EclipseEclipse 3.3;3.3;
��RTRT--DruidDruid pluginplugin;;
��Erika EnterpriseErika Enterprise Kernel;Kernel;
��Erika support for Erika support for ScicosScicos code generator.code generator.
Eclipse EnvironmentEclipse Environment
EditorEditor
ProjectsProjects
OutputOutput
My DemoMy DemoCreate from templateCreate from template
File File →→ New New →→ RTRT--DruidDruid Oil and C/C++ ProjectOil and C/C++ Project
My DemoMy DemoCompile the codeCompile the code
It uses It uses makefilemakefile and C30 compiler to produce the and C30 compiler to produce the
executable for the target architecture.executable for the target architecture.
My DemoMy DemoImport and Flash in Import and Flash in MPLabMPLab
��Configure Configure →→ Select DeviceSelect Device……
��Choose dsPIC33FJ256MC710Choose dsPIC33FJ256MC710
��Programmer Programmer →→ Select Programmer Select Programmer →→
→→ MPLAB ICD2MPLAB ICD2
��File File →→ ImportImport
��Find the pic30.cof inside Find the pic30.cof inside ProjectDirProjectDir/Debug/Debug
��Programmer Programmer →→ ConnectConnect
��Programmer Programmer →→ ProgramProgram
��Programmer Programmer →→ Release from ResetRelease from Reset
My DemoMy DemoView the code in View the code in MPLabMPLab
My DemoMy DemoDebug the code in Debug the code in MPLabMPLab
RunRun MenuMenu
BreakPointBreakPoint
StackStack
PointerPointer
BreakPointBreakPoint
MenuMenu
RAMRAM
StatusStatus
HW demosHW demos
��XBeeXBee, compass, ultrasound receiver, compass, ultrasound receiver
��TCP/IP demoTCP/IP demo
��DC Motor identificationDC Motor identification
HW demosHW demos
�� ImageImage transfer transfer usingusing 802.15.4802.15.4
��FLEX BoardFLEX Board
��ERIKA ERIKA EnterpriseEnterprise
��ChipconChipcon 2420 2420 TransceiverTransceiver
��CMOS CameraCMOS Camera
��Microchip MAC Microchip MAC LayerLayer
QuestionsQuestions
Mauro MarinoniMauro Marinoni[[[email protected]]]
��RetisRetis::
��http://http://retis.sssup.itretis.sssup.it
��Evidence:Evidence:
�� http://http://www.evidence.eu.comwww.evidence.eu.com
��ScilabScilab::
��http://http://www.scilab.orgwww.scilab.org
RealReal--TimeTime SystemsSystems LaboratoryLaboratory
RETIS LabRETIS Lab