Microcontroller WEBENCHTM Application Builder - PowerPoint PPT Presentation

About This Presentation
Title:

Microcontroller WEBENCHTM Application Builder

Description:

To evolve the code and compile / build the executable, use Classic IDE ... After a successful build, and your code is at a point where you want to debug ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 66
Provided by: Richar2
Category:

less

Transcript and Presenter's Notes

Title: Microcontroller WEBENCHTM Application Builder


1
Microcontroller WEBENCHTMApplication Builder
  • by National and Unis

2
WEBENCHTM web Processor Expert?
  • Microcontroller Application development
    design/implementation/verification/optimization
    in FOUR steps
  • Select a part
  • Specify behavior/Create design
  • Compile and Build
  • Simulate and Debug
  • http//www.national.com/appinfo/webench/mcu

3
Microcontroller WEBENCHTMFour Easy Steps
Order HW boards/parts SW comp,debug,ISE
Enter Specifications
SIM Debug code Including external I/O stimulus
GIDE Configure core, peripherals Auto-generat
e Code
Build Prototype
Select Best Part
CIDE Customize main loop/events integrate
libraries Generate Object
4
Microcontroller WEBENCHTM Benefits
  • Fastest possible software design cycle
  • Easy intuitive peripheral configuration
  • No need to learn register details
  • Automatic code driver generation
  • Online, real-time design and device check
    feature
  • Conflicts are caught upfront, before code is
    developed
  • Compare devices automatic code update for each
    new chip selected and port to other MCUs

5
Microcontroller WEBENCHTM Benefits
  • Spend all of your time on the personalization
  • 90 of code (main structure all drivers) are
    auto-generated
  • Focus on the important 10 for unique products,
    easily reuse code between projects
  • Summary
  • Minimized development time and cost
  • Efficient use of engineering resources
  • Easy to modify solutions
  • Easy to port to different MCUs and find the
    optimum

6
Whats BehindMicrocontroller WEBENCHTM?
  • Interactive Selection Guide (ISG) for MCU
  • Up to 40 Parameter Matching Search
  • Graphical IDE (GIDE) w/Embedded Beans
  • Automated Object Oriented Code Generation
  • Access/Configure device features Properties,
    Methods and Events. Drivers are auto-generated,
    include only those routines that are needed
  • Automatic design check and suggestion to adjust
    conflicts with visual warnings resource meter

7
Whats BehindMicrocontroller WEBENCHTM?
  • Classic IDE for custom code development
  • Personalize your main loop and customize the
    events, add code from National or your libraries
  • Generate HEX and COFF binaries
  • Analyze Simulate debug design implementation
  • View/Change CPU status, memory, registers, etc.
  • Setup/Apply external stimuli directly or from
    tests
  • Set breakpoints, control operation, see results
  • Build It!
  • Access final burnable object, use the file
    manager
  • Order links for boards/emulators/off-line tools

8
Microcontroller WEBENCH Home Page
Start by using one of 3 methods
Parametric Search Supported MCU List Reference D
esign Or Access one of your existing designs
Note you will need the JavaTM 2 Runtime
Environment (JRE) plug-in version 1.3 to Create a
Design
9
Webench Choose a Part Design Requirements
A
A - Enter the parameters that define your
project B - Set your preference for each paramete
r, R for required and 1, 3 or 5 for preferred
C - Submit Search
C
B
10
Webench Choose a Part Recommended Devices
Use the list to compare various choices
Go to the next step - Create a Design by choosin
g the device that best matches your design
requirements
11
Webench Choose a Part from the support list
  • OR
  • You can choose from a listing of all of the
    parts supported by GIDE, CIDE and Simulator

12
WEBENCH Choose a Part from Reference Designs
  • OR
  • You can access a complete list of the ref.
    projects listed by microcontroller family
  • Since these are complete projects, you can access
    the appropriate tool directly (GIDE, CIDE,
    Simulator)
  • You can save the reference as your own design and
    evolve/change as necessary!
  • Link to order designs and tools

13
What Did We Just Accomplish?
  • Saved time
  • Option to quickly search on desired parameters
    based on WEBENCH supported microcontrollers
  • Started with one of the many reference designs
    that are available
  • Improved design quality
  • Selected from a list of microcontroller solutions
    appropriate for your design criteria
  • Option to inherit a complete reference design to
    modify according to your specific application
  • Prioritized requirements and chose the best
    microcontroller based on a clear comparison of
    parts
  • Saved money
  • Chose the most cost effective solution by
    comparing microcontrollers side by side

14
WEBENCH Create a Design
Once you have chosen you part, you enter Create a
Design If you are a 1st time user, Help refer
ence documentation is available
Launch your design using the Graphical IDE I
f you are returning or just want to write your
code from scratch use the Classic IDE
15
Tutorial projectGIDE - Setting the CPU Bean
  • When creating a new project and opening all the
    Graphical IDE windows, it is possible to set the
    CPU Bean.
  • This can be done in the inspector window. Please
    click on CPU bean to select it.

16
GIDE - CPU Properties
  • In the Inspector window set the following
    property - Reg. main Xtal freq. MHz.
  • Select the item.

17
GIDE Setting the CPU Frequency
  • Set the value of crystal frequency Reg. main Xtal
    freq. MHz to 3.27MHz.
  • The other settings of the CPU bean for this
    tutorial is already set by default.

18
GIDE Add LED Output Port
  • In the following steps you will add and set the
    output bean used for LED.
  • In Workspace click right mouse button on Port C
    pin C5.
  • Pop-up menu will be shown.

19
GIDE - PinIO
  • In the pop-up menu choose bean template PinIO (as
    pin-output for the LED).
  • Bean will be added to desired block.

20
GIDE PinIO Properties
  • Now you have added the bean to your project.
  • All necessary properties of the bean will be
    set.
  • Click on Direction item in the Inspector window,
    the list of possible values will be shown.

21
GIDE PinIO Output
  • Set the value to Output

22
GIDE PinIO Initial Value
  • Set the Initialization value to 1.
  • Click on change icon on Init. value item to
    change the value.
  • LED will be switched ON after processor
    initialization, when the initial value is set to
    1.

23
GIDE PinIO Methods
  • Now bean methods will be specified which will be
    generated in the project.
  • Click on Methods tab in the Inspector window.

24
GIDE PinIO Generate NegVal Method
  • Select method NegVal that inverts the value on
    the pin output
  • Click on the change icon to generate (or not) the
    methods code

25
GIDE PinIO Dont Generate Other Methods
  • Only the NegVal method is used in this course, it
    is recommended to set all the other methods as
    "don't generate code".
  • Set these values using the same way as the
    previous method was set.

26
GIDE Interrupt Bean
  • Now you have inserted the output bean for the LED
    on pin C5 on port C.
  • In the following step you will add and set the
    interrupt bean.
  • Click on pin T0_TimeBase in the Timer T0 by right
    mouse button, a pop-up menu will be shown.

27
GIDE Add Periodic Interrupt
  • Select the PeriodicInterrupt item and the bean
    will be added to block Timer T0

28
GIDEInterrupt Properties
  • Now you have added the bean to your project.
  • All necessary properties of the bean will be
    set.
  • Click on Properties tab in the Inspector window.

29
GIDE - Interrupt Period
  • Click on Interrupt period item.

30
GIDE - 100ms Interrupt Period
  • Set the Interrupt period value to 100ms.
  • The other setting of the Interrupt bean for this
    tutorial is already set by default.

31
GIDE Bean Selector
  • The Bean Selector can be found in the
    Project/Bean/
  • Library window
  • The Bean Selector shows all beans available to
    this device
  • You can change any bean in the design
  • Change the CPU to trade-off designs issues, any
    conflicts will be flagged

32
GIDE Library Manager
  • The Library Manager can be found in the
    Project/Bean/Library window
  • Access all of the Reference Projects
  • You will need to close current project 1st, if
    you want to open any other project

33
GIDE Save Project
  • Now all settings are done.
  • In the next step the code will be generated.
    Before you generate the code, the project must be
    saved.
  • In the Main panel toolbar click on Save project
    speed button, save dialog will be shown.

34
GIDE Tutorial.pe
  • A - Enter the name of your project
    (Tutorial01.pe).
  • B - Click on Save.

A
B
35
GIDE Save Each Project in Separate Subdirectory
  • It is recommended to use a different directory
    for every project.
  • Click on Yes to confirm a new directory for
    project will be created.

36
GIDE Code Design
  • Click on the Code Design item of the Code design
    menu.
  • The command Code Design invokes Webench (PE
    server) to generate code
  • Webench generates all necessary methods
    (peripheral drivers) and overall code structure
    from the properties.

37
  • Check the result of code design, which is shown
    in Status window.
  • Any errors will be shown.
  • If the process was successful and all the drivers
    were generated, the message Successful, Generated
    without Error will be displayed.

38
  • To evolve the code and compile / build the
    executable, use Classic IDE
  • Under Tools click on Classic IDE command
  • Classic IDE will be started in new browser frame

  • (shown on the next slide)

39
What Did We Just Accomplish?
  • Saved time
  • Explored the capabilities of the microcontroller
    without spending hours reading a datasheet
  • Setup the design by filling in simple forms that
    also gave hints on proper values
  • Improved design quality
  • Caught any design conflicts without writing any
    code
  • Generated all custom drivers that are easy to
    maintain (form entry for all custom parameters)
  • Saved money
  • Basic application structure was created
    automatically Didnt have to write any peripheral
    code.
  • Only used those methods that are needed for your
    application
  • Drivers that are generated are tuned for the
    COP8
  • No prototype needed!

40
CIDE Tutorial01.txt Report
  • The Tutorial01 project is now opened in Classic
    IDE.
  • All of the auto-generated modules callable
    routines are listed in the project.txt file
  • Double Left Click on Tutorial01.txt document.
  • The file will be shown in the Text Viewer as
    READ-ONLY

41
CIDE Events.asm Module
  • For most projects, you will add your custom code
    to modules
  • yourproject.asm Events.asm
  • Now you will edit the module Events.asm
  • Click right button on Events.asm module.
  • Pop-up menu will be shown.

42
CIDE Edit Events.asm
  • Select Edit the source code item.
  • Source code will be displayed in the Text editor
    window.

43
CIDE Complete Structure Automatically Generated
  • Next steps are to write the code in the source
    files.
  • Find the following text in the file
  • Write your code here ...

44
CIDE Find the PinIO Method
  • In the Project Manager expand the folder C5.asm.

45
CIDE Drag/Drop the Method
  • You can easily put the method name to your source
    code using DragDrop technology.
  • Put the method in your code.

46
CIDE Add Your Own Comments
  • In Text Editor window format the text.
  • You can also write your comments here.

47
CIDE LED Status Changed
  • The command inverts the value on the CPU output
    pin, the LED diode status is changed.
  • If you need to add other code, refer to
  • COP8FLASH Family User's Manual (pdf 1.8MB)
    -Appendix A contains COP8 instruction set.
  • COP8 Assembler/Linker/Librarian user's Manual

48
CIDE File Save
  • After inserting the code to the driver, you can
    save the file by clicking the right mouse button
    on the background of the File Editor.
  • The popup menu is shown.
  • To save file choose the Save command in File menu
    .

49
CIDE Build Project
  • Under Tools click on the command Build Project.

  • The compilation will be started.

50
  • If there are errors, all the reasons why the
    compilation process was not successful will be
    listed in the Status Window.
  • You can click on any error message to be taken to
    the error in your code
  • If no Errors the object files (.HEX and .COF
    others) files are generated

51
CIDE Go to Simulator
  • After a successful build, and your code is at a
    point where you want to debug functionality, run
    it in the on-line code simulator
  • Under Tools access the Simulator.

52
What Did We Just Accomplish?
  • Saved time
  • Basic application structure was created
    automatically
  • Didnt have to write any peripheral code
  • Used the structure generated in GIDE to
    personalize your main loop in CIDE
  • Used all of the generated custom drivers
  • Generate HEX and COFF binaries to easily export
    to your microcontroller
  • Improved design quality
  • Customized the event handlers for your designs
    needs
  • Added code from Nationals libraries or yours
  • Saved Money
  • No prototype needed!

53
Simulator Main Screen
Simulator for Debugging Access/Change CPU regis
ters Program Memory Data Memory Memory Map SFR
registers
I/O ports Breakpoints Tracepoints
54
Simulator Main Screen
  • In the SimulatorYou can add any of the following
    windows
  • CPU registers
  • Program Memory
  • Data Memory
  • Memory Map
  • SFR registers
  • I/O ports
  • Breakpoints
  • Tracepoints

55
Simulator CPU Registers
  • Open the CPU Registers window
  • Any step changes from code execution will be
    highlighted in Red
  • Change any value by double clicking on the
    register

56
Simulator Access to port I/O
  • You can call up the status on any port and make
    changes as necessary.
  • External stimulus can also be provided in an
    external file
  • Input can be changed on any clock edge

57
What Did We Just Accomplish?
  • Saved time
  • Caught most of my bugs before burning any code
    into parts
  • Able to patch software by changing it during
    operation
  • Didnt have to build any prototypes before
    testing code
  • Improved design quality
  • Caught most of my bugs before burning any code
    into parts
  • Stepped through my code to see how it operated
  • Saved money
  • Havent yet spent any money on any tools or
    boards
  • Didnt have to throw away any non-functional
    prototype processors

58
WEBENCH Build It! Microcontroller
Tools/Boards/ICs
Download Now Use File Manager) to access your
Hex/COFF executable, as well as all project
files Tools Find Order all off-line tools,
boards, devices needed to bring your design to
life
59
Build It! Unis File Manager
Use File Manager to access your Hex/COFF
executable, as well as all project files
Download the Hex/COFF file or use the zip utility
to zip the directory so that you can download all
of the project files Project files can be used w
ith the off-line PE tool. Upload any of your own
custom code into your User Library on the server
as well.
60
What Did We Just Accomplish?
  • Saved time
  • Links for boards/emulators/off-line tools for
    your design all conveniently located one one
    page
  • Save money
  • Completed project even before you purchased one
    part

61
Microcontroller WEBENCHTM Summary
  • Fastest possible software design cycle based on
    the following principlesof the Processor Expert
    ?
  • Has built-in knowledge (internal definition) of
    National's MCUs, with all integrated peripherals,
    and provides on-line context sensitive detailed
    descriptions for the devices and all their
    functions

62
Microcontroller WEBENCHTM Summary
  • Allows you to define your application's behavior
    using the component's settings, dragdrop
    function selections, utilize the generated code,
    and integrate any user written code.
  • Has an intuitive graphical UI, displays the MCU
    structure, and allows user to take advantage of
    predefined functions, including interrupt
    handlers, and their interfaces

63
Microcontroller WEBENCHTM Summary
  • Encapsulates functional capabilities of MCU
    elements into building functions "configurable
    beans
  • Offers a library of already tested embedded
    beans? (drivers, building blocks, interface
    functions)
  • You can build a COP8 application without
    advanced preparation and knowledge ... BUILD
    IT NOW!

64
Thank You
  • Visit the Microcontroller WEBENCH Application
    Builder
  • http//www.national.com/appinfo/webench/mcu
  • Or access the Power and Wireless Application
    Builders
  • http//WEBENCH.NATIONAL.COM
  • Or access Unis
  • http//www.processorexpert.com

65
COP8FLASH Reference Project
RS-485 configuration
IS Programming
Rotary encoder
Expansionconnectors
Power connector
Write a Comment
User Comments (0)
About PowerShow.com