The attached is a design example named “Embedded Sys Design Example Analog In Digital Out.” The zip file includes the source code file and a tech description of the example. The source code was created automatically by ECCM (or the Game-Blocks-Code tool provided by ECCM).
This design example is an example system that captures analog Inputs (present at pins of the CPU chip), determines their values, and accordingly sets or clears digital outputs (at pins of the CPU chip).
More info about Game-Blocks-Code can be found in the article published in the December 2010 issue of Embedded Systems Design magazine. The article is “Designing embedded controllers with building blocks.”