Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Drawing timing diagrams/waveforms in source file

Status
Not open for further replies.

BlackHelicopter

Full Member level 2
Joined
Jun 3, 2010
Messages
128
Helped
13
Reputation
26
Reaction score
13
Trophy points
1,298
Activity points
2,159
Example:
Code:
-- 
--          __     __     __     __     __     __     __     __     __     __     __    
-- CLK    _/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \__
--              _______________________________________________________________________
-- RST_N  _____/
--                      ______
-- LD_DATA_____________/      \________________________________________________________
-- 
--        _____________________________________________________________________________
-- DATA_IN___________AA___________________AA________________AA____________AA___________
--            
--                        ______________________________________________________
-- BUSY   _______________/                                                      \______
--        ______________________ ______ ______ ______ ______ ______ ______ ____________  
-- COUNT_i___________0__________X__1___X__2___X__3___X__4___X__5___X__6___X__7_____7___    
--            
--        ______________________ ______ ______ ______ ______ ______ ______ ______ _____  
-- COUNT  ___________0__________X__0___X__1___X__1___X__2___X__2___X__3___X__3___X_4___

How is this done?


This was taken from nand_gates post below:

https://www.edaboard.com/threads/127591/
 

SunnySkyguy

Advanced Member level 5
Joined
Sep 26, 2007
Messages
6,743
Helped
1,675
Reputation
3,348
Reaction score
1,644
Trophy points
1,413
Location
Richmond Hill, ON, Canada
Activity points
50,732
using monospaced fonts like COURIER NEW

It was once used for more than timing diagrams.

.. _....__.. ___.._____ _____.... _........_...... ___...... _ _.......... _.. _............
../_\../ _\ / __\ \_.. \\_.. \.. /_\.._ __| |_..../ __\ ___ | | | ___..___| |_(_) ___.._ __..
.//_\\ \ \ / /.... / /\/ / /\/..//_\\| '__| __|../ /.. / _ \| | |/ _ \/ __| __| |/ _ \| '_ \
/.._..\_\ | /___/\/ /_/\/ /_.. /.._..\ |..| |_../ /___| (_) | | |..__/ (__| |_| | (_) | | | |
\_/ \_/\__|____/\____/\____/.. \_/ \_/_|.. \__| \____/ \___/|_|_|\___|\___|\__|_|\___/|_| |_|
..............................................................................................

but this site filters out 2 spaces into 1, so I used dots.

Also since Underscore and hyphens exist but no "overscore", lines are crafted using the underscore on the line above.
So in effect a raster scan offset by 1/2 row.

_-_-_-_ _ just uses underscore_ and hyphen - and is not as pretty.

__ __ __ __ __ __ __ __ __ __ __
inserted line
_/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \__



__ __ __ __ __ __ __ __ __ __ __
_/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \___/ \__

Notice it does work here since extra spaces are
gulped

Code:
--          __     __     __     __     __     __     __     __     __     __     __     
--    CLK _/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \___/  \_
   _    __   ___  _____ _____     _        _       ___       _ _           _   _             
  /_\  / _\ / __\ \_   \\_   \   /_\  _ __| |_    / __\ ___ | | | ___  ___| |_(_) ___  _ __  
 //_\\ \ \ / /     / /\/ / /\/  //_\\| '__| __|  / /   / _ \| | |/ _ \/ __| __| |/ _ \| '_ \ 
/  _  \_\ | /___/\/ /_/\/ /_   /  _  \ |  | |_  / /___| (_) | | |  __/ (__| |_| | (_) | | | |
\_/ \_/\__|____/\____/\____/   \_/ \_/_|   \__| \____/ \___/|_|_|\___|\___|\__|_|\___/|_| |_|
But in CODE script it is allowed.
 

BlackHelicopter

Full Member level 2
Joined
Jun 3, 2010
Messages
128
Helped
13
Reputation
26
Reaction score
13
Trophy points
1,298
Activity points
2,159
Did you draw that by hand, also what editor do you use?
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,804
Helped
1,809
Reputation
3,628
Reaction score
1,768
Trophy points
1,393
Location
USA
Activity points
58,893
It's purely text based using the symbols "_" (underscore), "-" (hyphen), "/" (forward slash), "\" (backslash), "|" (pipe), etc.

I tend to use this quite a bit on this forum as it's easier than using Visio, but you have to set the font to a fixed width font such as "Courier New" otherwise the figures and timing diagrams are distorted by the proportional spaced fonts.

Copy the image in post #2 into a fixed width font (programmers) text editor and you'll see how it's done. You can use GVIM or any other text editor to produce stuff like that (plus a lot of time ;-))
 

BlackHelicopter

Full Member level 2
Joined
Jun 3, 2010
Messages
128
Helped
13
Reputation
26
Reaction score
13
Trophy points
1,298
Activity points
2,159
Thanks for the tips! I currently use Emacs, I thought there might be a shortcut or program to help draw the lines and pulses with the mouse.
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,804
Helped
1,809
Reputation
3,628
Reaction score
1,768
Trophy points
1,393
Location
USA
Activity points
58,893
Thanks for the tips! I currently use Emacs, I thought there might be a shortcut or program to help draw the lines and pulses with the mouse.

Both Emacs and vim are open source projects, so maybe you can add that feature into the code! :)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top