text:
Serial Programming/DOS Programming

Introduction
It is now time to build on everything that has been established so far. While it is unlikely that you are going to be using MS-DOS for a major application, it is a good operating system to demonstrate a number of ideas related to software access of the 8250 UART and driver development. Compared to modern operating systems like Linux, OS-X, or Windows, MS-DOS can hardly be called an operating system at all. All it really offers is basic access to the hard drive and a few minor utilities. That really doesn't matter so much for what we are dealing with here, and it is a good chance to see how we can directly manipulate the UART to get the full functionality of all aspects of the computer. The tools I'm using are all available for free (as in beer) and can be used in emulator software (like VMware or Bochs) to try these ideas out as well. Emulation of serial devices is generally a weak point for these programs, so it may work easier if you work from a floppy boot of DOS, or on an older computer that is otherwise destined for the trash can because it is obsolete.

For Pascal, you can look here:

 * Turbo Pascal version 5.5 - This is the software I'm actually using for these examples, and the compiler that most older documentation on the web will also support (generally).

 * Free Pascal - *note* this is a 32-bit version, although there is a port for DOS development.  Unlike Turbo Pascal, it also has ongoing development and is more valuable for serious projects running in DOS.

For MS-DOS substitution (if you don't happen to have MS-DOS 6.22 somewhere):

 * FreeDOS Project - Now that Microsoft has abandoned development of DOS, this is pretty much the only OS left that is pure command line driven and following the DOS architecture.

Hello World, Serial Data Version
In the introduction, I mentioned that it was very difficult to write computer software that implements RS-232 serial communications. A very short program shows that at least a basic program really isn't that hard at all. In fact, just three more lines than a typical "Hello World" program.

All of this works because in DOS (and all version of Windows as well... on this particular point) has a "reserved" file name called COM1 that is the operating system hooks into the serial communications ports. While this seems simple, it is deceptively simple. You still don't have access to being able to control the baud rate or any of the other settings for the modem. That is a fairly simple thing to add, however, using the knowledge of the UART discussed in the previous chapter Programming the 8250 UART.

To try something even easier, you don't even need a compiler at all. This takes advantage of the reserved "device names" in DOS and can be done from the command prompt.

C:\>COPY CON COM1

What you are doing here is taking input from CON (the console or the standard keyboard you use on your computer) and it "copies" the data to COM1. You can also use variations of this to do some interesting file transfers, but it has some important limitations. Most importantly, you don't have access to the UART settings, and this simply uses whatever the default settings of the UART might be, or what you used last time you changed the settings to become with a serial terminal program.

Finding the Port I/O Address for the UART
The next big task that we have to work with is trying to find the base "address" of the Port I/O so that we can communicate with the UART chip directly (see the part about interface logic in the Typical RS232-Hardware Configuration module for information what this is about). For a "typical" PC system, the following are usually the addresses that you need to work with:

Looking up UART Base Address in RAM
We will get back to the issue of the IRQ Number in a little bit, but for now we need to know where to start accessing information about each UART. As demonstrated previously, DOS also keeps track of where the UART IO ports are located at for its own purpose, so you can try to "look up" within the memory tables that DOS uses to try and find the correct address as well. This doesn't always work, because we are going outside of the normal DOS API structure. Alternative operating systems ( FreeDOS works fine here ) that are otherwise compatible with MS-DOS may not work in this manner, so take note that this may simply give you a wrong result altogether.

The addresses for the serial I/O Ports can be found at the following locations in RAM:

Those addresses are written to memory by the BIOS when it boots. If one of the ports doesn't exist, the BIOS writes zero to the respective address. Note that the addresses are given in segment:offset format and that you have to multiply the address of the segment with 16 and add the offset to get to the physical address in memory. This is where DOS "finds" the port addresses so you can run the first sample program in this chapter.

In assembler you can get the addresses like this:

In Turbo Pascal, you can get at these addresses almost the same way and in some ways even easier because it is a "high level language". All you have to do is add the following line to access the COM Port location as a simple array:

The reserved, non standard, word absolute is a flag to the compiler that instead of "allocating" memory, that you already have a place in mind to have the computer look instead. This is something that should seldom be done by a programmer unless you are accessing things like these I/O port addresses that are always stored in this memory location.

For a complete program that simply prints out a table of the I/O port addresses for all four standard COM ports, you can use this simple program:

Searching BIOS Setup
Assuming that the standard I/O addresses don't seem to be working for your computer and you haven't been able to find the correct I/O Port offset addresses through searching RAM either, all hope is still not lost. Assuming that you have not accidentally changed these settings earlier, you can also try to look up these numbers in the BIOS setup page for your computer. It may take some pushing around to find this information, but if you have a conventional serial data port on your computer, it will be there.

If you are using a serial data port that is connected via USB (common on more recent computers), you are simply not going to be (easily) able to do direct serial data communications in DOS. Instead, you need to use more advanced operating systems like Windows or Linux that is beyond the scope of this chapter. We will cover how to access the serial communications routines in those operating systems in subsequent chapters. The basic principles we are discussing here would still be useful to review because it goes into the basic UART structure.

While it may be useful to try and make IRQs selectable and not presume that the information listed above is correct in all situations, it is important to note that most PC-compatible computer equipment usually has these IRQs and I/O port addresses used in this way because of legacy support. And surprisingly as computers get more sophisticated with even more advanced equipment like USB devices, these legacy connections still work for most equipment.

Making modifications to UART Registers
Now that we know where to look in memory to modify the UART registers, let's put that knowledge to work. We are also now going to do some practical application of the tables listed earlier in the chapter 8250 UART Programming.

To start with, let's redo the previous "Hello World" application, but this time we are going to set the RS-232 transmission parameters to 1200 baud, 7 databits, even parity, and 2 stop bits. I'm choosing this setting parameter because it is not standard for most modem applications, as a demonstration. If you can change these settings, then other transmission settings are going to be trivial.

First, we need to set up some software constants to keep track of locations in memory. This is mainly to keep things clear to somebody trying to make changes to our software in the future, not because the compiler needs it.

Next, we need to set the DLAB to a logical "1" so we can set the baud rate:

In this case, we are ignoring the rest of the settings for the Line Control Register (LCR) because we will be setting them up in a little bit. Remember this is just a "quick and dirty" way to get this done for now. A more "formal" way to set up things like baud rate will be demonstrated later on with this module.

Following this, we need to put in the baud rate for the modem. Looking up 1200 baud on the Divisor Latch Bytes table gives us the following values:

Now we need to set the values for the LCR based on our desired setting of 7-2-E for the communication settings. We also need to "clear" the DLAB which we can also do at the same time.

Are things clear so far? What we have just done is some bit-wise arithmetic, and I'm trying to keep things very simple here and to try and explain each step in detail. Let's just put the whole thing together as the quick and dirty "Hello World", but with adjustment of the transmission settings as well:

This is getting a little more complicated, but not too much. Still, all we have done so far is just write data out to the serial port. Reading data from the serial data port is going to be a little bit trickier.

Basic Serial Input
In theory, you could use a standard I/O library and simply read data from the COM port like you would be reading from a file on your hard drive. Something like this:

There are some problems with doing that with most software, however. One thing to keep in mind is that using a standard input routine will stop your software until the input is finished ending with a "Enter" character (ASCII code 13 or in hex $0D).

Usually what you want to do with a program that receives serial data is to allow the user to do other things while the software is waiting for the data input. In a multitasking operating system, this would simply be put on another "thread", but with this being DOS, we don't (usually) have threading capabilities, nor is it necessary. There are some other alternatives that we do in order to get the serial data brought into your software.

Polling the UART
Perhaps the easiest to go, besides simply letting the standard I/O routines grab the input) is to do software polling of the UART. One of the reasons why this works is because serial communications is generally so slow compared to the CPU speed that you can perform many tasks in between each character being transmitted to your computer.  Also, we are trying to do practical applications using the UART chip, so this is a good way to demonstrate some of the capabilities of the chip beyond simple output of data.

Serial Echo Program
Looking at the Line Status Register (LSR), there is a bit called Data Ready that indicates there is some data available to your software in the UART. We are going to take advantage of that bit, and start to do data access directly from the UART instead of relying on the standard I/O library. This program we are going to demonstrate here is going to be called Echo because all it does is take whatever data is sent to the computer through the serial data port and display it on your screen. We are also going to be configuring the RS-232 settings to a more normal 9600 baud, 8 data bits, 1 stop bit, and no parity. To quit the program, all you have to do is press any key on your keyboard.

Simple Terminal
This program really isn't that complicated. In fact, a very simple "terminal" program can be adapted from this to allow both sending and receiving characters. In this case, the Escape key will be used to quit the program, which will in fact be where most of the changes to the program will happen. We are also introducing for the first time direct output into the UART instead of going through the standard I/O libraries with this line:

The Transmit Holding Register (THR) is how data you want to transmit gets into the UART in the first place. DOS just took care of the details earlier, so now we don't need to open a "file" in order to send data. We are going to assume, to keep things very simple, that you can't type at 9600 baud, or roughly 11,000 words per minute. Only if you are dealing with very slow baud rates like 110 baud is that going to be an issue anyway (still at over 130 words per minute of typing... a very fast typist indeed).

Interrupt Drivers in DOS
The software polling method may be adequate for most simple tasks, and if you want to test some serial data concepts without writing a lot of software, it may be sufficient. Quite a bit can be done with just that method of data input.

When you are writing a more complete piece of software, however, it becomes important to worry about the efficiency of your software. While the computer is "polling" the UART to see if a character has been sent through the serial communications port, it spends quite a few CPU cycles doing absolutely nothing at all. It also get very difficult to expand a program like the one demonstrated above to become a small section of a very large program. If you want to get that last little bit of CPU performance out of your software, we need to turn to interrupt drivers and how you can write them.

I'll openly admit that this is a tough leap in complexity from a simple polling application listed above, but it is an important programming topic in general. We are also going to expose a little bit about the low-level behavior of the 8086 chip family, which is knowledge you can use in newer operating systems as well, at least for background information.

Going back to earlier discussions about the 8259 Programmable Interrupt Controller (PIC) chip, external devices like the UART can "signal" the 8086 that an important task needs to occur that interrupts the flow of the software currently running on the computer. Not all computers do this, however, and sometimes the software polling of devices is the only way to get data input from other devices. The real advantage of interrupt events is that you can process data acquisition from devices like the UART very quickly, and CPU time spent trying to test if there is data available can instead be used for other tasks. It is also useful when designing operating systems that are event driven.

Interrupt Requests (IRQs) are labeled with the names IRQ0 to IRQ15. UART chips typically use either IRQ 3 or IRQ 4. When the PIC signals to the CPU that an interrupt has occurred, the CPU automatically start to run a very small subroutine that has been previously setup in the Interrupt Table in RAM. The exact routine that is started depends on which IRQ has been triggered. What we are going to demonstrate here is the ability to write our own software that "takes over" from the operating system what should occur when the interrupt occurs. In effect, writing our own "operating system" instead, at least for those parts we are rewriting.

Indeed, this is exactly what operating system authors do when they try to make a new OS... deal with the interrupts and write the subroutines necessary to control the devices connected to the computer.

The following is a very simple program that captures the keyboard interrupt and produces a "clicking" sound in the speaker as you type each key. One interesting thing about this whole section, while it is moving slightly off topic, this is communicating with a serial device. The keyboard on a typical PC transmits the information about each key that you press through a RS-232 serial protocol that operates usually between 300 and 1200 baud and has its own custom UART chip. Normally this isn't something you are going to address, and seldom are you going to have another kind of device connected to the keyboard port, but it is interesting that you can "hack" into the functions of your keyboard by understanding serial data programming.

There are a number of things that this program does, and we need to explore the realm of 16-bit DOS software as well. The 8086 chip designers had to make quite a few compromises in order to work with the computer technology that was available at the time it was designed. Computer memory was quite expensive compared to the overall cost of the computer. Most of the early microcomputers that the IBM-PC was competing against only had 64K or 128K of main CPU RAM anyway, so huge programs were not considered important. In fact, the original IBM-PC was designed to operate on only 128K of RAM although it did become standard with generally up to 640K of main RAM, especially by the time the IBM PC-XT was released and the market for PC "clones" turned out what is generally considered the "standard PC" computer today.

The design came up with what is called segmented memory, where the CPU address is made up of a memory "segment" pointer and a 64K block of memory. That is why some early software on these computers could only run in 64K of memory, and created nightmares for compiler authors on the 8086. Pentium computers don't generally have this issue, as the memory model in "protected mode" doesn't use this segmented design methodology.

Far Procedure Calls
This program has two "compiler switches" that inform the compiler of the need to use what are called far procedure calls. Normally for small programs and simple subroutines, you are able to use what is called relative indexing with the software so the CPU "jumps" to the portion of RAM with the procedure by doing a bit of simple math and "adding" a number to the current CPU address in order to find the correct instructions. This is done especially because it uses quite a bit less memory to store all of these instructions.

Sometimes, however, a procedure must be accessed from somewhere in RAM that is quite different from the current CPU memory address "instruction pointer". Interrupt procedures are one of these, because it doesn't even have to be the same program that is stored in the interrupt vector table. That brings up the next part to discuss:

Interrupt Procedures
The word "interrupt" after this procedure name is a key item here. This tells the compiler that it must do something a little bit different when organizing this function than how a normal function call behaves. Typically for most software on the computer, you have a bunch of simple instructions that are then followed by (in assembler) an instruction called:

This is the mnemonic assembly instruction for return from procedure call. Interrupts are handled a little bit differently and should normally end with a different CPU instruction that in assembly is called:

or Interrupt return for short. One of the things that should also happen with any interrupt service routine is to "preserve" the CPU information before doing anything else. Each "command" that you write in your software will modify the internal registers of the CPU. Keep in mind that an interrupt can occur right in the middle of doing some calculations for another program, like rendering a graphic image or making payroll calculations. We need to hand onto that information and "restore" those values on all of the CPU registers at the end of our subroutine. This is usually done by "pushing" all of the register values onto the CPU stack, performing the ISR, and then restoring the CPU registers afterward.

In this case, Turbo Pascal (and other well-written compilers having a compiler flag like this) takes care of these low-level details for you with this simple flag. If the compiler you are using doesn't have this feature, you will have to add these features "by hand" and explicitly put them into your software. That doesn't mean the compiler will do everything for you to make an interrupt procedure. There are more steps to getting this to work still.

Procedure Variables
These instructions are using what is called a procedure variable. Keep in mind that all software is located in the same memory as variables and other information your software is using. Essentially, a variable procedure where you don't need to worry about what it does until the software is running, and you can change this variable while your program is running. This is a powerful concept that is not often used, but it can be used for a number of different things. In this case we are keeping track of the previous interrupt service routine and "chaining" these routines together.

There are programs called Terminate and Stay Resident (TSRs) that are loaded into your computer. Some of these are called drivers, and the operating system itself also puts in subroutines to do basic functions. If you want to "play nice" with all of this other software, the established protocol for making sure everybody gets a chance to review the data in an interrupt is to link each new interrupt subroutine to the previously stored interrupt vector. When we are done with whatever we want to do with the interrupt, we then let all of the other programs get a chance to use the interrupt as well. It is also possible that the Interrupt Service Routine (ISR) that we just wrote is not the first one in the chain, but instead one that is being called by another ISR.

Getting/Setting Interrupt Vectors
Again, this is Turbo Pascal "hiding" the details in a convenient way. There is a "vector table" that you can directly access, but this vector table is not always in the same location in RAM. If instead you go through the BIOS with a software interrupt, you are "guaranteed" that the interrupt vector will be correctly replaced.

Hardware Interrupt Table
This table gives you a quick glance at some of the things that interrupts are used for, and the interrupt numbers associated with them. Keep in mind that the IRQ numbers are mainly reference numbers, and that the CPU uses a different set of numbers. The keyboard IRQ, for example, is IRQ1, but it is numbered as interrupt $09 inside the CPU.

There are also several interrupts that are "generated" by the CPU itself. While technically hardware interrupts, these are generated by conditions within the CPU, sometimes based on conditions setup by your software or the operating system. When we start writing the interrupt service routine for the serial communication ports, we will be using interrupts 11 and 12 ($0B and $0C in hex). As can be seen, most interrupts are assigned for specific tasks. I've omitted the software interrupts mainly to keep this on topic regarding serial programming and hardware interrupts.

Other features
There are several other parts to this program that don't need too much more explanation. Remember, we are talking about serial programming, not interrupt drivers. I/O Port $60 is interesting as this is the Receiver Buffer (RBR) for the keyboard UART. This returns the keyboard "scan code", not the actual character pressed. In fact, when you use a keyboard on a PC, the keyboard actually transmits two characters for each key that you use. One character is transmitted when you press the key down, and another character when the key is "released" to go back up. In this case, the interrupt service routine in DOS normally converts the scan codes into ASCII codes that your software can use. In fact, simple keys like the shift key are treated as just another scan code.

The sound routines access the internal PC speaker, not something on a sound card. About the only thing that uses this speaker any more is the BIOS "beep codes" that you hear only when there is a hardware failure to your computer, or the quick "beep" when you start or reboot the computer. It was never designed for doing things like speech synthesis or music playback, and driver attempts to use it for those purposes sound awful. Still, it is something neat to experiment with and a legacy computer part that is surprisingly still used on many current computers..

Terminal Program Revisited
I'm going to go back to the serial terminal program for a bit and this time redo the application by using an interrupt service routine. There are a few other concepts I'd like to introduce as well so I'll try to put them in with this example program. From the user perspective, I would like to add the ability to change the terminal characteristics from the command line and allow an "end-user" the ability to change things like the baud rate, stop bits, and parity checking, and allow these to be variables instead of hard-coded constants. I'll explain each section and then put it all together when we are through.

Serial ISR
This is an example of a serial ISR we can use:

This isn't that much different from the polling method that we used earlier, but keep in mind that by placing the checking inside an ISR that the CPU is only doing the check when there is a piece of data available. Why even check the LSR to see if there is a data byte available? Reading data sent to the UART is not the only reason why the UART will invoke an interrupt. We will go over that in detail in a later section, but for now this is good programming practice as well, to confirm that the data is in there.

By moving this checking to the ISR, more CPU time is available for performing other tasks. We could even put the keyboard polling into an ISR as well, but we are going to keep things very simple for now.

FIFO disabling
There is one minor problem with the way we have written this ISR. We are assuming that there is no FIFO in the UART. The "bug" that could happen with this ISR as it is currently written is that multiple characters can be in the FIFO buffer. Normally when this happens, the UART only sends a single interrupt, and it is up to the ISR to "empty" the FIFO buffer completely.

Instead, all we are going to do is simply disable the FIFO completely. This can be done using the FCR (FIFO Control Register) and explicitly disabling the FIFO. As an added precaution, we are also going to "clear" the FIFO buffers in the UART as a part of the initialization portion of the program. Clearing the FIFOs look like this:

Disabling the FIFOs look like this:

We will be using the FIFOs in the next section, so this is more a brief introduction to this register so far.

Working with the PIC
Up until this point, we didn't have to worry about working with the Programmable Interrupt Controller (the PIC). Now we need to. There isn't the need to do all of the potential instructions for the PIC, but we do need to enable and disable the interrupts that are used by the UART. There are two PICs typically on each PC, but due to the typical UART IRQ vector, we really only have to deal with the master PIC.

This adds the following two constants into the software:

After consulting the PIC IRQ table we need to add the following line to the software in order to enable IRQ4 (used for COM1 typically):

When we do the "cleanup" when the program finishes, we also need to disable this IRQ as well with this line of software:

Remember that COM2 is on another IRQ vector, so you will have to use different constants for that IRQ. That will be demonstrated a little bit later. We are using a logical and/or with the existing value in this PIC register because we don't want to change the values for the other interrupt vectors that other software and drivers may be using on your PC.

We also need to modify the Interrupt Service Routine (ISR) a little bit to work with the PIC. There is a command you can send to the PIC that is simply called End of Interrupt (EOI). This signals to the PIC that it can clear this interrupt signal and process lower-priority interrupts. If you fail to clear the PIC, the interrupt signal will remain and none of the other interrupts that are "lower priority" can be processed by the CPU. This is how the CPU communicates back to the PIC to end the interrupt cycle.

The following line is added to the ISR to make this happen:

Modem Control Register
This is perhaps the most non-obvious little mistake you can make when trying to get the UART interrupt. The Modem Control register is really the way for the UART to communicate to the rest of the PC. Because of the way the circuitry on the motherboards of most computers is designed, you usually have to turn on the Auxiliary Output 2 signal in order for interrupts to "connect" to the CPU. In addition, here we are going to turn on the RTS and DTS signals on the serial data cable to make sure the equipment is going to transmit. We will cover software and hardware flow control in a later section.

To turn on these values in the MCR, we need to add the following line in the software:

Interrupt Enable Register
We are still not home free yet. We still need to enable interrupts on the UART itself. This is very simple, and for now all we want to trigger an interrupt from the UART is just when data is received by the UART. This is a very simple line to add here:

Putting this together so far
Here is the complete program using ISR input:

At this point you start to grasp how complex serial data programming can get. We are not finished yet, but if you have made it this far you hopefully understand each part of the program listed above. We are going to try and stay with this one step at a time, but at this point you should be able to write some simple custom software that uses serial I/O.

Command Line Input
There are a number of different ways that you can "scan" the parameters that start the program. For example, if you start a simple terminal program in DOS, you can use this command to begin:

C:> terminal COM1 9600 8 1 None

or perhaps

C:> terminal COM4 1200 7 2 Even

Obviously there should not be a need to have the end-user recompile the software if they want to change something simple like the baud rate. What we are trying to accomplish here is to grab those other items that were used to start the program. In Turbo Pascal, there is function that returns a string

which contains each item of the command line. These are passed to the program through strings. A quick sample program on how to extract these parameters can be found here:

One interesting "parameter" is parameter number 0, which is the name of the program that is processing the commands. We will not be using this parameter, but it is something useful in many other programming situations.

Grabbing Terminal Parameters
For the sake of simplicity, we are going to require that either all of the parameters are going to be in that format of baud rate, bit size, stop bits, parity; or there will be no parameters at all. This example is going to be mainly to demonstrate how to use variables to change the settings of the UART by the software user rather than the programmer. Since the added sections are self-explanatory, I'm just going to give you the complete program. There will be some string manipulation going on here that is beyond the scope of this book, but that is going to be used only for parsing the commands. To keep the user interface simple, we are using the command line arguments alone for changing the UART parameters. We could build a fancy interface to allow these settings to be changed while the program is running, but that is an exercise that is left to the reader.

title: Serial Programming/DOS Programming


text:
User talk:S.g.hatch

Note
I found this page through a source, and it looks much better then what is currently written on the superposition page. Would you like to add it in? I suppose i wont steal it if you dont want to. --Whiteknight 18:29, 17 October 2005 (UTC)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: User talk:S.g.hatch


text:
User:S.g.hatch

I'm Sean. I'm about 20 years old, I enjoy mathematics, but I'm no good at it.

title: User:S.g.hatch


text:
Immigrating to Canada/Family Class

The Family Sponsorship program is designed to allow Canadians to bring members of their family or significant others into the Country. The focus on this application is to prove that the relationship is of an acceptable type and is genuine.

Sponsorship Types
There are several types Family sponsorships. A person may sponsor any of the following people:
 * spouse, common-law partner or conjugal partner.
 * parents or grandparents
 * dependent children including adopted
 * other children who are under the sponsor's guardianship
 * orphaned brothers, sisters, nephews, nieces, or grandchildren

Dependent Children
Dependent children means any child who is either:
 * under 22 years, unmarried on the date the application is submitted and is unmarried on date the child lands in Canada;
 * financially dependent on parents due to enrollment and attendance in a full-time educational institution since the age of 22 or since the date of marriage, if married under 22; or
 * dependant due to mental or physical disability.

Any interruption in full-time studies for under a year in total will not affect dependant status.

Eligibility
Requirements for sponsor:
 * over 18 years old
 * Permanent Resident or Canadian Citizen
 * live in Canada
 * income above "Low Income Cut-off" level.
 * not on social assistance except for disability
 * not in default on a previous sponsorship
 * not in prison
 * not an undischarged bankrupt
 * not under a deportation order

The application for this visa is made to a visa office outside of Canada. The applicant for a Parents and Grandparents Super Visa must meet certain criteria.

Firstly, the applicant must me eligible for a regular visitor visa. This means that besides being in good health and having a valid travel document, the applicant must satisfy a Canadian immigration official that they will willingly leave the country at the end of their authorized stay, that they have sufficient ties to their home country such as a job, family or property, and that they have sufficient funds available to support themselves for the length of their stay.Parent and Grandparents Super Visa

Sponsor's Responsibilities
Sponsoring is a major commitment. For a period of 3 to 10 years, the sponsor is required to, among other things:
 * provide the Applicant with basic living requirements and essential needs where the applicant cannot do so for his or herself.
 * ensure that Applicant does not have to apply for social assistance

Once the sponsorship has begun it cannot be cancelled in cases of divorce, separation, or relathionship breakdown.

Minimum Threshold income
The Sponsor must have a minimum income, known as the "Low Income Cut-Off" except where it is a spousal sponsorship.

 * Cut-Off amounts

Co-signer
A co-signer may be used when sponsoring a non-spouse in order to reach the Minimum Income requirement. The co-signer must be a spouse, common-law partner, or conjugal partner.

Forms
Two sets of forms are needed, those relating to the sponsorship and the standard Permanent Residency forms.

Documents
The Sponsor must provide several documents.

1) A photocopy of one of the following:
 * Record of Landing
 * Permanent Resident Card (both sides)
 * Canadian Citizenship Card (both sides)
 * Canadian Birth certificate
 * Canadian passport

2) One of the following:
 * An Option-C tax print out. One can be obtained from a local Revenue Canada Office.
 * proof of income.

3) original letter of employment.

if there is a co-signer
 * photocopy of marriage certificate

if divorced
 * photocopy of divorce certificate

if Applicant is a parent
 * photocopy of birth certificate

if Sponsoring an adopted child
 * photocopy of adoption order

Inside/Outside Canada
There are two modes of applying under the family class. A Applicant can be sponsored from inside Canada or from outside Canada. There are separate application Guides for each steam. The big difference between the two is that applications inside Canada cannot be appealed if refused. Also, the location and speed at which the application is processed is different, and the method of payment is different. Applications inside Canada can be paid online or with a CIC bank receipt. Applications outside of Canada can be paid online or with an international money order.

Mailing
The completed applications of the Sponsor and Applicant the documents, and the payment receipt should be sent to the processing center.

If family status changes, such as marriage, divorce, birth, death, contact address or number, either the sponsor or applicant must call the processing center to inform them of the changes.

Processing Times

 * processing times

Fees
There are two types of fees, the Processing Fee and Permanent Residence Fee. Only the Processing Fee needs to be paid immediately, however, both fees may be paid at once.

So, for example. a sponsorship of a spouse over 22 years will be $550 for processing and $490 for the PR fees for a total of $1040.

title: Immigrating to Canada/Family Class


text:
Introduction to Astrophysics/Astronomical Constants

Speed of light: c = 2.99792458 × 108 m s-1 Gravitation Constant: G = 6.6742(10) × 10-11 m3 kg-1s-2 Mass of Sun: Msun = 1.99 × 1030 kg Luminosity of Sun: Lsun = 3.83 × 1026 J s-1 Radius of Sun: Rsun = 6.96 × 108 m 1 astronomical unit (AU): 1.496 × 1011 m 1 light year (ly): 9.461 × 1015 m = 0.307 pc 1 parsec (pc): 3.086 × 1016 m = 3.26 ly Solar effective temperature: Teff = 5777 K Hubble Constant: H0 = 70.1±1.3 kms-1 Mpc-1 Cosmological Constant: |Λ|≤10-51 m-2 Cosmic background radiation = 2.725(1) K Mass of Earth: Me = 5.97370(76) × 1024 kg Radius of Earth: Re = 6.378136 × 106 m


text:
Classical Nahuatl/Introduction

Nahuatl (pronounced in two syllables, NA-watl ['na.watɬ]) is a term applied to some members of the Aztecan or Nahuan sub-branch of the Uto-Aztecan language family. The languages called "Nahuatl" are all Native American languages indigenous to central Mexico.

The term "Nahuatl" is often used specifically with reference to the Classical Nahuatl language, which was the language of the Aztec Empire, and, according to Aztec historiography, the earlier Toltec Empire, and was used as a lingua franca in much of Mesoamerica during the 7th century AD through the late 16th century, at which time its prominence and influence was interrupted by the Spanish conquest of the New World. It should be pointed out that Nahuatl influence increased slightly for some time before decreasing, as the Spaniards used Nahuatl to strengthen their influence over the conquered territories and to spread Christianity; it was even used in places it had not previously been spoken. This was also done (although not to the same extent) for the Quechua in South America. When the Spanish colonies began to gain independence, the Spanish-speaking leaders (mainly "criollos") made Spanish the predominant language.

The term "Nahuatl" also serves to identify a number of modern Nahuatl dialects (linguistic variants, some of them mutually unintelligible) that are still spoken by at least 1.5 million people in what is now Mexico, as well as small populations in El Salvador and the United States of America. All of these dialects show influence from the Spanish language to some degree, although the extent of this influence varies. No modern dialects are identical to Classical Nahuatl, but those spoken in and around the Valley of Mexico are generally more closely related to Classical Nahuatl than peripheral ones. Modern variants of Nahuatl are still the most widely spoken group of Native American languages in Mexico, although most Nahuatl speakers also speak Spanish as a second language.

Nahuatl was originally written with a pictographic script which was not a full writing system but instead served as a mnemonic to remind readers of texts they had learnt orally. The script appeared in inscriptions carved in stone and in picture books, many of which the Spanish destroyed. The Spanish introduced the Latin alphabet to write Nahuatl, and a large amount of prose and poetry was subsequently written. There has been considerable debate about how to spell Nahuatl in Latin script, as many of the sounds present in Nahuatl are not present in the Romance languages Latin was developed to express.

title: Classical Nahuatl/Introduction


text:
Latin/Lesson 5-The Subjunctive Perfect

The conjugation of the perfect subjunctive active consists of: the perfect stem + "eri" + the standard active endings (-m, -s, -t, -mus, -tis, -nt). An example conjugation of the first conjugation verb paro, parāre is as follows: parāverim parāverīs parāverit parāverīmus parāverītis parāverint

The conjugation of the pluperfect subjunctive active consists of: the perfect stem + "isse" + the standard active endings. An example conjugation of the first conjugation verb paro, parāre is as follows: parāvissem parāvissēs parāvisset parāvissēmus parāvissētis parāvissent

title: Latin/Lesson 5-The Subjunctive Perfect


text:
Geometry for Elementary School/A proof of irrationality

In mathematics, a rational number is a real number that can be written as the ratio of two integers, i.e., it is of the form
 * a/b where a and b are integers and b is not zero. An irrational number is a number that cannot be written as a ratio of two integers, i.e., it is not of the form
 * a/b.

History of the theory of irrational numbers
The discovery of irrational numbers is usually attributed to Pythagoras, more specifically to the Pythagorean Hippasus of Metapontum, who produced a proof of the irrationality of the $$\sqrt{2}$$. The story goes that Hippasus discovered irrational numbers when trying to represent the square root of 2 as a fraction (proof below). However, Pythagoras believed in the absoluteness of numbers, and could not accept the existence of irrational numbers. He could not disprove their existence through logic, but his beliefs would not accept the existence of irrational numbers and so he sentenced Hippasus to death by drowning. As you see, mathematics might be dangerous.

Irrationality of the square root of 2
In this section we attempt to explain why $$\sqrt{2}$$ is irrational. Irrational is a fancy word for a number that cannot be written as a fraction where the top and bottom of the fraction are whole numbers. At one point in time it was once believed that every number could be written as a fraction.

Before we start the proof we first should recall a few familiar facts. First, is that when we write fractions we can always reduce them so they have no common factors. Just to remind ourselves how this goes, let's think about the fraction $$\frac{15}{21}$$. Since 3 divides into 15 evenly, and 3 divides into 21 evenly, then we can make this fraction have a smaller numerator and denominator. In this example see this by the following calculation:
 * $$\frac{15}{21}=\frac{3\cdot 5}{3\cdot 7}=\frac{3}{3}\cdot\frac{5}{7}=1\cdot \frac{5}{7}=\frac{5}{7}$$.

The exact same calculation will let us get rid of any number that divides both the numerator and denominator. Imagine we have a fraction $$\frac{p}{q}$$ and there is a number r so that r divides evenly into p, and r divides evenly into q. We can then write $$p=r\cdot a$$ (just like we wrote $$15=3\cdot 5$$). We can also write $$q=r\cdot b$$. Then the calculation looks like:
 * $$\frac{p}{q}=\frac{r\cdot a}{r\cdot b}=\frac{r}{r}\cdot\frac{a}{b}=1\cdot \frac{a}{b}=\frac{a}{b}$$.

So whenever we have a fraction where the numerator and denominator are numbers we don't know yet (so we need to use letters like p and q), we can assume we have already gotten rid of all the numbers that divide both p and q.

The other thing that we need to remember is our facts about even and odd numbers. First every even number is really 2 times some smaller number. This is easy to see if you list out the even numbers:
 * {|border="1" cellpadding="5" cellspacing="0"

|- | even number | 2 | 4  | 6  | 8  | 10 | 12 | 14 | 16 | 18 | 20  | … |- | the same even number as 2·"something" | 2·1 | 2·2 | 2·3 | 2·4 | 2·5 | 2·6 | 2·7 | 2·8 | 2·9 | 2·10 | …
 * }

Finally we need to remember that the product of two even numbers is again an even number, and the product of two odd numbers is again an odd number. In fact this is just the familiar rules:
 * "even times even is even"
 * "odd times odd is odd"
 * "even times odd is even"

Now we can start thinking about the proof. The proof is a "proof by contradiction". For us this means we will start by assuming $$\sqrt{2}$$ can be written as a fraction. We will try to investigate and see what this means for the fraction, being careful that every step follows from the last step by something we know to be true. At the last step we will contradict ourselves. This will mean that we had to make a mistake somewhere. Since we were careful about all of the steps, the only possible place for a mistake will be that we assumed $$\sqrt{2}$$ can be written as a fraction.

 * 1) Assume that $$\sqrt{2}$$ can be written as a fraction. This means $$\sqrt{2}=\frac{a}{b}$$. We will assume that this fraction is reduced, so no number could divide both a and b.  Specifically 2 cannot divide both a and b.
 * 2) We now square both sides of your equation, that is we write $$2=\left(\frac{a}{b}\right)^2$$, which is the same as $$2=\frac{a^2}{b^2}$$.
 * 3) By multiplying both sides by $$b^2$$, it follows that $$a^2=2\cdot b^2 $$.
 * 4) Therefore $$a^2$$ is even, because it is equal to $$2\cdot b^2$$ which is even.
 * 5) If $$a$$ were odd, then $$a^2=a\cdot a$$ would be odd, because "an odd times an odd is odd".  So, it follows that $$a$$ must be even.
 * 6) Because $$a$$ is even, and every even number is 2 times something, we can write $$a = 2\cdot k$$, for some whole number $$k$$.
 * 7) If we substitute $$2\cdot k$$ in for $$a$$ in the equation in line 3, we get $$(2\cdot k)^2 = 2\cdot b^2$$.  Now $$(2\cdot k)^2=(2\cdot k)\cdot(2\cdot k)=4\cdot k^2$$.  So, $$4\cdot k^2=2\cdot b^2$$.
 * 8) Because $$2\cdot k^2$$ is even then $$b^2$$ is also even.  Just like we saw with $$a$$ in line 5, this means that b is even.
 * 9) In line 5 we saw that $$a$$ was even and so 2 divides $$a$$.  In line 8 we saw that $$b$$ was even, so 2 divides $$b$$.  But in line 1 we said that 2 cannot divide both $$a$$ and $$b$$.  This is a contradiction.

Since we have found a contradiction, the assumption in line 1 must be false. That is, it must be false that $$\sqrt{2}=\frac{a}{b}$$ where $$a$$ and $$b$$ are whole numbers. So we cannot write $$\sqrt{2}$$ has a fraction. The fancy way of saying this is to say that $$\sqrt{2}$$ is irrational.

Geometria per scuola elementare/Una dimostrazione di irrazionalità


text: User talk:69.134.18.175

title: User talk:69.134.18.175


text: User talk:61.247.244.196

title: User talk:61.247.244.196


text:
User talk:58.69.214.9

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:58.69.214.9


text:
US Internet Law/ECPA

The Electronic Communications Privacy Act (ECPA) sets out the provisions for access, use, disclosure, interception and privacy protections of electronic communications. The law was enacted in 1986 and covers various forms of wire and electronic communications. The Stored Communications Act is part of the Electronic Communications Privacy Act, and is discussed separately.

Two federal statutes govern real-time electronic surveillance in federal criminal investigations. The first and most important is the wiretap statute, 18 U.S.C. §§ 2510-2522, first passed as Title III of the Omnibus Crime Control and Safe Streets Act of 1968 (and generally known as "Title III"). The second statute is the Pen Registers and Trap and Trace Devices chapter of Title 18 ("the Pen/Trap statute"), 18 U.S.C. §§ 3121-3127, which governs pen registers and trap and trace devices.

Title III and the Pen/Trap statute coexist because they regulate access to different types of information. Title III permits the government to obtain the contents of wire and electronic communications in transmission. In contrast, the Pen/Trap statute concerns the real-time collection of addressing and other non-content information relating to those communications. See 18 U.S.C. § 2511(h)(i) (stating that it is not a violation of Title III to use a pen register or trap and trace device); United States Telecom Ass'n v. FCC, 227 F.3d 450, 454 (D.C. Cir. 2000); Brown v. Waddell, 50 F.3d 285, 289-94 (4th Cir. 1995) (distinguishing pen registers from Title III intercept devices).

title: US Internet Law/ECPA


text:
US Internet Law/Copyright General

Copyright is a form of protection provided by the laws of the United States (title 17, U.S. Code) to the authors of “original works of authorship,” including literary, dramatic, musical, artistic, and certain other intellectual works, such as poetry, novels, movies, songs, computer software, and architecture. Copyright does not protect facts, ideas, systems, or methods of operation, although it may protect the way these things are expressed.

This protection is available to both published and unpublished works. Section 106 of the 1976 Copyright Act generally gives the owner of copyright the exclusive right to do and to authorize others to do the following:

 * 1) To reproduce the work in copies or phonorecords;
 * 2) To prepare derivative works based upon the work;
 * 3) To distribute copies or phonorecords of the work to the public by sale or other transfer of ownership, or by rental, lease, or lending;
 * 4) To perform the work publicly, in the case of literary, musical, dramatic, and choreographic works, pantomimes, and motion pictures and other audiovisual works;
 * 5) To display the copyrighted work publicly, in the case of literary, musical, dramatic, and choreographic works, pantomimes, and pictorial, graphic, or sculptural works, including the individual images of a motion picture or other audiovisual work; and
 * 6) In the case of sound recordings, to perform the work publicly by means of a digital audio transmission.

In addition, certain authors of works of visual art have the rights of attribution and integrity as described in section 106A of the 1976 Copyright Act.

WHO CAN CLAIM COPYRIGHT
Copyright protection subsists from the time the work is created in fixed form. The copyright in the work of authorship immediately becomes the property of the author who created the work. Only the author or those deriving their rights through the author can rightfully claim copyright.

In the case of works made for hire, the employer and not the employee is considered to be the author.

WHAT WORKS ARE PROTECTED?
Copyright protects "original works of authorship" that are fixed in a tangible form of expression. The fixation need not be directly perceptible so long as it may be communicated with the aid of a machine or device. Copyrightable works include the following categories:

 * 1) literary works;
 * 2) musical works, including any accompanying words
 * 3) dramatic works, including any accompanying music
 * 4) pantomimes and choreographic works
 * 5) pictorial, graphic, and sculptural works
 * 6) motion pictures and other audiovisual works
 * 7) sound recordings
 * 8) architectural works

These categories should be viewed broadly. For example, computer programs and most "compilations" may be registered as "literary works"; maps and architectural plans may be registered as "pictorial, graphic, and sculptural works."

WHAT IS NOT PROTECTED BY COPYRIGHT?
Several categories of material are generally not eligible for federal copyright protection. These include among others:

Works that have not been fixed in a tangible form of expression (for example, choreographic works that have not been notated or recorded, or improvisational speeches or performances that have not been written or recorded)

Titles, names, short phrases, and slogans; familiar symbols or designs; mere variations of typographic ornamentation, lettering, or coloring; mere listings of ingredients or contents

Ideas, procedures, methods, systems, processes, concepts, principles, discoveries, or devices, as distinguished from a description, explanation, or illustration

Works consisting entirely of information that is common property and containing no original authorship (for example: standard calendars, height and weight charts, tape measures and rulers, and lists or tables taken from public documents or other common sources)

title: US Internet Law/Copyright General


text:
US Internet Law/DMCA Safe Harbor

The Digital Millennium Copyright Act, signed into law on October 28, 1998, amended the copyright law to provide limitations for service provider liability relating to material online. New subsection 512(c) of the copyright law provides limitations on service provider liability with respect to information residing, at direction of a user, on a system or network that the service provider controls or operates, if the service provider has designated an agent for notification of claimed infringement by providing contact information to the Copyright Office and through the service provider’s publicly accessible website.

For purposes of section 512(c), a "service provider" is defined as a provider of online services or network access, or the operator of facilities therefor, including an entity offering the transmission, routing, or providing of connections for digital online communications, between or among points specified by a user, of material of the user's choosing, without modification to the content of the material as sent or received.

title: US Internet Law/DMCA Safe Harbor


text:
User talk:207.200.116.134

Please stop deliberately introducing incorrect information into articles. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

Some people are just jealous at my knowledge of various cultures.

title: User talk:207.200.116.134


text:
US Internet Law/UCITA

The Uniform Computer Information Transactions Act (UCITA)is the most complete attempt so far to bring standardization to the law of computer information transactions. In July, 1999, the National Conference of Commissioners on Uniform State Laws “NCCUSL”, after 10 years of work, approved the UCITA provisions and recommended that UCITA be enacted in all 50 states.

In the past, the American Law Institute “ALI” had worked with NCCUSL to study and draft new uniform state laws, however in the case of UCITA, ALI pulled out of the project because of concerns about the proposed act’s scope and its overall coherence and clarity as well as its treatment of customer rights. In fact ALI members had called for “fundamental revisions” to the proposed Act.

Prior to UCITA, and in states where it or other laws have not been adopted, the Uniform Commercial Code "UCC", still governs software sales. The UCC was developed in the 1940s and 1950s to standardize laws for the sale of goods across the U.S.

States must vote whether or not to adopt UCITA without change, with change or not at all. Two states have adopted UCITA with some modifications; the first was Maryland in 2000 and the second, Virginia in 2001. In subsequent years, not one other state has adopted UCITA. In fact four states have passed anti-UCITA laws (Iowa, North Carolina, West Virginia and Vermont). Massachusetts may be the next to pass what has come to be known as “bomb-shelter” legislation, preventing vendors from applying UCITA laws within the state.

UCITA is a proposed uniform law that would create new rules for software licensing, online access and other transactions in computer information. UCITA was originally a joint project of the American Law Institute (ALI) and the National Conference of Commissioners on Uniform State Laws. Both organizations have withdrawn support.

title: US Internet Law/UCITA


text:
Introduction to Astrophysics/Stars/Luminosity

Luminosity is a measure of energy flux. This is the rate of flow of energy per unit area per unit time from the surface of the body. Luminosity depends both on the temperature of the body and the size of the body. We assume that a body like the Sun emits radiation effectively as a black body. This means it can be modelled using Stefan-Boltzmann's Law.

L ∝ R2Teff4 Which gives us L = 4πR2σTeff4

Where Teff = 5777 K and Stefan-Boltzmann constant: σ = 5.670400 × 10−8 W·m-2·K-4

Example: What is the Solar luminosity at the surface of the Sun?

Radius of Sun: Rsun = 6.96 × 108 m

L = 4 × π × (6.96 × 108 m)2 × 5.670400 × 10−8 W·m-2·K-4× (5777 K)4 = 3.85 × 1026 W


text:
User talk:68.173.230.39

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:68.173.230.39


text:
US Internet Law/Secondary Liability

Secondary liability can consist of contributory or vicarious liability.

Contributory Infringement - a person with knowledge of the infringing activity induces causes or materially contributes to the conduct of another to infringe.

Vicarious Liability - a person or entity has the right and ability to control the activities of the person directly infringing and receives financial benefit from those activities – even if the entity or person is unaware of the activity.

title: US Internet Law/Secondary Liability


text: User talk:81.25.2.15

title: User talk:81.25.2.15


text:
Visual Basic .NET/Operators

Operators
Programming languages have a set of operators that perform arithmetical operations, and others such as Boolean operations on truth values, and string operators manipulating strings of text. Computers are mathematical devices, but compilers and interpreters require a full syntactic theory of all operations in order to parse formulae involving any combinations correctly. In particular they depend on operator precedence rules, on order of operations, that are tacitly assumed in mathematical writing.

Conventionally, the computing usage of operator also goes beyond the mathematical usage (for functions). In Visual Basic.NET, New, AddressOf and CType are operators. You can also define your own uses for operators. When an operator is alphanumeric rather than a punctuation character, it is sometimes called a named operator.

So operators are special symbols that are used to represent for example simple computations like addition and multiplication. Most of the operators in VB.NET do exactly what you would expect them to do, because they are common mathematical symbols. For example, the operator for adding two integers is +.

title: Visual Basic .NET/Operators


text:
Template:Signals and Systems/Page

 Signals and Systems

title: Template:Signals and Systems/Page


text:
Template talk:Signals and Systems/Page

I created this template as a standard header for the Signals and Systems Wikibook. --Whiteknight 14:09, 17 October 2005 (UTC)

title: Template talk:Signals and Systems/Page


text:
Signals and Systems/Engineering Functions

Basic Functions
Oftentimes, complex signals can be simplified as linear combinations of certain basic functions (a key concept in Fourier analysis), which are useful to the field of engineering. These functions will be described here, and studied more in the following chapters.

Unit Step Function
The unit step function and the impulse function are considered to be fundamental functions in engineering, and it is strongly recommended that the reader becomes very familiar with both of these functions.

The unit step function, also known as the Heaviside function, is defined as such:

 * $$u(t) = \left\{

\begin{matrix} 0, & \mbox{if }t < 0 \\                 1, & \mbox{if }t \ge 0 \end{matrix} \right. $$

Sometimes, u(0) is given other values, usually either 0 or 1. For many applications, it is irrelevant what the value at zero is. u(0) is generally written as undefined.

Derivative
The unit step function is level in all places except for a discontinuity at t = 0. For this reason, the derivative of the unit step function is 0 at all points t, except where t = 0. Where t = 0, the derivative of the unit step function is infinite.

The derivative of a unit step function is called an impulse function. The impulse function will be described in more detail next.

Integral
The integral of a unit step function is computed as such:

 * $$\int_{-\infty}^t u(s)ds =

\left\{ \begin{matrix} 0, & \mbox{if }t < 0   \\ \int_0^t ds = t, & \mbox{if }t \ge 0 \end{matrix} \right\} = tu(t)$$

In other words, the integral of a unit step is a "ramp" function. This function is 0 for all values that are less than zero, and becomes a straight line at zero with a slope of +1.

Time Inversion
if we want to reverse the unit step function, we can flip it around the y axis as such: u(-t). With a little bit of manipulation, we can come to an important result:

 * $$u(-t) = 1 - u(t)$$, while $$ t \neq 0 $$

Other Properties
Here we will list some other properties of the unit step function:

 * $$u(\infty) = 1$$
 * $$u(-\infty) = 0$$
 * $$u(t) + u(-t) = 1$$, while $$ t \neq 0 $$

These are all important results, and the reader should be familiar with them.

Impulse Function
An impulse function is a special function that is often used by engineers to model certain events. An impulse function is not realizable, in that by definition the output of an impulse function is infinity at certain values. An impulse function is also known as a "delta function", although there are different types of delta functions that each have slightly different properties. Specifically, this unit-impulse function is known as the Dirac delta function. The term "Impulse Function" is unambiguous, because there is only one definition of the term "Impulse".

Let's start by drawing out a rectangle function, D(t), as such: We can define this rectangle in terms of the unit step function:

 * $$D(t) = \frac{1}{A}[u(t + A/2) - u(t - A/2)]$$

Now, we want to analyze this rectangle, as A becomes infinitesimally small. We can define this new function, the delta function, in terms of this rectangle:

 * $$\delta(t) = \lim_{A \to 0}\frac{1}{A}[u(t + A/2) - u(t - A/2)]$$

We can similarly define the delta function piecewise, as such:

 * 1) $$\delta(t) = 0\mbox{ for } t \ne 0 $$.
 * 2) $$\delta(t) = +\infty \mbox{ for } t = 0 $$.
 * 3) $$\int_{-\infty}^\infty \delta(t) dt = 1 $$.

Although, this definition is less rigorous than the previous definition.

Integration
From its definition it follows that the integral of the impulse function is just the step function:

 * $$\int \delta(t)dt = u(t)$$

Thus, defining the derivative of the unit step function as the impulse function is justified.

Shifting Property
Furthermore, for an integrable function f:

 * $$\int_{-\infty}^\infty \delta(t - A) f(t)dt = f(A)$$

This is known as the shifting property (also known as the sifting property or the sampling property) of the delta function; it effectively samples the value of the function f, at location A.

The delta function has many uses in engineering, and one of the most important uses is to sample a continuous function into discrete values.

Using this property, we can extract a single value from a continuous function by multiplying with an impulse, and then integrating.

Types of Delta
There are a number of different functions that are all called "delta functions". These functions generally all look like an impulse, but there are some differences. Generally, this book uses the term "delta function" to refer to the Dirac Delta Function.

 * Dirac delta function
 * Kronecker delta

Sinc Function
There is a particular form that appears so frequently in communications engineering, that we give it its own name. This function is called the "Sinc function" and is discussed below:

The Sinc function is defined in the following manner:

 * $$\operatorname{sinc}(x) = \frac{\sin(\pi x)}{\pi x} \mbox{ if } x \neq 0$$

and

 * $$\operatorname{sinc}(0) = 1 $$

The value of sinc(x) is defined as 1 at x = 0, since

 * $$\lim_{x \rightarrow 0}\operatorname{sinc}(x) = 1$$.

This fact can be proven by noting that for x near 0,

 * $$1 > \frac{\sin{(x)}}{x} > \cos{(x)}$$.

Then, since cos(0) = 1, we can apply the Squeeze Theorem to show that the sinc function approaches one as x goes to zero. Thus, defining sinc(0) to be 1 makes the sinc function continuous.

Also, the Sinc function approaches zero as x goes towards infinity, with the envelope of sinc(x) tapering off as 1/x.

Rect Function
The Rect Function is a function which produces a rectangular-shaped pulse with a width of 1 centered at t = 0. The Rect function pulse also has a height of 1. The Sinc function and the rectangular function form a Fourier transform pair.

A Rect function can be written in the form:

 * $$\operatorname{rect}\left(\frac{t-X}{Y} \right)$$

where the pulse is centered at X and has width Y. We can define the impulse function above in terms of the rectangle function by centering the pulse at zero (X = 0), setting its height to 1/A and setting the pulse width to A, which approaches zero:

 * $$\delta(t) = \lim_{A \to 0} \frac{1}{A}\operatorname{rect}\left(\frac{t-0}{A}\right)$$

We can also construct a Rect function out of a pair of unit step functions:

 * $$\operatorname{rect}\left(\frac{t-X}{Y} \right) = u(t - X + Y/2) - u(t - X - Y/2)$$

Here, both unit step functions are set at distance of Y/2 away from the center point of (t - X).

Square Wave
A square wave is a series of rectangular pulses. Here are some examples of square waves:


text:
User talk:Osxrules

Copyright problem with Image:DieAnotherWay11a.png
--Derbeth 15:55, 17 October 2005 (UTC)

title: User talk:Osxrules


text:
User talk:Adrianromero

Copyright problem with Image:Tinapos configdb.png
--Derbeth 15:56, 17 October 2005 (UTC)

Pictures
As you can see at the top of this page, "All unlicensed images uploaded to wikibooks before November 1, 2006 will soon be deleted." You have uploaded images and some of them are untagged. You can see them here. Please review them and add appropriate tags. If you have any questions, feel free to ask me. --Think Fast 04:31, 13 November 2006 (UTC)

title: User talk:Adrianromero


text:
User talk:Insquall

Copyright problem with Image:Anim8orlogo.jpg
--Derbeth 16:02, 17 October 2005 (UTC)

title: User talk:Insquall


text:
User talk:82.18.64.7

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:82.18.64.7


text:
User talk:70.27.102.45

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:70.27.102.45


text:
Blender 3D: Noob to Pro/Die Another Way

Video Tutorial
A video tutorial has been created for this chapter in Blender 2.48a.

It is compressed and packaged in the Theora (.ogg) video format and requires a player that is able to decode this codec in order to play it, such as the VLC player which is available as a free download for Windows, Mac, and most Linux distributions. Firefox 3.5 is also able to stream Theora video.

For best results, it is recommended that you save this file to your computer for viewing, rather than streaming it inside a web browser, since it is 1020 x 746 pixels.

Introduction
In the following tutorial you will be creating a die. You will use:
 * polygon mesh
 * face loop cutting
 * subdivision surfaces
 * subdivision creases
 * bevel
 * set smooth
 * multiple materials
 * extrusion
 * merge vertices
 * remove doubles
 * constraints

There are two methods to create the circles for the die: subdivide first, or manual sizing. In either case, start with the default Cube.

Subdivide First
The die needs to have a 3x3 matrix for the coloured dots (pips). A quick way to do this is to simply Subdivide the cube twice before doing anything else. The disadvantage may be that the spaces for the pips may not be exactly the size that you want. If not, see the next section: Manual Sizing of Pips.

Step 1
Hit tab to go into edit-mode and select all faces to prevent bevel messing up normals. Hit WKEY → Bevel, Recursion → 1 (you'll see why later) then choose bevel size (hit spacebar for manual input). Bevel of 0.150 is ok. Note: If you have chosen to subdivide the die twice, jump to Section "Creating Pips" and put bevel of 0.17 in order to have pip's edges length 0.34

Step 2
In editmode, go to the Editing tab (F9) and look at the  Mesh Tools 1  panel (Mesh Tools More in some versions). Turn on Edge Length and note the length of one of the sides of the square faces. This should be 1.7 if the above settings were used. Button "Edge Length" may be outside the screen so you may need to close another set of buttons before you can get to it. Or, you can use MMB to scroll over to see the Mesh Tools 1 panel (in later versions: Mesh Tools More) with "Edge Length" button on it. Or, you can zoom in and out in the menu window with CTRL and NUM+ or NUM- Or, you can press HOME when button window is focused to see all buttons.

Step 3
A typical die has a grid of 9 possible positions for the pips and the gap between the pips is the pip radius (or half the diameter). So, there are conveniently 10 units on each edge of the square faces, where the gaps use 4 of the units and the 3 pips use two each. This means the gaps are of size 1.7/10 = 0.17 and the pips (1.7x2)/10 = 0.34.

Step 4

Now it's time to subdivide the surfaces of the die according to the mathematics above. We'll do that using "edge loops" - additional edges you can add to existing objects.

 * Select axis aligned view: NUM1
 * Enter loop cut mode: CTRL+RKEY (OR KKEY→1KEY OR KKEY→Loop Cut OR CTRL+EKEY→Loopcut OR CTRL+EKEY→NUM5)
 * Select loops' placement: move the mouse around until you see a purple line going the right direction.

''Noob: What's "the right direction?" What should this thing look like after applying the loop/cut? HELP!''
 * Enter the number of loops: 9KEY (OR NUM9 OR SCROLL up 9 times OR NUM+ 8 times)
 * Add the loop: LMB (OR ENTER etc.) on one of the big faces

''Another Noob: It sounds like you have version 2.44 or later. You should do the tuturial "Die Easy"(seriously, it is).''

Now we just have to get rid of the 2nd, 5th and 8th loops to make the undivided spaces for the marks.

 * Select edge select or vertex select: CTRL+TAB→NUM2 (OR CTRL+TAB→Edges OR CTRL+TAB→NUM1 etc.)

Noob: It seems that I could not remove multi loops at the same time, since the error message kept bumping out. Another Noob: That happened to me when I tried to remove them all at once, but it worked fine when I removed one at a time. Change views with NUM3 and NUM7 and repeat steps as necessary. When you're done, your die should look like the one pictured to the right.
 * Deselect all edges with AKEY
 * Choose a loop to remove (using the BKEY to enter box selection mode and drawing a box around the one you want; this will get the whole loop, all the way around the cube). Spoiler: you can also use Alt-RMB on an edge to select a loop (or select the edge and click Select --> Edge loop).
 * Remove loop: XKEY→7 (OR XKEY→Edge Loop)

Creating Pips
The die needs the pips added. Everyone knows how the pips on a die look, right?

Extrude and Merge
(Note: This is Step 10) Select one of the faces where a pip would go and extrude the face by hitting EKEY and then ESC. Do not click after hitting EKEY. This actually replaces the first face with another one even though it looks like nothing has happened. Merge the second face by using ALT + MKEY to merge the 4 corners into the centre. It will tell you Removed 3 vertices. [User Note: To clarify, pressing ESC when extruding does in fact extrude the face as per usual, but by a distance of zero. This creates four new, infinitely narrow faces around the original square face. These four faces then get 'dragged' into the middle when the four vertices of the original square are merged into one. Test this by extruding by say, 0.01 (instead of pressing ESC), and you'll see the result is almost the same.][User Note: on my computer hitting ESC after the EKEY seemed to cancel the extrude and to get the correct result I had to hit the "ENTER" key after the EKEY] You should get the following:

Do this for the configuration of the dots on that side. So for example, 5 would look like this:

Notes :
 * You could create this pip spot on all 9 spots and copy this side of the die to the other six. The amount of time spent doing all of that may be just as long as doing each side individually. You would need to delete the other 5 faces, copy the dented face 5 times, place each face precisely by rotating and moving, and remove doubles.
 * (User comment) I accidentally selected some pip faces from the opposite side of the die (the side behind the side I was looking at). To prevent this, I selected Limit selection to visible (Occlude background geometry in 2.47) [[Image:BlenderCommonLSTV-on.png]]: which should be the second button from the right in the header of the  3D View.
 * Noob, 19th Oct 2008: You can save time by selecting all the 'pip faces' and extruding them simultaneously, ESC-ing immediately after you do so, like above. You'll still need to merge the four corners of each extrusion one-by-one, though, or you'll get some odd results.
 * Noob, 28th Dec 2008: You can save more time be extruding all faces simultaneously, as above, and then selecting "Collapse" rather than "At Center" while merging.
 * Noob, 02/02/09: I tried with the "Collapse" trick as well but all I got were just black squares.
 * Noob, 19/02/09: I got the black squares as well, but it is just a display problem. Press Tab twice (going to Object mode and back to Edit mode) and they are gone.

Create Pips
(Note: This is Step 11) Select one of the edges of the pips to check the size is 0.34. Remember the pip radius was 0.17. We need to use this value to lower the centre point of the pips. Select all the 5 centre points at once to save time and move them inwards by 0.17. The side I put the 5 pips on here was the top so I move the vertices inwards by pressing GKEY, ZKEY, -0.17 and hitting ENTER. I then get this:

(user comment) According to step 4 we are still in front-view (NUM1), but then the ZKEY modification gives undesirable result, changing view to top (NUM7) does the trick! This applies to blender version 2.44.
 * (response) Actually, at the end of step 4 it states to change to side and top view (NUM3 and NUM7) as necessary, so really there is no official view the tutorial left the user in. Also, in this step, the writer mentions they put 5 pips on the top.
 * (user comment) using YKEY instead of ZKEY is also fine.
 * (user comment) Depending on which axis it's supposed to be moved, use the ZKEY,XKEY and YKEY after the GKEY accordingly.
 * (user comment) Pressing ZKEY twice should move them along the normal, which should work no matter which faces are selected.
 * (user comment) I noticed a shortcut: When you extrude, extrude by -0.17 and then do the Merge -> Collapse. Then the point is already inside.
 * (user comment) I just noticed something different. If you extrude and collapse, after applying the subsurf, you got sharp edges of the pips than the pips I got in this tutorial way.
 * (user comment) In blender 2.49a there is an issue where when "Occlude background geometry" is on, sometimes you'll click a vertex and have a far away vertex clicked instead. Rotating the camera usually helps, and if you find your vertex isn't selected, but you know you clicked, clicking again will deselect whatever vertex you selected. Also a big issue with the extrusion - as with escape, right clicking to exit extrusion also creates an "unseen extrusion" . The "unseen extrusion" can be noticed - there's black dots in the middle of your square edges. This is caused by the 0-width faces being selectable (and therefore having a dot in the middle). I had to completely do-over my model because Remove Doubles _did not_ remove the extra vertices. This became noticeable when I would extrude and it would only extrude vertices.
 * (user comment): Don't collapse the vertices! In that case, the pits will be rendered badly. Collapsing removes four vertices, merging at the center removes three vertices --> so there is a difference!
 * (user comment): You can just have the pivot be Individual Centers and scale to zero, then you can remove doubles and it works out fine. That's the fastest way I can think of doing this.

Smooth Out
TAB out of Edit Mode. If you haven't done this already, hit Set Smooth in the Editing panel and turn on subdivision surfaces It should look something like this:

In present versions, you just need to use "Add Modifier" on the Modifiers tab (in Edit-mode), to add a SubSurf modifier. (Or press SHIFT+OKEY) In the image below Levels is set to 3.

Make Sharp Edges
On a die, the edges of the pips are usually sharp so we'll use subsurface creasing to do that. Go back into editmode and with the edge select mode on, select all the perimeters of the pips like so (it may help to turn off subsurf for the moment): Press SHIFT+EKEY to enable creasing and move the mouse until the display says crease is at 1. (to see the effect, you must have the subsurf modifier turned ON). After pressing SHIFT+EKEY, you can then set crease values in the information box that you get by pressing NKEY when objects are selected. This can be useful to check if all the edges have the right crease because it gives you the average crease value and if it is less than 1, there is an edge wrong. Newbie Note: Trying to crease all 6 sides of the die at once using SHIFT+EKEY and moving the mouse doesn't crease all sides of the die. Better to use NKEY, or do one side at a time.

Repeat
Repeat steps 10, 11 and 13 (that is Extrude and Merge, Create Pips and Make Sharp Edges) for all the sides of the die. REMEMBER, a die is numbered so that opposite sides add up to 7. In my example, that means I put 2 on the bottom etc. Once you finish, if you turn on subdiv level 2, you will get something like this: [User Note: Do you mean subsurf instead of subdiv?]
 * Noob note: On the side with 6 pips, I had a hard time getting the creases to work. It turned out to be because I selected in vertex mode when I selected the edges for creasing, and I tried to crease all 6 pips at once.  This put crease values on the short vertical edges between the pips, which messed things up.

(noobie) Some of my pips are square and I tried everything. What should I do? (noob reply) Maybe you had the vertex at the center of pips selected while creasing.
 * User Shortcut: To do them all at once with no repeating. However, order of operation has to change to make it work:
 * In Face Select mode, select all pip faces on all sides.
 * SHIFT+EKEY to crease the edges. (needs to be done before extruding, since extruding changed the selection)
 * EKEY -> Individual Faces then type -0.17 to extrude all faces inward.
 * ALT+MKEY -> Collapse will merge all the extrusions to their respective centers.

Camera Setup
You can make a test render now to see that the pips are the right size and that the bevel is right. So, turn the subsurf level for the rendering up to 3. To help position the camera so that you centre the die, you can make the camera look at the die by adding a track-to constraint to it. I prefer to track an empty though, because it is more flexible.

Make an empty by going into top down view (NUM7) and hitting SPACE → Add → Empty. (Noob note: If you can't find "empty" in the list, make sure you are in Object mode.) It's always best to go into one of the set orthographic views so as to align new objects to the axes. If you add something misaligned, just go to the object menu then clear/apply > clear rotation (or ALT+RKEY). Because the empty was created at the origin, you might not be able to see it as it is inside the die. Hit ZKEY to enable wireframe mode and select the empty. Just move it outside the cube until we get the constraint set up. To add a track-to constraint, select the camera first then SHIFT+RMB the empty and press CTRL+TKEY and choose "TrackTo Constraint" from the list. Move the empty back inside the die. You can edit constraints in the object tab (F7). Add a couple of lamps (both intensity 1) to get the scene like this or feel free to experiment with a more advanced lighting setup:

Another way to position the camera is by selecting it and then looking through it as you move it. Look through the camera by pressing NUM0. Use the GKEY to pan across and rotate around the local axes of the camera by pressing say RKEY,XKEY,XKEY to rotate in X-axis. To zoom in and out press GKEY, ZKEY, ZKEY and then move your mouse forwards or backwards. Another useful keystroke (for pre-2.43 especially) to know is that when you are in camera view, pressing Gkey and then MMB, movement will be constrained to the way you are facing. The mouse wheel zoom moves your view towards and away from the camera, without actually moving the position of the camera.

You can also move the Camera in free "Fly" mode by going into the Camera view (press NUM0) and then Shift+F. Now you can "Fly" through the scene and use this setup the camera angle. Make sure that you keey the flying velocity very low by using the scroll wheels or -/+ buttons or the camera will be simply out of control.

Render
To render, set the size of the image you want. 800x600 is a decent size so put these settings in the format panel in the Scene tab (F10). In the render panel, make sure 100% is selected. If it's 50%, the render will come out as 400x300. For preview renders, don't turn on OSA, which is anti-aliasing because it slows your renders down significantly. Try to only use it for a final render.

Another important point is to set the image format. This is done in the format panel. The listbox has a number of image types. I find that png is generally the best because it is lossless and offers the highest compression among the lossless formats. It also supports an alpha channel for transparency. When rendering an animation, it is better to render as an image sequence than as a movie because it is easier to edit these and repair broken frames. Quicktime supports loading of image sequences and you can save as a movie using a wide range of compression formats. To save the render, go to the file menu → save image (Or press F3) and type in the full name of the image including the extension e.g. die.png. The output should now be looking something like this: [user note] To get such a nice render I had to bump the render level of subsurf up to 5, otherwise I get artifacts around the pips [user reply] If OSA is on for the final render, you'll get a nice render result as shown by the above figure with subsurf level 3. [user note] If you set smooth on the whole shape, you'll get artifacts around the circles. [user reply] To avoid artifacts around the circles, you'll have to turn on Auto Smooth

Multiple Materials

. . To give it some colour, we will need to use multiple materials because a typical die has pips that are a different colour from the die itself. In the Buttons Window  go to the Editing panel  (F9) again and make sure the die is selected. In the Links and Materials subpanel there is a section for materials (the right; the left one is for vertex groups) and the box left of the question mark should read "0 Mat 0" (the first number is the number of material links for this object; the second number is the number of the currently selected material link). The die may have more than zero materials if you had assigned materials to the object already. By pressing the New button add enough materials to make 2 in total.

Go back to the Shading panel (F5) and there is a box at the very top of the Links and Pipelines subpanel with the number 2 beside it. If there is no such subpanel select Material buttons (cycle shading buttons using F5 too). Click this number and select Single user in the dialog to make the two materials you've just created independent. Use the arrows on the left side of the box to switch materials. Note: If you do not see a 2 to the right of the material name, that means the material is already a single user material. To change it back you can click the button labelled F, but for this example, you do not want to do that. Note: There should be at least two materials now. One has the materials initial name the other has a number appended to its name (e.g. Material and Material.001). Use the Material subpanel to make material 1 bright red by just picking red in the colour picker (the rectangle to the left of the Col button) or by setting the RGB sliders (right of the Col button). Make material 2 white by doing the same. Or pick whatever colour you prefer and material settings. --MSK61 (talk) 11:27, 17 March 2008 (UTC): The colour picker is to the left(not right) of the Col button, while the RGB sliders are to the right(not left) of the Col button.

Note: It is possible that the two materials were not automatically linked to the material links of your die. If so use the Links and Pipeline subpanel to link the materials to the respective material links. First select the link then the material.

'' Note from noob: Using white as a colour will not let you spot a change in colour, since the default colour is white. For test purposes I recommend you choose another colour (e.g. blue), so you can avoid getting confused.''

'' Note from another noob: Actually (at least in blender 2.49), the default color is grey. To choose a white color, set all colors (R,G,B) up to 1.000.''

Assign Materials
These colours need to be assigned to the right parts of the die. Go into Edit Mode and turn off subsurf to make selecting easier. Do this in the Editing panels (F9) Modifiers subpanel. Right after the subsurf modifiers name there are three buttons (darkgrey). Press the rightmost to deactivate the modifier in the edit mode.

To make the die red
The entire die should now be red.
 * Select the entire die (AKEY).
 * Click the Editing button (F9).
 * In the Link and Materials panel, on the right-hand side you will see "2 Mat X" where X is either 1 or 2. Click the left/right arrows until you see the adjoining square to the left turn red. As you click on the arrows, notice that the label above "2 Mat X" changes from "Material" to "Material.001". These are the names of the materials that you created in the Shading (F5)->Links and Pipeline panel.
 * Click the Assign button (in the Material column, not the Vertex Groups column). The Assign button associates the selected faces with the selected material.

To make the pips white
Use the same method as above, but with only the inner faces of the pips selected and with the colour white.

There are a variety of ways to select the inner faces of the pips:

Pip Selection Method 1
Note: Here you may find Lasso Select useful.
 * Make sure you are in Edit Mode [[Image:BlenderCommonEditmode.png]] (TAB)
 * Select Face select [[Image:BlenderCommonFaceselect-on.png]]: CTRL+TAB→3KEY
 * Select Limit selection to visible [[Image:BlenderCommonLSTV-on.png]]: should be the second button from the right in the header of the 3D View
 * Go through the axis align views and select the faces:
 * Align view: NUM1 (CTRL+NUM1, NUM3, CTRL+NUM3, NUM7, CTRL+NUM7)
 * For each view, lasso select the pips' faces: hold CTRL and drag LMB around the pips' middle vertex (no need to press SHIFT, Lasso Select automatically adds the new faces to the previous selection).
 * If all went well you should be able to read Fa:84-449 in the User Preferences right after the Blender version number. (84 = 4*(1+2+3+4+5+6))

Pip Selection Method 2
Press CTRL+ALT+SHIFT+3KEY and every triangular face will be selected.(Every pip + The 8 corners of the dice. Just deselect the 8 corners and you're good to go!) ;-) Similarly, you can select quad faces using the 4KEY.

Pip Selection Method 3
You can also use circle select to easily select the desired faces. Enter circle select mode by hitting BKEY twice. The circle can be made bigger or smaller by using the scroll wheel. Drop out of the mode (RMB) to rotate the cube and drop back in as above. Selected vertices are added to those already selected like with lasso mode but without the need to keep holding the control key or draw an accurate lasso)

Turn subsurf back on (Modifiers panel→subsurf modifier→enable in edit mode) and render F12 with OSA (only put it up as high as you need for the resolution of the image you are rendering).

(Note: in Blender 2.44 you should use the Assign button in the editing panel (Link and Materials))

(another noob says: don't be fooled (as I was!) by the fact that there are TWO Assign buttons in this tab, you want the big one on the right under materials, not the small one on the left under Vertex groups!!)

Pip Selection Method 4
That's the easiest way: 1- select one of the triangles (the face) 2- Shift+Gkey, then choose perimeter or press 4NUM.

Extra
The reason I modelled the die this way is because it is also very easy to change the sizes of the components e.g. the bevel and the pip size. You do this by selecting the vertical or horizontal segments and just scaling them in one axis. Here we will reduce the pip size and the bevel by half. Go into front view (NUM1), turn off clipping (i.e., allow selection of invisible vertices) and select a line containing pips (i.e., Select vertices mode (CTRL+TAB+NUM1), and box select a thin vertical line of vertices to the left of a row of pips, then box select another thin vertical line of vertices to the right of that row of pips, making a total of 64 vertices). Then just scale in one axis e.g. SKEY, XKEY, 0.5. Remember to have your pivot point set to median:

Do this horizontally and vertically around the die. You should need to scale 9 times for the pips and 6 times for the bevel:

(Noob note: I find this confusing. what is a line containing pips?  does this mean a loop line?  Using alt-RMB no longer works to select a loop, but selects a single edge.)

(Noob response: he meant a pair of loops of vertices adjacent to a row containing pips. alt-RMB no longer seems to select complete loops - it works until it hits a pip and then it stops - but the box selection can be used.)

(Another Response: Any time you change the geometry of a shape you effect how the automated tools will work. Many dont work at all once you get to complex organic shapes, so its best to not rely on them too heavily.)

You may need to add extra geometry once you are satisfied with the sizes of the dots and the bevel so that the edges of the die don't look warped due to the subdivision. You can use face loop cut again for that and add extra lines in the middle of the gap segments.

title: Blender 3D: Noob to Pro/Die Another Way


text:
User talk:193.190.187.220

Only small corrections of minor typing mistakes. Nothing important modified nor altered.

title: User talk:193.190.187.220


text:
Template:Signals and Systems/Stub

''This page of the Signals and Systems book is a stub. You can help by expanding this section.'' :This template adds page to /Stubs.

title: Template:Signals and Systems/Stub


text:
Circuit Theory/Circuit Basics

Circuits
Circuits (also known as "networks") are collections of circuit elements and wires. Wires are designated on a schematic as being straight lines. Nodes are locations on a schematic where 2 or more wires connect, and are usually marked with a dark black dot. Circuit Elements are "everything else" in a sense. Most basic circuit elements have their own symbols so as to be easily recognizable, although some will be drawn as a simple box image, with the specifications of the box written somewhere that is easy to find. We will discuss several types of basic circuit components in this book.

Ideal Wires
For the purposes of this book, we will assume that an ideal wire has zero total resistance, no capacitance, and no inductance. A consequence of these assumptions is that these ideal wires have infinite bandwidth, are immune to interference, and are — in essence — completely uncomplicated. This is not the case in real wires, because all wires have at least some amount of associated resistance. Also, placing multiple real wires together, or bending real wires in certain patterns will produce small amounts of capacitance and inductance, which can play a role in circuit design and analysis. This book will assume that all wires are ideal.

Ideal Junctions or Nodes

Nodes are also called "junctions" in this book in order to make a distinction between Node analysis, Kirchhoff's current law and discussions about a physical node itself. Here a physical node is discussed.

A junction is a group of wires that share the same electromotive force (not voltage). Wires ideally have no resistance, thus all wires that touch wire to wire somewhere are part of the same node. The diagram on the right shows two big blue nodes, two smaller green nodes and two trivial (one wire touching another) red nodes.

Sometimes a node is described as where two or more wires touch and students circle where wires intersect and call this a node. This only works on simple circuits.

One node has to be labeled ground in any circuit drawn before voltage can be computed or the circuit simulated. Typically this is the node having the most components connected to it. Logically it is normally placed at the bottom of the circuit logic diagram.

Ground is not always needed physically. Some circuits are floated on purpose.

Node Quiz

Measuring instruments
Voltmeters and Ammeters are devices that are used to measure the voltage across an element, and the current flowing through a wire, respectively.

Ideal Voltmeters
An ideal voltmeter has an infinite resistance (in reality, several megaohms), and acts like an open circuit. A voltmeter is placed across the terminals of a circuit element, to determine the voltage across that element. In practice the voltmeter siphons enough energy to move a needle, cause thin strips of metal to separate or turn on a transistor so a number is displayed.

Ideal Ammeters
An ideal ammeter has zero resistance and acts like a short circuit. Ammeters require cutting a wire and plugging the two ends into the Ammeter. In practice an ammeter places a tiny resistor in a wire and measures the tiny voltage across it or the ammeter measures the magnetic field strength generated by current flowing through a wire. Ammeters are not used that much because of the wire cutting, or wire disconnecting they require.

Active, Passive & ReActive
The elements which are capable of delivering energy or which are capable to amplify the signal are called "Active elements". All power supplies fit into this category.

The elements which will receive the energy and dissipate it are called "Passive elements". Resistors model these devices.

Reactive elements store and release energy into a circuit. Ideally they don't either consume or generate energy. Capacitors, and inductors fall into this category.

Open
No current flows through an open. Normally an open is created by a bad connector. Dust, bad solder joints, bad crimping, cracks in circuit board traces, create an open. Capacitors respond to DC by turning into opens after charging up. Uncharged inductors appear as opens immediately after powering up a circuit. The word open can refer to a problem description. The word open can also help develop an intuition about circuits.

Typically the circuit stops working with opens because 99% of all circuits are driven by voltage power sources. Voltage sources respond to an open with no current. Opens are the equivalent of clogs in plumbing .. which stop water from flowing.

On one side of the open, EMF will build up, just like water pressure will build up on one side of a clogged pipe. Typically a voltage will appear across the open.

Short
A voltage source responds to a short by delivering as much current as possible. An extreme example of this can be seen in this ball bearing motor video. The motor appears as a short to the battery. Notice he only completes the short for a short time because he is worried about the car battery exploding.

Maximum current flows through a short. Normally a short is created by a wire, a nail, or some loose screw touching parts of the circuit unintentionally. Most component failures start with heat build up. The heat destroys varnish, paint, or thin insulation creating a short. The short causes more current to flow which causes more heat. This cycle repeats faster and faster until there is a puff of smoke and everything breaks creating an open. Most component failures start with a short and end in an open as they burn up. Feel the air temperature above each circuit component after power on. Build a memory of what normal operating temperatures are. Cold can indicate a short that has already turned into an open.

An uncharged capacitor initially appears as a short immediately after powering on a circuit. An inductor appears as a short to DC after charging up. The short concept also helps build our intuition, provides an opportunity to talk about electrical safety and helps describe component failure modes.

A closed switch can be thought of as short. Switches are surprisingly complicated. It is in a study of switches that the term closed begins to dominate that of short.

title: Circuit Theory/Circuit Basics


text:
Apache Ant/Core Concepts

There are several things you must learn to use Apache Ant successfully:

 * 1) Basic terminology Apache Ant/Core Concepts/Terminology
 * 2) The structure of a build file Apache Ant/Build File Structure
 * 3) Using Properties Apache Ant/Property
 * 4) Setting up Dependencies Apache Ant/Depends
 * 5) Using Fileset Apache Ant/Fileset

title: Apache Ant/Core Concepts