Difference between revisions of "Exercise - Transferring a Program to the Microcontroller"

From Flowcode Help
Jump to navigationJump to search
(Created page with "This exercise looks at transferring to the microcontroller, the flowchart 'Lamp1.fcf' which you developed in the exercises [[Exercise - Creating Your First Flowchart|Creating ...")
 
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This exercise looks at transferring to the microcontroller, the flowchart 'Lamp1.fcf' which you developed in the exercises [[Exercise - Creating Your First Flowchart|Creating Your First Flowchart]] and [[Exercise - Adding Devices to Your First Flowchart|Adding Devices to Your First Flowchart]].<br />
+
<sidebar>Sidebar: Flowcode Exercises:Ex1</sidebar>
This involves compiling the program (translating it into a form which the microcontroller can use,) and then moving it, and storing it in the microcontroller's memory.  
+
This exercise looks at transferring to the microcontroller, the flowchart 'Lamp1.fcf' which you tested and simulated in the exercise [[Exercise - Simulating a Program|Simulating a Program]].<br />
For more details about this part of the process, see [[Overview of Simulation]].
+
This involves:
 +
* Compiling the program (translating it into a form which the microcontroller can use).
 +
* Moving it to the connected microcontroller.
 +
* Storing it in the microcontroller's memory.  
 +
For more details about this part of the process, see [[Adding Finishing Touches]].
  
 +
__NOTOC__
  
 +
==Load the Flowcode Flowchart==
  
__TOC__
+
* [[Opening an Existing Flowchart|Open the flowchart]] called 'Lamp1.fcf' which you tested in the exercise [[Exercise - Simulating a Program|Simulating a Program]].
  
  
==Load the Flowcode Flowchart==
+
==Specify the chip==
 +
 
 +
* Open the [[Project Options]] through the 'Build' menu and then navigate to the 'Choose a Target' tab (Build > Project Options... > Choose a Target)
 +
: Make sure you have an appropriate chip selected, if the 'No chip'/'SIM chip' is selected then there is no target chip specified to compile to.
 +
: Then make sure that the appropriate target chip is connected and ready to compile to.
 +
 
 +
 
 +
==Compile the program==
  
* Open the flowchart, called 'Lamp1.fcf' which you created in the exercise [[Exercise - Creating Your First Flowchart|Creating Your First Flowchart]].
+
* Click on the 'Compile to chip' icon. [[File:Btn_Compile_Chip.png|border]]
:(For help with this, see the exercise [[Exercise - Opening an Existing Flowchart|Opening an Existing Flowchart]])
+
: The 'Compiler Messages' box appears and shows the progress of the process.
 +
: First of all, the program is converted into 'C' language.
 +
: This is then translated into another language called 'Assembler'.
 +
: Finally, the resulting code is transferred to the microcontroller.
 +
: The good news is that all of this happens automatically, without the need for any intervention from you!
  
  
==Run the simulation==
+
==What next?==
 +
Now you have tested that the program performs on hardware correctly, develop your flowchart further by documenting it for clear interpretation by others and for future expansion purposes as described in the exercise [[Exercise - Documenting a Flowchart]].

Latest revision as of 14:29, 13 March 2014

<sidebar>Sidebar: Flowcode Exercises:Ex1</sidebar> This exercise looks at transferring to the microcontroller, the flowchart 'Lamp1.fcf' which you tested and simulated in the exercise Simulating a Program.
This involves:

  • Compiling the program (translating it into a form which the microcontroller can use).
  • Moving it to the connected microcontroller.
  • Storing it in the microcontroller's memory.

For more details about this part of the process, see Adding Finishing Touches.


Load the Flowcode Flowchart


Specify the chip

  • Open the Project Options through the 'Build' menu and then navigate to the 'Choose a Target' tab (Build > Project Options... > Choose a Target)
Make sure you have an appropriate chip selected, if the 'No chip'/'SIM chip' is selected then there is no target chip specified to compile to.
Then make sure that the appropriate target chip is connected and ready to compile to.


Compile the program

  • Click on the 'Compile to chip' icon. Btn Compile Chip.png
The 'Compiler Messages' box appears and shows the progress of the process.
First of all, the program is converted into 'C' language.
This is then translated into another language called 'Assembler'.
Finally, the resulting code is transferred to the microcontroller.
The good news is that all of this happens automatically, without the need for any intervention from you!


What next?

Now you have tested that the program performs on hardware correctly, develop your flowchart further by documenting it for clear interpretation by others and for future expansion purposes as described in the exercise Exercise - Documenting a Flowchart.