User Tools

Site Tools


plc:charge_pump

Change Pump Example

Charge pump output can be easily implemented in the Software PLC.

To do it

  1. Goto the “Software PLC”



  2. Press “Add” to add new PLC procedure



  3. Enter the procedure filename (CHARGE_PUMP), press “OK” button



  4. Enter source code for change pump

    CHARGE_PUMP.plc
    main() 
    {
      n=0;
      port=0;
     
      do{
       n++;
       if (n&1) { portset(port); } else {portclr(port);};
      }while(1);
     
      exit(99);
    };





  5. Press buttons “Save” and “Build”



Output pin defined “port” variable will start pulse generation.

....
  port=0;
....

The result oscillogram is shown below

plc/charge_pump.txt · Last modified: 2018/09/08 13:28 by skirillov

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki