ASCII Circuits

A

Andreas Weber

Guest
Hi Newsgroup,
I'm the author from AACircuit (Andy's ASCII Circuit) and 3 years ago, I
released the first version of it(formely known as "ASCII-PAINT").

now I read Gary Richardson's posting:
You might try my ascii schematic drawing program. I think you will
find >it easier to use than Andy's and it has a few more features.

What do YOU think?
Should I invest time for further development? What should I improve?
Is it too difficult to use my program?

Best regards, Andy
 
On Wed, 08 Sep 2004 23:05:38 +0200, Andreas Weber wrote:

Hi Newsgroup,
I'm the author from AACircuit (Andy's ASCII Circuit) and 3 years ago, I
released the first version of it(formely known as "ASCII-PAINT").

now I read Gary Richardson's posting:
You might try my ascii schematic drawing program. I think you will
find >it easier to use than Andy's and it has a few more features.

What do YOU think?
Should I invest time for further development? What should I improve?
Is it too difficult to use my program?

Best regards, Andy
It would be nice to have a linux version. But it does work OK using wine
(a windows api for linux), so not a great problem.

--
http://www.niftybits.ukfsn.org/

remove 'n-u-l-l' to email me. html mail or attachments will go in the spam
bin unless notified with
HTML:
 or [attachment] in the subject line.
 
On Wed, 08 Sep 2004 23:05:38 +0200, Andreas Weber <spam@tech-chat.de>
wrote:

Hi Newsgroup,
I'm the author from AACircuit (Andy's ASCII Circuit) and 3 years ago, I
released the first version of it(formely known as "ASCII-PAINT").
Thank you! A great program.

now I read Gary Richardson's posting:
You might try my ascii schematic drawing program. I think you will
find >it easier to use than Andy's and it has a few more features.

What do YOU think?
Should I invest time for further development? What should I improve?
Is it too difficult to use my program?
Well, Gary was forthright in announcing that he was initially interested
in creating a Python version of your app. Competition is a Good Thing.

Personally, I find AACircuit easier to use.

One thing that would be a handy addition would be the ability to either
(or both) shift-select or drag-select multiple objects which could then
be moved or rotated as a group.

--
Rich Webb Norfolk, VA
 
"Jonathan Kirwan" <jkirwan@easystreet.com> wrote in message
news:qg5vj094ugd68f84kb636vdgrarentmtjk@4ax.com...
On Wed, 08 Sep 2004 23:05:38 +0200, Andreas Weber <spam@tech-chat.de
wrote:

I'm the author from AACircuit (Andy's ASCII Circuit) and 3 years ago, I
released the first version of it(formely known as "ASCII-PAINT").

now I read Gary Richardson's posting:
You might try my ascii schematic drawing program. I think you will
find it easier to use than Andy's and it has a few more features.

What do YOU think?
Should I invest time for further development? What should I improve?
Is it too difficult to use my program?

Grüß dich!

When I first saw it, I thought, "Now this works very nicely and it's not a
complex or difficult program -- great implementation!" However, I didn't
like
the style of parts included, so I then set out to edit them (vielen dank
for
including that feature!) I might like a slightly larger space to work in
for
some parts, but I understand a need for some limit. I'm happy about the
delete
column and row and insert column and row features (even nicer might be to
be
able to select a region and then say 'CROP' to extract it and reset it to
the
upper left corner, but what is there already works acceptably.)

But it's a collection of small issues that keep me from using it. Partly,
the
wiring methods bug me and need 'patching' when I'm done. Partly, I have
to
enter text in a box before I can place it, rather than just clicking on a
spot
and then typing. Partly, it's the constant redraws and resulting
flickering.

Frankly, I think I would use it as a tool if it supported a straight text
typing
mode where I could use the arrow keys and space bar and the like to move
around
and type in characters where I needed them. If that were present in the
program
it would be at least as good as any regular text editor and most likely
better
because of the specialized features. But as it is, in some ways it is
worse
than having a simple text editor. Enough so that I don't use it. (I have
used
your program to paste in a schematic in which I needed to trim off excess
left
side spaces and where simple editors don't do that for me.)

But it's close. That's just my opinion and not particularly well thought
out as
I figured a sooner opinion might be better than a later one.

Jon
Thanks for your comments. I'll think about the text issue. I don't think it
would be difficult to create a mode where text could be entered directly
anywhere on the screen.

Gary
 
Andreas Weber wrote:
Hi Newsgroup,
I'm the author from AACircuit (Andy's ASCII Circuit) and 3 years ago, I
released the first version of it(formely known as "ASCII-PAINT").

now I read Gary Richardson's posting:
You might try my ascii schematic drawing program. I think you will
find >it easier to use than Andy's and it has a few more features.

What do YOU think?
Should I invest time for further development? What should I improve?
Is it too difficult to use my program?
I like it. One addition I'd like to see is this:

Widen the component editor screen a bit, and
show the four component views on a plain
background beside the grid. If I make a lot of
changes, I find it a bit hard to track them in
all the different-colored rectangles. As I make
changes in the grid, they would appear on the
plain background.
 
Jonathan Kirwan schrieb:
I'm happy about the delete
column and row and insert column and row features (even nicer might be to be
able to select a region and then say 'CROP' to extract it and reset it to the
upper left corner, but what is there already works acceptably.)
Okay, I'll improve the move/crop/paste commands

Partly, I have to
enter text in a box before I can place it, rather than just clicking on a spot
and then typing.
Frankly, I think I would use it as a tool if it supported a straight
text typing mode where I could use the arrow keys and space bar and
the like to move around and type in characters where I needed them.
Just click on "Editor" left of the "Text Box" and click on the paint
Box. A blue cursor appears which you can move with cursors usw.

Which line draw do you use ? The "magline" ?

Thank you Jon
Andy
 
Randy Day schrieb:

I like it. One addition I'd like to see is this:

Widen the component editor screen a bit, and
show the four component views on a plain
background beside the grid. If I make a lot of
changes, I find it a bit hard to track them in
all the different-colored rectangles. As I make
changes in the grid, they would appear on the
plain background.
Okay, I'll improve this. Could you send me your symbol-list?
component2.ini if you selected english.
Thanks, Andy
 
On Thu, 09 Sep 2004 10:05:04 +0200, Andreas Weber <spam@tech-chat.de> wrote:

Jonathan Kirwan schrieb:
I'm happy about the delete
column and row and insert column and row features (even nicer might be to be
able to select a region and then say 'CROP' to extract it and reset it to the
upper left corner, but what is there already works acceptably.)

Okay, I'll improve the move/crop/paste commands

Partly, I have to
enter text in a box before I can place it, rather than just clicking on a spot
and then typing.
Frankly, I think I would use it as a tool if it supported a straight
text typing mode where I could use the arrow keys and space bar and
the like to move around and type in characters where I needed them.

Just click on "Editor" left of the "Text Box" and click on the paint
Box. A blue cursor appears which you can move with cursors usw.
Ah.. Never knew. That might do it, then. I'll try it out some more.

Which line draw do you use ? The "magline" ?
I have been using the other four line types. Didn't like them. The magline
seems much better, I must admit (didn't use that one, either.)

Thanks for the suggestions and I'll see how that goes.

I still wish the display area redraws could be reduced to smaller regions so
they'd not flicker things so much, but the 'editor' is handy and the magline is
better than the other line styles. Thanks for pointing them out to me!

Jon
 
Andreas Weber wrote:
Jonathan Kirwan schrieb:
I'm happy about the delete
column and row and insert column and row features (even nicer might be to be
able to select a region and then say 'CROP' to extract it and reset it to the
upper left corner, but what is there already works acceptably.)

Okay, I'll improve the move/crop/paste commands
A very handy feature is a rubber command that allows you to put a
fence around a section, and move the fence while stretching the
interconnections that pass through the fence without distorting any of
the component symbols that happen to cross the fence (they either move
or stay, depending on whether their grab point is inside or outside
the fence). This allows a quick and sloppy build followed by a clean
up to straighten out and untangle the interconnections. It also makes
adding or deleting components much prettier. This change requires
that building any components includes defining their grab point.

--
John Popelish
 
Andreas Weber wrote:

[snip]

Okay, I'll improve this. Could you send me your symbol-list?
component2.ini if you selected english.
Thanks, Andy
Done. I can't post the file as an attachment, but I
included it below.

Oh, yeah, I found a couple of quirks in the symbol editor;
if I press left-parenthesis '(' the editing rectangle
shifts right and down instead of just right.
When I press '>' the editor moves to the next SET of
symbols in the list. They're not big issues, but they were a
couple of those 'WTF?' moments! ;)


<Resistor>
|
..-.
| |
| |
'-'
|
<R>
___
-|___|-




<R>
|
..-.
| |
| |
'-'
|
<R>
___
-|___|-




</>
<Pot>
|
..-.
| |<--
| |
'-'
|
<R>
___
-|___|-
A
|


<R>
|
.-.
-->| |
| |
'-'
|
<R>

|
_V_
-|___|-


</>
<Diode>
|
-
^
|


<R>
->|-





<R>
|
V
-
|


<R>
-|<-





</>
<Transformer>
-. ,-
)|(
)|(
-' '-


<R>
| |
uuuu
----
nnnn
| |

<R>
-. ,-
)|(
)|(
-' '-


<R>
| |
uuuu
----
nnnn
| |

</>
<Capacitor>
|
---
---
|


<R>
||
-||-
||



<R>
|
---
---
|


<R>
||
-||-
||



</>
<Electrolytic cap>
|+
===
/-\
|


<R>
\]
-|]-
/]+



<R>
|
\-/
===
+|


<R>
+[/
-[|-
[\



</>
<Battery>
|
---
-
|


<R>
|
-||-
|



<R>
|
-
---
|


<R>
|
-||-
|



</>
<Inductor>
|
C|
C|
C|
|

<R>
___
-UUU-




<R>
|
C|
C|
C|
|

<R>
___
-UUU-




</>
<NPN BJT>
|
|/
-|
|>
|

<R>
|
---
-v \-



<R>
|
<|
|-
/|
|

<R>
- -
\ ^
---
|


</>
<PNP BJT>
|
|/
-|
|<
|

<R>
|
---
-^ \-



<R>
|
/|
|

<R>
- -
\ v
---
|


</>
<Opamp>
|\|
-|-\
| >-
-|+/
|/|

<R>
| |
..-----.
\+ -/
\ /
V
|
<R>
/|
/+|-
-< |
\-|-
\|

<R>
|
/^\
/- +\
'-----'
| |

</>
<OR gate>
__
-\ \
| |-
-/__/


<R>
| |
|\_/|
| |
\_/
|

<R>
__
/ /-
-| |
\__\-


<R>
|
/'\
| _ |
|/ \|
| |

</>
<AND gate>
__
-| \
| )-
-|__/


<R>
| |
..---.
| |
\_/
|

<R>
__
/ |-
-( |
\__|-


<R>
|
/^\
| |
'---'
| |

</>
<NOR gate>
__
-\ \
| |o-
-/__/


<R>
| |
|\_/|
| |
\_/
o
|
<R>
__
/ /-
-o| |
\__\-


<R>
|
O
/`\
| _ |
|/ \|
| |
</>
<NAND gate>
__
-| \
| )o-
-|__/


<R>
| |
,---.
| |
\_/
o
|
<R>
__
/ |-
-o( |
\__|-


<R>
|
O
/^\
| |
|___|
| |
</>
<Inverter gate>
|\
-| >O-
|/



<R>
|
(---)
\ /
O
|

<R>
/|
-O< |-
\|



<R>
|
O
/ \
(___)
|

</>
<Radierer/Eraser>






<R>






<R>






<R>






</>
<Crossed diagonals>
+ +
\ /
X
/ \
+ +

<R>
o o
\ /
X
/ \
o o

<R>
+ +
\ /
X
/ \
+ +

<R>
o o
\ /
X
/ \
o o

</>
<Bridge rectifier>
+-+--
A A
-+ |
-(-+
A A
+-+--
<R>
.-----.
-|~ +|-
-|~ -|-
'-----'


<R>


leer



<R>


leer



</>
<Crystal>
_
| |
-|| ||-
|_|


<R>
|
_-_
|___|
-
|

<R>
_
| |
-|| ||-
|_|


<R>
|
_-_
|___|
-
|

</>
<Lamp>
|
.-.
( X )
'-'
|

<R>
.-.
-( X )-
'-'



<R>
|
,---.
| X |
'---'
|

<R>
.---.
-| X |-
'---'



</>
<Fuse>
|
o
(
)
o
|
<R>
_
-o_/ \o-




<R>
|
o
(
)
o
|
<R>
_
-o \_/o-




</>
<Relay>
\
_ o o
)|
)|
_)|

<R>

---- o\
nnnn o
| |


<R>
/
o o _
|(
|(
|(_

<R>
| |
uuuu
o----
/o


</>
<SPDT switch>
| |
o /o
/
/
o
|
<R>
-o
__--o-
-o



<R>
|
o
\
\
o \o
| |
<R>
o-
-o--__
o-



</>
<SPST switch>
|
\ o
\
\.
o
|
<R>
_/
-o/ o-




<R>
|
o
'\
\
o \
|
<R>
-o _/o-
/




</>
<switch>
|
| o
|=|>
| o
|

<R>
T
---
-o o-



<R>
|
o |
|=|
o |
|

<R>
|
o|
|==|>
o|
|

</>
<7-series regulator>
____
| |
-|7805|-
|____|
|

<R>
|
_|__
| |
-|7905|-
|____|

<R>
____
| |
-|7812|-
|____|
|

<R>
|
_|__
| |
-|7912|-
|____|

</>
<N-JFET>
|
|-+
->|
|-+
|

<R>
|
V
---
-+ +-


<R>
|
+-|
|<-
+-|
|

<R>
-+ +-
---
^
|


</>
<P-JFET>
|
|-+
-<|
|-+
|

<R>
|
^
---
-+ +-


<R>
|
+-|
|>-
+-|
|

<R>
-+ +-
---
V
|


</>
<N-MOSFET>
|
||-+
||<-
-||-+
|

<R>
|
===
|^|
-+|+-


<R>
|
+-||-
->||
+-||
|

<R>
-+|+-
|V|
===
|


</>
<P-MOSFET>
|
||-+
||->
-||-+
|

<R>
|
===
|||
-+V+-


<R>
|
+-||-
<-||
+-||
|

<R>
-+^+-
|||
===
|


</>
<DIL 8-pin IC>
__
-o| |o-
-o| |o-
-o| |o-
-o|__|o-

<R>
| | | |
o_o_o_o
| |
| _ _ _ |
o o o o
| | | |
<R>
__
-o| |o-
-o| |o-
-o| |o-
-o|__|o-

<R>
| | | |
o_o_o_o
| |
| _ _ _ |
o o o o
| | | |
</>
<FlipFlop>
.---.
-|S |
| |
-|R |o-
'---'

<R>
.----.
-|S1 1|--
| |
-|R 1|o-
'----'

<R>
.----.
-|S 1|--
| |
-|R1 1|o-
'----'

<R>
.---.
--|1J |--
-o|>C1|
--|1K |o-
'---'

</>
<Signal Source>
..-----.
| G |
|_-_-_|--
| |
'-----'

<R>
|
/ \
( ~ )
\_/
|

<R>

___
| \_
|___/


<R>
____
| |
| |
| |
\/
|
</>
<Speaker/Mic>
_
--/ \ |
(Mic)|
--\_/ |


<R>
.---|
-| |
-| |
'---|


<R>
__ /|
-| | |
-|__| |
\|


<R>
__ /|
-| | |
-|__|<->
\|


</>
<Triac>
_|_
V_A
/ |



<R>
\
|<|
-|\|-
|>|


<R>
_|_/
V_A
|



<R>
|<|
-|\|-
|>|
\


</>
<Ground/Vcc>
|
===
=



<R>
VCC
+
|



<R>

GND




<R>

VCC




</>
<Zener>
|
z
A
|


<R>

->z-




<R>
|
V
z
|


<R>

-z<-




</>
<Push SPST>

|
-----
-o o-


<R>
|
|o
-|
|o
|

<R>


-o o-
-----
|

<R>
|
o|
|-
o|
|

</>
<Unijunction UJT>

\ |-


<R>
/
v
----
| |


<R>

-| /
|<
-|


<R>
| |
----
^
\


</>
<SCR>

|
V
-
/|

<R>

\
-|<-



<R>

\|
-
A
|

<R>
/
->|-




</>
<Meter>
|
/ \
(_/_)
\_/
|

<R>
_
/ \
-(_/_)-
\_/


<R>
|
/ \
(_/_)
\_/
|

<R>
_
/ \
-(_/_)-
\_/


</>
 
Jonathan Kirwan schrieb:
I still wish the display area redraws could be reduced to smaller regions so
they'd not flicker things so much, but the 'editor' is handy and the magline is
better than the other line styles. Thanks for pointing them out to me!
Hi Jonathan,
I must admit, that I have still a redraw problem but I'll fix that soon.
With which action does this happen most strongly? Do you display the grid ?
Best regards Andy
 
On Fri, 10 Sep 2004 00:28:32 +0200, Andreas Weber <spam@tech-chat.de> wrote:

Jonathan Kirwan schrieb:
I still wish the display area redraws could be reduced to smaller regions so
they'd not flicker things so much, but the 'editor' is handy and the magline is
better than the other line styles. Thanks for pointing them out to me!

Hi Jonathan,
I must admit, that I have still a redraw problem but I'll fix that soon.
With which action does this happen most strongly? Do you display the grid ?
No, I don't display the grid very often. I played with it, though. But what I
meant is that it's 'really bad' when I'm inserting or deleting lines or rows
with those red/green things.

By the way, I just took two hours to write a short C routine to convert LTSpice
schematics in .ASC files into ASCII text schematics. Works kind of well, for
such short effort. Here's an example I just extracted using the new program:


Vcc
| Vcc
| |
| Vcc |
- | |
--- V1 | /
- | \ R2
--- / /
| \ R3 \
| / |
gnd \ |
| +-----Vc
| |
C1 || | |
,-------||---|-------------, |
| || | | /
| | R6 | |/c
| +-----/\/\----+---|
/-\ | |>e
~ V2 | \
\-/ | |
| | C3 || +-------,
| +-----------||-------+ |
| | || | |
| / / /
gnd \ R4 \ R1 \ R5
/ / /
\ \ \
| | |
| | |
| | |
gnd gnd |
---
---
| C2
|
|
|
gnd

It's a bootstrapped BJT amp. I don't have the values on there yet, though I do
parse them and can easily put them there. I just want to add some code to deal
with the expressions that are allowed in LTSpice and automatically add them as
footnotes, as they take up a lot of room when placed directly on the schematic
adjacent to the part.

The method uses a GCD on all the (x,y) wiring points in the schematic to find
the greatest common denominator and then divides the values to get integer
character positions. I also gather up the min and max values in order to center
onto a text page okay and allow room to add the legends. Symbols are, for now,
recognized and hard-coded in the code -- I don't go to the .ASY files to examine
how they are actually drawn (I imagine it would be too complex to do that well.)
Wiring is handled by using a bitmap for each character that includes a dotted
connection, left, right, top, and bottom short-walls, and a special indicator
for overridden characters I place. This map then correctly judges the right
character to place. (You can see in the above that the wire from C1 going to
the Q1 base does not DOT to the wire it crosses.)

Needs more work, but it's a start to prove that the concept is workable.

Jon
 
Jonathan Kirwan <jkirwan@easystreet.com> wrote:

<snip>

By the way, I just took two hours to write a short C routine to convert LTSpice
schematics in .ASC files into ASCII text schematics. Works kind of well, for
such short effort. Here's an example I just extracted using the new program:


Vcc
| Vcc
| |
| Vcc |
- | |
--- V1 | /
- | \ R2
--- / /
| \ R3 \
| / |
gnd \ |
| +-----Vc
| |
C1 || | |
,-------||---|-------------, |
| || | | /
| | R6 | |/c
| +-----/\/\----+---|
/-\ | |>e
~ V2 | \
\-/ | |
| | C3 || +-------,
| +-----------||-------+ |
| | || | |
| / / /
gnd \ R4 \ R1 \ R5
/ / /
\ \ \
| | |
| | |
| | |
gnd gnd |
---
---
| C2
|
|
|
gnd

snip

Needs more work, but it's a start to prove that the concept is workable.
Well done! Hope you'll pursue to completion and publication!

Meanwhile, could you post the SWCADIII schematic original, or a bitmap
screenshot please?

--
Terry Pinnell
Hobbyist, West Sussex, UK
 
On Fri, 10 Sep 2004 08:31:07 +0100, Terry Pinnell
<terrypinDELETE@THESEdial.pipex.com> wrote:

Jonathan Kirwan <jkirwan@easystreet.com> wrote:

snip

By the way, I just took two hours to write a short C routine to convert LTSpice
schematics in .ASC files into ASCII text schematics. Works kind of well, for
such short effort. Here's an example I just extracted using the new program:


Vcc
| Vcc
| |
| Vcc |
- | |
--- V1 | /
- | \ R2
--- / /
| \ R3 \
| / |
gnd \ |
| +-----Vc
| |
C1 || | |
,-------||---|-------------, |
| || | | /
| | R6 | |/c
| +-----/\/\----+---|
/-\ | |>e
~ V2 | \
\-/ | |
| | C3 || +-------,
| +-----------||-------+ |
| | || | |
| / / /
gnd \ R4 \ R1 \ R5
/ / /
\ \ \
| | |
| | |
| | |
gnd gnd |
---
---
| C2
|
|
|
gnd

snip

Needs more work, but it's a start to prove that the concept is workable.

Well done! Hope you'll pursue to completion and publication!
Hehe. Well, keep in mind that it's a DOS based command line program, accepting
a file name and just dumping to 'stdout.' But I'll put something out there as
soon as I think it's sufficiently useful in a general way and the code, too,
once I get it organized a little better so that others have a chance with it. I
compiled it with VC 1.52C. It's surprisingly short C code, though. Just a few
hundred lines.

Meanwhile, could you post the SWCADIII schematic original, or a bitmap
screenshot please?
The original .ASC follows. It was NOT designed for any kind of demonstration
here, so it has .param and the like on it. But I'll include the file for
examination. In the above diagram, I still hadn't gotten around to adding Q1's
stuff (BJTs), so that's missing there. But I've got another version adding
that, now.

Anyway, here's the file:

Version 4
SHEET 1 1792 828
WIRE 672 480 672 512
WIRE 672 400 672 384
WIRE 144 80 144 48
WIRE 128 384 128 416
WIRE 128 256 128 304
WIRE 144 176 144 160
WIRE 672 176 672 208
WIRE 672 96 672 64
WIRE 336 400 336 384
WIRE 336 208 336 304
WIRE 336 480 336 512
WIRE 336 96 336 128
WIRE 672 208 752 208
WIRE 672 208 672 256
WIRE 240 256 128 256
WIRE 800 480 800 512
WIRE 800 576 800 608
WIRE 672 368 800 368
WIRE 672 368 672 352
WIRE 800 368 800 400
WIRE 496 304 560 304
WIRE 416 304 336 304
WIRE 560 384 672 384
WIRE 672 384 672 368
WIRE 496 384 336 384
WIRE 336 384 336 304
WIRE 304 256 560 256
WIRE 560 256 560 304
WIRE 560 304 608 304
FLAG 144 48 Vcc
FLAG 672 64 Vcc
FLAG 128 416 0
FLAG 336 96 Vcc
FLAG 672 512 0
FLAG 336 512 0
FLAG 144 176 0
FLAG 752 208 Vc
IOPIN 752 208 Out
FLAG 800 608 0
SYMBOL npn2 608 256 R0
SYMATTR InstName Q1
SYMATTR Value 2N2222
SYMBOL res 656 384 R0
SYMATTR InstName R1
SYMATTR Value {Ve/Iq}
SYMBOL voltage 144 64 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value {Vbat}
SYMBOL voltage 128 288 R0
WINDOW 123 24 132 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value2 AC .02 0
SYMATTR InstName V2
SYMATTR Value SINE(0 .1 5000)
SYMBOL res 656 80 R0
SYMATTR InstName R2
SYMATTR Value {Vbat/(2*Iq)}
SYMBOL res 320 112 R0
SYMATTR InstName R3
SYMATTR Value {10*Ve/Iq}
SYMBOL res 320 384 R0
SYMATTR InstName R4
SYMATTR Value {(10*Ve/Iq)/(Vbat/(Ve+Vbe)-1)}
SYMBOL cap 304 240 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C1
SYMATTR Value 10ľ
SYMBOL res 784 384 R0
SYMATTR InstName R5
SYMATTR Value {(Ve/Iq)*((Vbat/(2*G)-Vtemp)/(Ve-Vbat/(2*G)+Vtemp))}
SYMBOL cap 784 512 R0
SYMATTR InstName C2
SYMATTR Value {(2*Iq*G)/(6.2832*f*(2*G*Vtemp+Vbat))}
SYMBOL res 512 288 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R6
SYMATTR Value 150k
SYMBOL cap 560 368 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C3
SYMATTR Value .033ľ
TEXT 1030 122 Left 0 !.tran 0 .05 0 1000n
TEXT 1032 168 Left 0 !.param Iq=200uA
TEXT 1032 200 Left 0 !.param Vbat=9V
TEXT 1032 232 Left 0 !.param G=20
TEXT 1032 264 Left 0 !.param f=100Hz
TEXT 1032 296 Left 0 !.param Ve=1V
TEXT 1032 328 Left 0 !.param Vbe=0.767V
TEXT 1032 360 Left 0 !.param Vtemp=25.3mV
 
On Fri, 10 Sep 2004 19:52:25 +0100, Terry Pinnell
<terrypinDELETE@THESEdial.pipex.com> wrote:

Thanks. In case anyone else who wants to try playing with an ASCII
version of it doesn't have SWCADIII, here's a screenshot of how it
loads here:
http://www.terrypin.dial.pipex.com/Images/Jonathan1.gif
Thanks, Terry. I have created PNG files from LTSpice before, but it's a series
of somewhat unfamiliar steps for me and I appreciate your help.

I was surprised just how easy the code was to imagine and then write, by the
way. I didn't know anything about the details of the .ASC files (I have posted
a question about that in the LTSpice Yahoo group), but after looking at them I
decided it was sufficiently understandable without documentation that I could
make a first-shot attempt.

The first thing I noticed were the WIRE lines in the file and the numbers used.
I knew that LTSpice probably used an abstract drawing surface for its
positioning (anyone doing Windows coding has been there and done that) and that
these numbers probably represented these positions. Four numbers meant to me,
at a guess, start and end points in (x y) format, so I went with that. I also
assumed the numbers in positions 1 and 3 would be left-right x and that those in
position 2 and 4 would be up-down y. I assumed (0,0) would be upper-left, at
first. Then I saw some negative values. But I still retained the idea that it
was positive-down and positive-right orientation, which appears to have been
correct.

Next thing was to imagine how to translate the wiring into ASCII character
positions. It seemed obvious to try and use a GCD computation to find the GCD
for all the wiring end points and use that to then "shrink" the numbers to
adjacent positions needed in the ASCII output. This seems to have worked out
really well. The schematics I've tried have their wiring tapped on the course
grid of LTSpice, which I believe is every 16 points on the abstract plane. I
have also looked into the .ASY files, just for kicks, and found that there are
often sub-16 in their positioning. For example, on the 8's in places. If I
were to try and simulate the .ASY representations, I can easily see that this
may greatly increase the overall spread of the ASCII schematic (for example,
just going from x16 to x8 would double the width and double the height.) So, my
plan is to simply hard-code (or, perhaps, define a file format that can be
easily edited) the .ASY equivalents for *known* parts. In other words, I think
it would be better to supply new .ASY equivalents for each ASCII part. There
are only four rotations to worry about and each of these may be mirrored, for a
total of 8 images needed for each ASCII part. The common ones can be quickly
defined, leaving specialty stuff for those with an interest and inclination, I
suppose.

The wiring system works by dividing up each ASCII character into four walls
arranged like:

. T .
|
|
L ----- + ----- R
|
|
. B .

In this way, I have left side, right side, bottom side, and top side walls with
a (+) dot in the middle, which may be dotted or not. Any WIRE I draw places a
DOT at the two end-points. It also draws the L&R or T&B walls through any ASCII
cell as it draws, without DOT'ing them. The starting and ending cells get only
one or the other wall, though. In the end, this provides a maximum of 32
possible permutations, but only a little more than half of those are legal ones.
The code then just decides what to emit as ASCII for each one.

I also reserve a bit to tell me if the cell is storing a specific ASCII
character rather than all these walls/dots. In that case, it overrides. That
way, I can place text and the like. The rest was dead easy, once I'd
conceptualized this in mind.

Anyway, that's my strategy.

Jon
 
Robert C Monsen schrieb:

More components would be nice; a zener diode picture is the main one I
always seem to be missing. Not a big deal.
Added Zener Diode, and made some changes so the components are
now "american-style"

Another thing, it would be really nice to be able to move sections of
the schematic around; I find myself erasing and redoing sections when
I 'paint myself into a corner'. Being able to easily move parts around
with a selection cut and paste scheme would be great. The 'add/delete
lines/columns' scheme isn't as nice as the cut/paste would be.
Added a selectbox which can be moved, copied or deleted. test it.
greetings Andy
 
Randy Day schrieb:

Oh, yeah, I found a couple of quirks in the symbol editor;
if I press left-parenthesis '(' the editing rectangle
shifts right and down instead of just right.
When I press '>' the editor moves to the next SET of
symbols in the list. They're not big issues, but they were a
couple of those 'WTF?' moments! ;)
Improved the symbol editor, just take a look
Thanks for the component.ini, they look "american ISO"
MfG Andy
 
Andreas Weber wrote:
Robert C Monsen schrieb:

More components would be nice; a zener diode picture is the main one I
always seem to be missing. Not a big deal.


Added Zener Diode, and made some changes so the components are
now "american-style"

Another thing, it would be really nice to be able to move sections of
the schematic around; I find myself erasing and redoing sections when
I 'paint myself into a corner'. Being able to easily move parts around
with a selection cut and paste scheme would be great. The 'add/delete
lines/columns' scheme isn't as nice as the cut/paste would be.


Added a selectbox which can be moved, copied or deleted. test it.
greetings Andy
Very cool! I'll try it out today. Thanks.

Bob Monsen
 

Welcome to EDABoard.com

Sponsor

Back
Top