Interface ElectronicsMaking of a Web reportProf. Dr. Jörg Vollrath |
General directory web_Template. Web page html file is in subdirectory "2017_Group01". The other directories contain general used modules.
Open Access: No cost. |
Presentation modeThere is a button to switch between presentation and handout mode.Top right corner. Graphics and text are scaled accordingly. Hovering with the mouse in the lower right you can select the next slide or bring you back to outline mode |
Text Editor likeNotepad++ Syntax highlighting Special control sequences needed. (HTML, JavaScript) Very compact code. HTML Authoring: Microsoft Expression Web WYSIWYG Editor What you see is what you get Creates a lot of overhead formatting No JavaScript live view. |
<div id="myDivID" class="slide">
</div>
<SPAN id="mySpanID" class="slide">
</SPAN>
HTML Comments:
<!----- Column1 ----------->
Headings:
<h1>Header 1</h1>
<h1>Header 2</h1>
<h1>Header 3</h1>
Images:
<img src="Images/Notepad++.png" width="300">
A module S5 is used for switching between presentation mode and handout. This scales all text and graphics accordingly and adds controls. Each slide starts with a 'div' with 'class' "slide".
Each slide can have additional text with a 'div' with 'class' "handout".
|
<!-- metadata -->
<meta name="generator" content="S5" />
<meta name="version" content="S5 1.1" />
<meta name="presdate" content="20121001" />
<meta name="author" content="Joerg Vollrath" />
<meta name="company" content="Kempten University of Applied Science" />
<!-- configuration parameters -->
<meta name="defaultView" content="outline" />
<meta name="controlVis" content="hidden" />
<!-- style sheet links -->
<link rel="stylesheet" type="text/css" href="../css/style.css" media="all" />
<link rel="stylesheet" href="../ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
<link rel="stylesheet" href="../ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
<link rel="stylesheet" href="../ui/default/print.css" type="text/css" media="print" id="slidePrint" />
<link rel="stylesheet" href="../ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
<!-- embedded styles -->
<style type="text/css" media="all">
.imgcon {width: 525px; margin: 0 auto; padding: 0; text-align: center;}
#anim {width: 270px; height: 320px; position: relative; margin-top: 0.5em;}
#anim img {position: absolute; top: 42px; left: 24px;}
img#me01 {top: 0; left: 0;}
img#me02 {left: 23px;}
img#me04 {top: 44px;}
img#me05 {top: 43px;left: 36px;}
</style>
<!-- S5 JS -->
<script src="../ui/default/slides.js" type="text/javascript"></script>
There is also code needed for displaying the slide:
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<div id="header"></div>
<div id="footer">
<hr>
<h1>2017 01 11 Interface Electronics 10 Pipeline Prof. Dr. Joerg Vollrath </h1>
</div>
</div>
The best stratgey is to reuse example code, copy it and modify it.
JavaScript module SPICE_HTML_2018_02/LTSPICE.js Canvas, Control, Link, Code parts Add schematics to processing list ID has to be the same as the schematic name. |
<!-- LTSPICE -->
<SCRIPT SRC="../SPICE_HTML_2018_02/LTSPICE.js"></SCRIPT>
<canvas id="WS2011_Prob4" width="400" height="300" level="1" class="LTSPICE"
sym="Switch"> </canvas>
document.addEventListener("load", findLT());
Code | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
Vout[V] | ||||||||
INL[LSB] | ||||||||
DNL[LSB] |
Code | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
Vout[V] | 0 | 0.4 | 0.9 | 1.55 | 2.05 | 2.55 | 3.0 | 3.5 |
INL[LSB] | 0 | -0.2 | -0.2 | 0.1 | 0.1 | 0.1 | 0 | 0 |
DNL[LSB] | -0.2 | 0 | 0.3 | 0 | 0 | -0.1 | 0 |
<!-- TABLE -->
<table border=1>
<tr><td>row 1, col 1</td><td> row 1, col 2 </td><td> row 1, col3 </td></tr>
<tr><td>row 2, col 1</td><td> row 2, col 2 </td><td> row 2, col3 </td></tr>
<tr><td>row 3, col 1</td><td> row 3, col 2 </td><td> row 3, col3 </td></tr>
</table>
A | B | C | D | E | F | |
5 | v1 | I(R1) | I(Gleichung) | Fehlerquadrate | I(R1*0.999) | Fehler(R1*0.999 |
6 | -2.00 | -1.00E-02 | -0.0666667 | =(C6-B6)*(C6-B6) | =A6/(0.999*$B$2) | =(E6-B6)*(E6-B6) |
<table cellspacing="0" cellpadding="5" border="1"
bordercolorlight="#000000" bordercolordark="#000000" bordercolor="#000000">
<tr bgcolor="#CCCCCC">
<td width="100" align="right" ></td>
<!-- LTSPICE -->
<SCRIPT SRC="../SPICE_HTML_2013_03_11/LTSPICE.js"></SCRIPT>
<!-- Prettify Google -->
<link href="../google-code-prettify/src/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../google-code-prettify/src/prettify.js"></script>
<script type="text/javascript" src="../google-code-prettify/src/lang-vhdl.js"></script>
...
document.addEventListener("load", prettyPrint());
Reso-
lution (Bits);Sam-
ple rate [MHz];Power consumption
[W]; Architecture, Technology
(Si, GaAs, SiGe,..); Power supply
voltage[V] ; ADC Input
range, DAC out-
put range;Feature size [um]; Chip size mm2;Typ: ADC, DAC;Year;Cita-
tion 4;35000 ;4.5 ;Flash, SiGe;3.3;NA ; 0.18 ; 8 ; ADC ; 2009 ;[1] 12; 104M; 0.88m ;SAR ;1.1/1.2; N/A; 0.028; 0.003; ADC; 2016; [2] 9; 1.8G; 44m; Pipeline; 1.2; N/A; 65; 0.15; ADC; 2016; [3]
<!-- ChaRt -->
<SCRIPT src="../Chart_2013_03_11/Chart_basic.js"></SCRIPT>
Charts can be generated.
function plotSine() {
var aXY = new Array();
var grN = 30;
for (var i = 0; i < grN; i++) {
aXY[i] = i;
aXY[i + grN] = 10 * Math.sin(i * Math.PI /5)
}
ScatterPlot("sineChart","Heading",aXY,grN,
"x axis","lin","auto",
"y axis","lin","auto","Grid");
}
add_chart(plotSine);
<!-- MathJax -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$$","$$"],["\\(","\\)"]]}
});
</script>
<script type="text/javascript" src="../MathJax/MathJax.js"></script>
Equations can be set in LATEX style:([ V_O = V_{ref} \sum_{i=0}^{N-1} \frac{D_{i}}{2^{N-i}} \)\( V_O = V_{ref} \sum_{i=0}^{N-1} \frac{D_{i}}{2^{N-i}} \)
parseInt(text);
parseFloat(text);
a.toFixed(4);
a.toExponential(4);
Example: Cross section
|
Output curve transfer curve |
<!-- QR Code --> <script src="../QRCode/jsqr-1.0.2.js" type="text/javascript"></script> <canvas id="thisQR"></canvas>At the end of this document the QR code of this webpage is displayed in the canvas.
<img src="data:image/png;base64,iVBOR" alt="" width="300" />The string can be generated with:
var blobUrl = URL.createObjectURL(data.blob);Example:
<!-- Paste helping function -->
<script type="text/javascript" src="../scripts/paste.js"></script>
$(function(){
$('.p1textarea').pastableTextarea();
$('.p1demo').on('pasteImage', function(ev, data){
var blobUrl = URL.createObjectURL(data.blob);
$('<div class="result" id="blob1"> <a href="' + blobUrl + '">'
+ '<img src="' + data.dataURL +'" width="600">'
+ '</a></div>').insertAfter(this);
}).on('pasteText', function(ev, data){
$('<div class="result" id="blob1"></div>').text('text: "'
+ data.text + '"').insertAfter(this);
});
});
Insert here the picture.
Insert here the picture.<br><br>
<textarea class="p1demo p1textarea" id="BCounter" rows="2" cols = "60">
Copy a screenshot (< Alt > < Druck > ) from the Clipboard ( < Strg > v ).
</textarea>
try {
$('#idDivExternalFile').load('filename.ext');
}
catch(err){}
The file 'filename.ext' is loaded into the block with id 'idDivExternalFile'.
function startEval() {
var notloaded = false;
if ( document.getElementById("idDivExternalFile").innerHTML.length < 60) {
notloaded = true;
}
if ( notloaded ) {
setTimeout(startEval,500);
} else {
evaluate("idDivExternalFile");
}
}
<input type="file" id="fileinput" />
An example is given with LTSPICE in the LTSPICE Javascript code.
document.getElementById('fileinput').addEventListener('change', readSingleFile, false);
function readSingleFile(evt) {
//Retrieve the first (and only!) File from the FileList object
var f = evt.target.files[0];
var r = new FileReader();
if (f.name.substr(f.name.length-3,3)=="asc") {
r.onload = function(e) { // look at data
var contents = e.target.result;
}
r.readAsText(f);
} else {
r.onload = function(e) { // look at data
var contents = new DataView(e.target.result);
}
r.readAsArrayBuffer(f);
}
}
The function r.onload is evaluating the data from the client file.
<SELECT id="sOption" onclick="allS();">
<option value="0" selected="">Option 0 </option>
<option value="1" >Option 1 </option>
<option value="2" >Option 2 </option>
<option value="3">Option 3 </option>
</SELECT>
<script type="text/javascript">
<!-- Begin
function allS() {
document.getElementById('option').innerHTML = document.getElementById('sOption').value;
}
// End -->
</script >
Selected Option:
<canvas id="myDrawing" class="drawS" width="200"
height="100">
BB|100|100| First line always
bounding box
SS|#777777| Stroke style
PB| Begin Path
LI|0|0|10|10| Line
ST| Stroke
</canvas>
document.addEventListener("load",findDrawS());
PB: | Begin Path | beginPath() |
PC: | Close Path | closePath() |
LI: | Line x1,y1,x2,y2.. | moveTo(), lineTo(), |
AR: | ARC | |
RF: | Fill rectangle | |
RC: | Rectangle | |
RS: | Stroke rectangle | |
FT: | Fill text | |
SF: | Fill style | |
IM: | Image | |
SS: | Stroke style | |
ST: | Stroke | |
FI: | Fill | |
LW: | Linewidth | |
FO: | Font | |
AL: | Alpha | |
CS: | Save context | |
CR: | Restore context | |
CT: | Translate context | |
CA: | Rotate angle context | |
SE: | Start element/block | |
EL: | Element | |
XE: | End element/block | |
##: | Comment |
Top Left
|
Canvas Top Left
|
<style>
img.ov {
position: absolute;
left: 0px;
top: 0px;
z-index: -1;
}
.container {
position: relative;
}
.topleft {
position: absolute;
top: 8px;
left: 16px;
font-size: 18px;
}
</style>
<table><tr><td>
<div class="container">
<img src="Images/w3css.gif" alt="Norway" width="100" height="140">
<div class="topleft">Top Left</div>
</div>
</td><td>
<div class="container">
<canvas id="test" width="100" height="100"></canvas>
<div class="topleft">Canvas Top Left</div>
</div>
</td></tr></table>
MyFolder>npm install connect serve-static
var connect = require('connect');
var serveStatic = require('serve-static');
connect().use(serveStatic(__dirname)).listen(8080, function(){
console.log('Server running on 8080...');
});
Start the server in the web directory with: