CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Making a Ladder Compiler for Pic

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
zydis



Joined: 10 Aug 2015
Posts: 3

View user's profile Send private message

Making a Ladder Compiler for Pic
PostPosted: Thu Jan 28, 2016 2:29 am     Reply with quote

Hi, I want to make ladder compiler for my university project. I will write a program that will convert ladder chart to hex file so I need machine programming map for pic18f67k22. Can you help me how can I find this type of documents?
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Thu Jan 28, 2016 3:35 am     Reply with quote

If you are making a compiler, you are on the wrong forum. This is a forum for people _using_ the CCS compiler....

As a general comment, you type the machine code map in yourself, from the data sheet. Table 29-2.
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Jan 28, 2016 6:39 am     Reply with quote

I was curious about 'ladder compiler' and Googled it. Interesting.. a program to convert ladder logic pseudo code into a program a PIC can run. After a couple of coffees I've concluded it is possible to code an 'interpeter' inside the 67K22 and have it create the program.Similar to PICs with embedded BASIC or C in them. It is a HUGE project but broken down into sections like 'ladder data input', 'logic functions' ,'code programming' it is possible. After all some PLCs are buit this way. BTW there are several PIC based ladder logic programs out there.
Ironically I was asked to 'upgrade' a 30 year old 68705P3S product. Seems quartz windowed device DO have a limited lifespan! A PIC16F886 is way overkill and the cost to read the 68705 and convert to CCS C will probably kill the job. The hardware is cheap, the software R&D isn't.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Thu Jan 28, 2016 8:05 am     Reply with quote

Yes. In fact if he has got the CCS compiler, the easiest way to do this, is to completely forget about the PIC code, but instead to use:
<http://ladder-logic-compiler.soft112.com/>

This produces a 'pseudo code', which could be very easily translated into C, which then becomes portable to multiple chips. Won't give the ultimate performance in some places, but could be done in just a few hours. The same pseudo code could be translated relatively easily into assembler, but this would be more work.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group