The DPLC programmable controller

The DPLC is a PLC I made for my final exams at high school. It can be programmed in a simple language, has 16 inputs and 16 outputs. It can be programed with 65536 bytes, which is equal to 8192 instruction (yes, 8 byte instructions). It’s designed as a piggyback module, which the user will put on the hardware he requires or choose from some standard HW.

The core is a ATMEGA128 processor. The memory is a 24FC512. The program for the PLC is stored here. I made custom everything, cause I learned only recently that there’s a customisable assembler and stuff.

The basic idea is that a cheap module will be placed onto a customer defined hardware platform. The platform can contain standart stuff: relays, optocouplers etc…

In retrospect a lot of things could have been done better. That was many, many years ago…

Example code for the PLC:

set_out_to_value_using_mask FF FF 00 22
 jump_point_no 0
 if_in_using_mask_is_equal_skip 01 00 01 00 1
 jump 1

 jump 0

 jump_point_no 1 comment: initiation seq

 set_out_to_value_using_mask 00 FF AA AA
 wait 00 00 00 1F
 set_out_to_value_using_mask 00 FF 55 55
 wait 00 00 00 1F
 counter 0 g 0 1 1
 jump 1

Photo of the whole set:



This entry was posted in Projects, Simple MCU stuff and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *