File indexing completed on 2024-05-19 09:39:03
0001 /*************************************************************************** 0002 * Copyright (C) 2003 by David Saxton * 0003 * david@bluehaze.org * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 ***************************************************************************/ 0010 0011 #ifndef EC555_H 0012 #define EC555_H 0013 0014 #include "component.h" 0015 0016 #include <QStringList> 0017 0018 /** 0019 @short 555 IC 0020 @author David Saxton 0021 */ 0022 class EC555 : public Component 0023 { 0024 public: 0025 EC555(ICNDocument *icnDocument, bool newItem, const char *id = nullptr); 0026 ~EC555() override; 0027 0028 static Item *construct(ItemDocument *itemDocument, bool newItem, const char *id); 0029 static LibraryItem *libraryItem(); 0030 0031 void stepNonLogic() override; 0032 bool doesStepNonLogic() const override 0033 { 0034 return true; 0035 } 0036 0037 private: 0038 Pin *ground; 0039 Pin *trigger; 0040 Pin *output; 0041 Pin *reset; 0042 Pin *control; 0043 Pin *threshold; 0044 Pin *discharge; 0045 Pin *vcc; 0046 0047 Resistance *m_r1; 0048 Resistance *m_r23; 0049 Resistance *m_po_sink; 0050 Resistance *m_po_source; 0051 Resistance *m_r_discharge; 0052 0053 bool old_com1; 0054 bool old_com2; 0055 bool old_q; 0056 }; 0057 0058 #endif