How to use the

Button Block & Led Block Plugins 


Index

Overview
The Project
Configuring the Plugin
Conclusion

           

 

Overview

Grouping together eight buttons in one plugin provides a means of input to an entire port, and grouping eight leds together gives an effective way of reading a ports binary output.

This tutorial will show how to configure  and use the button block & led block plugins.

 

The Project

The  program is simple but effective for our purposes.  The code takes an input form PORT C and outputs  to the respective pin on PORT B.

.
.
.

//Infinite loop
while( 1 )
{

clear_wdt();
portb = portc;

}; 
.
.
.

Once the project has been built enter debug mode by clicking the bug icon on the tool bar. 

 

Configuring & Using the Plugins

Configure your plugins like this:


Run the simulation by pressing the run button on the tool bar or pressing F5.  When a button is pressed the corresponding led will light, then go out when released.

Now open the button block configure dialog and check the "2-state button" box.  When the simulation is run now the leds will toggle on and off with each press.

Conclusion

The button block  and led block plugins are useful tools for debugging projects requiring port wide input and output.

 

Return to Plugin Help

 

Legal Information

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

  THE AUTHOR RESERVES THE RIGHT TO REJECT ANY LICENSE (REGISTRATION) REQUEST WITHOUT EXPLAINING THE REASONS WHY SUCH REQUEST HAS BEEN REJECTED. IN CASE YOUR LICENSE (REGISTRATION) REQUEST GETS REJECTED YOU MUST STOP USING THE SourceBoost IDE, C2C-PLUS, C2C++, P2C-plus and BoostC COMPILERS AND REMOVE THE WHOLE SourceBoost IDE INSTALLATION FROM YOUR COMPUTER.


http://www.picant.com/c2c/c.html
Copyright © 2003-2006 Pavel Baranov
Copyright © 2003 Mark Duren