Create Sub-Circuit

CDRIVE

Senior Member
#1
I've been using Tina for years now but it doesn't support Picaxe chips so I'm forced to use Picaxe VSM, which is a clunky app in comparison. I've made hundreds of Macros and Sub-Circuits in Tina but I'm clueless about doing it in VSM. Can anyone out there help? Yes, I've read the help files to no avail.

Thanks,
Chris
 
#2
Sorry I cant help at all, but was intrigued about Tina as I had never heard of it before. I did notice that it supports PIC chips and Flowcharts so could you not use these features to simulate the picaxe environment?.
 

Technical

Technical Support
Staff member
#3
You can have as many sub circuits as you like, as long as net names are consistent throughout they will be regarded as all connected.

There is a section entitled 'Sub Circuits' in the VSM help file that explains how this works - you basically click the sub circuit button on left toolbox (box symbol with 4 wires coming out of it, tooltipped 'Sub-circuit'). You can then draw the sub circuit as per a normal circuit and simply use input and output terminals as the net connectors - right click>place>terminal>input (or output)



 

CDRIVE

Senior Member
#4
Sorry I cant help at all, but was intrigued about Tina as I had never heard of it before. I did notice that it supports PIC chips and Flowcharts so could you not use these features to simulate the picaxe environment?.

PE6 has a "Convert To ASM" tool that is not enabled as yet. I'm looking forward to the day it is. Then I'll be able to write Picaxe code in PE6, convert it to ASM and import it to Tina where I can simulate it with the equivalent PIC. Personally I'd much prefer Tina to hookup with REV-ED and support Picaxe directly. I can build just about any circuit in Tina in about 1/100th the time it takes me in VSM! It will also occupy less than a 3rd of pallet real estate. I love the Picaxe environment and have no desire to deal with ASM

Chris
 

CDRIVE

Senior Member
#5
You can have as many sub circuits as you like, as long as net names are consistent throughout they will be regarded as all connected.

There is a section entitled 'Sub Circuits' in the VSM help file that explains how this works - you basically click the sub circuit button on left toolbox (box symbol with 4 wires coming out of it, tooltipped 'Sub-circuit'). You can then draw the sub circuit as per a normal circuit and simply use input and output terminals as the net connectors - right click>place>terminal>input (or output)




Thanks for the Subcircuit help tip but that's always been a sticking point with VSM. I did what you said but couldn't find it under Proteus VSM Help. Instead I found it under ISIS Help. That's one of the sticking points of Picaxe VSM. I never know what is or isn't going to be applicable because Picaxe VSM is a stripped down inexpensive version of Proteus/ISIS. In the past I tried to do things only to be bushwacked with "Not Allowed In Picaxe VSM" or a message similar to that.

I will try my hand at the instructions in the ISIS help files and report how things are progressing.

Thanks again,
Chris
 

CDRIVE

Senior Member
#6
OK, last night I managed to get my analog sub-circuit simulating. Not without overcoming a few hurdles though. First off, the ISIS help topic for creating Sub-Circuits is spars to say the least. It doesn't even provide a sample schematic of a circuit that the sub-circuit rectangle represents. My sub-circuit rectangle represented a simple analog circuit but the "Ports" selection provide Input, Output, Power, Ground, Bi-Directional and "Default" choices with no clue which to use. I discovered from trial and error that "Default" Ports should be used for analog circuits, even GND and Power.

Here's an important tip:
The first step in creating a Sub-Circuit is to place a Sub-Circuit rectangle on the pallet of your main schematic. This pallet is called the "Parent Sheet". The sheet that will contain your actual sub-circuit is called the "Child Sheet". Prior to accessing the Child Sheet to draw your schematic you must do the following.

(1) Right click the rectangle and select "Properties".
(2) Fill in the "Name" textbox with a descriptive name of your subcircuit.
(3) Fill in the "Circuit" textbox with a component identifier label that's not currently in use in your main (Parent Sheet) schematic. For instance if you already have U1, U2 and U3 on your pallet fill in the "Circuit" textbox with "U4". Without the quotes.

Please note that the "Circuit" textbox will already be filled with a default text. I you don't change it now you never will be able to after opening the Child Sheet! I tried changing the default ("CCT001") to something more appropriate ("U1") and my subcircuit schematic on the Child Sheet VANISHED!

By the way. Since the Sub-Circuit help topic was so sparse I navigated to
YouTube where I found this. There's no audio but it's still a 1000 times better than the help topic.
https://youtu.be/Oc1lQYWFoGQ


Chris
 

CDRIVE

Senior Member
#7
After re-reading my last post I thought I should clarify something. Until further experimentation I'm not sure which field "Name" or "Circuit" should contain text descriptive of the sub-circuit. In other words should something like "U1" be in the "Name" field or "Proximity Detector" which describes my sub. If not then the descriptive text should be placed in the "Circuit" field and "U1" placed in the "Name" field.

I do know this though. The "Name" field can be edited at any time but not the "Circuit" field. The "Circuit" field MUST be edited prior to the first time you switch to the "Child" Sheet. Failing to do so will forever commit you to accepting the default text that ISIS chose!

I'd like to post the likes and dislikes of sub-circuit creation and use in ISIS vs TINA but thus far I find nothing I like about the ISIS system. For one thing unlike TINA this sub-circuit is attached to the name of the .DSN file you save. In TINA it's saved as an independent file that I can use in any old or new project simply by selecting "Insert Macro" and navigating to where I store all by Macro Subs.

The sequence of creating a Sub in ISIS is also logically backward! In TINA I draw my schematic and attach Macro Pins to it. After that I'm not committed to representing the sub as a simple rectangle. TINA provides a Symbol Editor where I can create any shape I want. Even 3D. I'm also not committed to where the pins are placed as ISIS does.

If it seems that I'm a TINA spokesman I'm not. I would just love to see REV-ED team with TINA because I've begged TINA for years to support Picaxe. So maybe if I beg here at Picaxe something might happen. :)

Chris
 

CDRIVE

Senior Member
#8
Here's more information for others interested in creating sub-circuits in VSM. While VSM doesn't save your sub as a sub-circuit file that can be inserted in other .DSN files you can copy and paste them. This is a mutli-step process though.

First copy the sub-circuit rectangle from the Parent Sheet.
If your sub-circuit rectangle contains any additional graphics like mine did be sure to select all of it prior to selecting COPY.
Open the .DSN file you want to paste it into and select PASTE from the right click menu.
Save the modified .DSN file.
Reopen the .DSN file that contains your original sub-circuit.
Right click the Parent Sheet and select GoTo Child Sheet.
Select and Copy the entire circuit.
Reopen the destination .DSN file.
Right click the pallet and select GoTo Child Sheet.
Right click the pallet and select PASTE.
Right click the pallet again and select Exit to Parent Sheet.
Save the .DSN file.

I will post some pix of my Parent and Child Sheets later.

Chris
 

CDRIVE

Senior Member
#9
Here's some pix of the circuit. The Sub-Circuit is the GS1005 Proximity Sensor on the Parent Sheet. The second photo is the actual circuit on the Child Sheet that the rectangle represents.

Chris

Oops! I tried to just paste them but that didn't work. I'll give it another shot in about 45min.
 
Top