{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 16: Special Devices"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 397"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Vp=15.#Vp=firing voltage of a unijunction transistor in Volts\n",
      "VBB=40#VBB=source voltage in Volts\n",
      "\n",
      "#Calculations&Results\n",
      "n=(Vp/VBB)#n=intrinsic stand-off ratio\n",
      "print \"The intrinsic stand-off ratio is %.3f\"%n\n",
      "R=50*(10**3)#R=resistance in ohms\n",
      "C=2000*(10**-12)#c=capacitance in farad\n",
      "T=(R*C*math.log(1/(1-n)))*(10**6)#T=time period of the sawtooth voltage across C\n",
      "print \"The time period is %.f us\"%T"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The intrinsic stand-off ratio is 0.375\n",
        "The time period is 47 us\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}