Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone
I have started a new project using PIC controller
the idea is to program it through USB with a GUI based on C# or any other type of program leng
what i mean is that the user will a grid the connects 8 input to 8 output and using a menu or something similar to the right click menu to add function outputX=function(inputY)
the function can contain amount of finite commands like WHILE IF FOR AND XOR etc.
i had an idea how to convert the code from the GUI to the C program it self without directly sharing librarys and stuff like that
my idea is to with to .txt and than use this sheet for the simulation (i forgot to mention it but it to early for to concern writing that specific feature ) and the C program that will communicate with the chip it self

i need your advise : what is the easy and best way to write the code for the chip ?
once i achieve progress i'll post my code and photos of the GUI
Posted
Comments
Andreas Gieriet 12-Jan-13 16:46pm    
Any hint of what a function will be? What does it trigger on the PIC?
Andi

Your project looks ambitious: the C# application should convert each function (actually they looks more similar to a programs) into a set of statements the PIC can understand. That is you have to implement a compiler (to an intermediate language) on the PC (C#) side and an interpreter (able to understand the intermediate language) on the PIC side (you have also to code the communication).
While the task isn't easy by itself, you should consider that PIC microcontrollers usually have not large amounts of RAM.
 
Share this answer
 
Comments
Matan Fihman 12-Jan-13 17:12pm    
OK i'm sorry i forgot to mention all the inputs are analog plus i'm can use any PIC chip that want so me and my partner chose 44 pin for its relative large memory .
also i need to use a gcc compiler so i chose code blocks .
i have good idea how to make the GUI and also how to use the txt file that the GUI will generate my main problem is with writing the function them self
the list that i want do (want NOT must) is : WHILE IF FOR FOREACH DELAY (like if input is high delay the function of outputX by that much SEC ) also in order to use a couple or more outputs port for one input or of-curse wise-versa and i need as well AND OR XOR ; i think that is it but anything can happen...
any one can advise me in how to write a solid program for those functions ?
Ohh i almost forgot of-curse i can add EXT memory for the chip set (i have the know how , i hope.. )

i want to thank everyone who helped so far and going to help !!
i'm going to upload very soon a set of illustrations of what i'm going to do
so stay tuned :)
JackDingler 14-Jan-13 13:36pm    
CPallini is right. There are too many pieces involved to provide any quick answers.

From my perspective, it appears that you've decided how you're going to architect a solution, before you've identified the problem you are solving.

Digital communication over analog channels is certainly possible, but you're adding complexity and overhead for no good reason.
i had change my view about that type of project to a more primitive form of it
so for the time PROBLEM SOLVED ...
see you soon with the modified project :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900