User Tools

Site Tools


No renderer 'odt' found for mode 'odt'
plc:charge_pump

This is an old revision of the document!


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 oscilloscope is shown below

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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki