Posts

Showing posts with the label Output

Using legacy ports.

Image
No-solder-parallel-port-break-out (Great for home control) We are going to take the parallel port breakout cable and have some fun with the following code (which I may rewrite) and use some extra parts. Part 1 C code Code source Note asm/io.h s/b sys/io.h in parcon.c Part II Basic code: Freebasic: (code snippet) (Note: Compiled code on linux must be run under sudo or root unless special rights are given to the program via chmod +s.) 1 2 3 4 5 6 7 8 rem turn on D0 (pin 2 on the parallel port) out 888,1 rem get status and print to terminal ? inp(888) rem turn off D0 (pin 2 on the parallel port) out 888,0 rem get status ? inp(888) Code Source Circuit for testing the code. With the cable it will be easier to set up. Simple LED driving circuits You can make simple circuit for driving a small led through PC parallel port. The only components needed are one LED and one 470 ohm resistors. You simply connect the diode and resist...

Programming.

Image
You are kind of like a computer and you need logical instructions to solve a problem. Those instructions are the programming that is needed. So what is it about? Programming is required so that we can solve a problem.  What a lot of people think programming is about. What are the parts of the system?  They are: System parts Component People Hardware Data Instructions Procedures Software Information There is actually a lot more as you can see from the list below. I may differ from this list a bit. We want to build a program, but first we have to see what we need. What are we looking for in results. Obviously you need to be organized. You need a plan. Output: What must the results look like?  Reports:hard copy, terminal, web output, or etc  Output datafiles:   Inputs: How will we get the data into the system?  What form must the input data take: How will we process the d...

The five basic computer parts.

Image
Five basic components of computer system 1.Input Unit 2.Output Unit 3.Storage Unit 4.Central Processing Unit (CPU) 5.Arithmetic and Logic Unit (ALU) 6.Control Unit The internal architectural design of computers differs from one system model to another. However, the basic organization remains the same for all computer systems. The following five units (also called "The functional units") correspond to the five basic operations performed by all computer systems. 1. Input Unit Data and instructions must enter the computer system before any computation can be performed on the supplied data. The input unit that links the external environment with the computer system performs this task. Data and instructions enter input units in forms that depend upon the particular device used. For example, data is entered from a keyboard in a manner similar to typing, and this differs from the way in which data is entered through a mouse, which is another type of input device. How...