I want to create a NE555P chip only, via command line. Not in stable or astable mode. Just the chip, so I can connect whatever I want later.
Mostrar comentarios más antiguos
I also want the chip pin layout to be as in the data sheets.
As a newbie think it´s enough to learn electronics, connect cables, testing, learning Matlab at once :)
1 8
2 7
3 6
4 5
%This is the code i run via Command window:
new_system('NE555P_Model');
open_system('NE555P_Model');
add_block('built-in/Subsystem', 'NE555P_Model/NE555P');
open_system('NE555P_Model/NE555P');
%That creates NE555P Model and opens the new window.
%Then command:
add_block('built-in/Inport', 'NE555P_Model/NE555P/GND');
set_param('NE555P_Model/NE555P/GND', 'Port', '1');
add_block('built-in/Inport', 'NE555P_Model/NE555P/TRIG');
set_param('NE555P_Model/NE555P/TRIG', 'Port', '2');
%Which creates images of:
%Pin 1 GND
%Pin 2 TRIG (both ok)
%Next command:
add_block('built-in/Outport', 'NE555P_Model/NE555P/OUT');
set_param('NE555P_Model/NE555P/OUT', 'Port', '3');
add_block('built-in/Inport', 'NE555P_Model/NE555P/RESET');
set_param('NE555P_Model/NE555P/RESET', 'Port', '4');
% To this point works nice, with correct labels:
%Left side:
%pin 1 GND
%Pn 2 TRIG
%Pin 3 OUT
%Pin 4. RESET
%Now comes the interesting part:
%When I add port 5 with this code:
add_block('built-in/Inport', 'NE555P_Model/NE555P/CTRL');
set_param('NE555P_Model/NE555P/CTRL', 'Port', '5');
%Pin 1, 2, 3 AND pin 5 is correct. BUT
%Pin 4 changed number to 3 still with correct text.
%Continue to ad pin 6
add_block('built-in/Outport', 'NE555P_Model/NE555P/THRES');
set_param('NE555P_Model/NE555P/THRES', 'Port', '6');
%Pin 6 Is correct with text: Thres
% GND pin 1: ok
% TRIG pin 2: ok
% OUT pin 3 changed number => 2
% Reset pin 4 changed number => 3
% pin 5 and 6 OK
% Adding pin 7:
add_block('built-in/Outport', 'NE555P_Model/NE555P/DISCH');
set_param('NE555P_Model/NE555P/DISCH', 'Port', '7');
%Pin 7 DISH (Correct)
%Adding pin 8:
add_block('built-in/Outport', 'NE555P_Model/NE555P/VCC');
set_param('NE555P_Model/NE555P/VCC', 'Port', '8');
%The more pins I add, the more they switch numbers, quite frustrating.
%This is the final result. any one who knows what I´m missing.
I can add up to pin 4 and everything is labeled right:
Pin 6 added, (3) OUT and (4) RESET twisted.

Pin 7 Added:

Pin 8 added.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programmatic Model Editing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
