Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Create New Macros

<^< Left or Right? | Course Index | More Efficient Macros >^>

From the menu select 'Macro' and click then 'New' (Macro > New). In the 'Name of new macro:' text box type in "LEFT". This is the name of the new macro. Underneath enter the description as "Left flash routine". You should have a dialogue window that looks like this:

Select OK. Don't worry about all of the other text boxes on the macro dialogue window for now.

The macro should now show in the main view. If not, from the menu select 'Macro' then select 'Show as Flowchart' and then click 'LEFT' from the sub menu (Macro > Show as Flowchart > LEFT). From the main flow chart cut the icons from the 'Yes' branch of the first Decision box and paste them into the 'LEFT' macro. You should have a macro that looks like this:

Similarly set up another new macro called "RIGHT" with a description "Right flash routine". From the main flow chart cut the icons from the Yes branch of the second decision box and past them into the 'RIGHT' macro.

In the main flow chart insert a 'Macro' icon into each 'Yes' branch of each Decision icon. Double-click on each icon to set them to call the 'LEFT' and 'RIGHT' macros respectively. You should have a flowchart that looks like this:

<^< Left or Right? | Course index | More Efficient Macros >^>

Print - Search - Login

Page last modified on May 01, 2013, at 02:45 PM