Nikolai Golovchenko has undertaken to write a code generator for the PIC (and possibly other small processors in the future) that will accept a simple expression, parse it, and generate source code that will allow the PIC to evaluate the expression. Currently available:
Furture enhancements may include infix math expression evalutation, basic io functions (e.g. RS232Out(USART1, PortD / 7)), timeing (e.g. OnceEvery(2, minutes, LCDT6963COut((PortA & 7)*2)) and so on.
We hope to standardize a method for includeing function definitions contributed by anyone where the chip type, clock speed and other supporting requirements, input, output, description and code are defined on a web based input form and the function is then included in a library of available functions that can be called from the code generator.
Ultimately you could enter something like:
RS232Out(a0,a1,printf("Flow rate: %d at %s", sin(ADCIn(b0,sigmadelta)^2)*100, Time(h,m,s))), Clock=4Mhz, Part=16F84
and get the code to read a sigma delta analog to digital converter on pin B0, do the calculation, get the time from an ISR clock, generate the text answer, and bit bang it out the serial port connected to pins A0 and A1. Please note that this is a completely made up example and in no way reflects any method we know for calcuating "flow rates" <GRIN>.
If anyone is interested in contributing to this project, please contact Nikolai, or James Newton
Also: The late Tony Fishers (http://www-users.cs.york.ac.uk/~fisher/) DSP code generation program has been converted to run on our server: Infinite Impulse Response (IIR) Butterworth / Bessel / Chebyshev
Another (sort of) code generator in progress is for evaluating arithmetic
expressions while tracking the actual precision needed in the calculations.
This is targeted at the SX clone of the
PIC.
http://www.sxlist.com/techref/expeval2.asp
Yet another (sort of) code generator for generating the Open Shift Generator project http://www-rocq.inria.fr/codes/LFSR/ -- A Shift Register Code Generator, generating code for linear feedback shift registers (LFSRs).
See also:
| file: /techref/piclist/codegen/index.htm, 3KB, , updated: 2007/11/2 15:23, local time: 2008/9/5 19:16,
owner: size111-hotmail-,
38.103.63.61:LOG IN
|
| ©2008 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? Please DO link to this page! Digg it! <A HREF="http://piclist.com/techref/piclist/codegen/index.htm"> Nikolai Golovchenko code generator</A> |
| Did you find what you needed? |
|
o List host: MIT, Site host massmind.org, Top posters @20080905 Apptech, Jinx, Xiaofan Chen, olin piclist, Alan B. Pearce, Vitaliy, William \Chops\ Westfield, Tamas Rudnai, JonnyMac, Cedric Chang, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Shultz Electronics, Timothy Weber, on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
|
.