Sunday, 20 May 2012

AC AND DC CURRENTS

AC CURRENT


The alternating current which is abberivated as  AC  is that current which changes it polarity and reverses it direction periodically.Alternating Current (AC) flows one way, then the other way, continually reversing direction. An AC voltage is continually changing between positive (+) and negative (-).
                                 The rate of changing direction is called the frequency of the AC and it is measured in hertz (Hz) which is the number of forwards-backwards cycles per second.
Mains electricity in the pakistan  has a frequency of 60Hz.




DC CURRENT


The Direct current which is abberivated as  DC  is the linear one direction current and it is the one way current.its level is always positive or negative . Electronic circuits normally require a steady DC supply which is constant at one value or a smooth DC supply which has a small variation called ripple. Cells, batteries and regulated power supplies provide steady DC which is ideal for electronic circuits. Many  home devices operates at DC.

Properties of electrical signals

An electrical signal is a voltage or current which gives information, usually it means a voltage. The term can be used for any voltage or current in a circuit.
The voltage-time graph below  shows various properties of an electrical signal. In addition to the properties labelled on the graph, there is frequency which is the number of cycles per second.

• Amplitude is the maximum voltage of  the signal.
It is measured in volts, V.
• Peak voltage is another name for amplitude.
• Peak-peak voltage is twice the peak voltage (amplitude). When reading an oscilloscope trace it is usual to measure peak-peak voltage.
• Time period is the time taken for the signal to complete one cycle.
It is measured in seconds (s), but time periods tend to be short so milliseconds (ms) and microseconds (µs) are often used. 1ms = 0.001s and 1µs = 0.000001s.
• Frequency is the number of cycles per second.
It is measured in hertz (Hz), but frequencies tend to be high so kilohertz (kHz) and megahertz (MHz) are often used. 1kHz = 1000Hz and 1MHz = 1000000Hz.
frequency  =           1             and     time period  =           1       
 time period   frequency
• Mains electricity in the pakistan  has a frequency of 50Hz,
so it has a time period of 1/60 = 0.01s = 10ms.

Monday, 7 May 2012

Port 3 Alternate Functions

Port 3 multi functions are


RXD     it is used for serial input port
TXD      it is used for serial output port
INT0    used for external interrupt 0
INT1   used for external interrupt 1
T0      Timer 0 external input
T1      Timer 1 external input
WR  external data memory write strobe
RD     external data memory Read strobe










Pinout Report For 8051

Pins 1-8: it is serve as Port 1 .Each of these pins can be configured as an input or an output.

Pin 9: (Reset ) A logic one on this pin disables the microcontroller and clears the contents of most registers. In other words, the positive voltage on this pin resets the microcontroller. By applying logic zero to this pin, the program starts execution from the beginning.

Pins10-17: Serve as Port 3  Similar to port 1, each of these pins can serve as general input or output. Besides, all of them have these multiple functions:

Pin 10: RXD Serial asynchronous communication input or Serial synchronous communication output.

Pin 11: TXD Serial asynchronous communication output or Serial synchronous communication clock output.

Pin 12: INT0 Interrupt 0 input.

Pin 13: INT1 Interrupt 1 input.

Pin 14: T0 Counter 0 clock input.

Pin 15: T1 Counter 1 clock input
.
Pin 16: WR Write to external (additional) RAM.

Pin 17: RD Read from external RAM.

Pin 18, 19: X2, X1 Internal oscillator input and output. A quartz crystal which specify operating frequency is generally connected to these pins. Instead of it, tiny ceramics resonators can also be used for frequency constancy. Later versions of microcontrollers operate at a frequency of 0 Hz up to over 50 Hz.

Pin 20: GND Ground.

Pin 21-28: Port 2 If there is no intention to use external memory then these port pins are configured as general inputs/outputs. In case external memory is used, the higher address byte, i.e. addresses A8-A15 will appear on this port. Even though memory with capacity of 64Kb is not used, which means that not all eight port bits are used for its addressing, the rest of them are not available as inputs/outputs.

Pin 29: PSEN If external ROM is used for storing program then a logic zero (0) appears on it every time the microcontroller reads a byte from memory.

Pin 30: ALE Prior to reading from external memory, the microcontroller puts the lower address byte (A0-A7) on P0 and activates the ALE output. After receiving signal from the ALE pin, the external register (usually 74HCT373 or 74HCT375 add-on chip) memorizes the state of P0 and uses it as a memory chip address. Immediately after that, the ALU pin is returned its previous logic state and P0 is now used as a Data Bus. As seen, port data multiplexing is performed by means of only one additional (and cheap) integrated circuit. In other words, this port is used for both data and address transmission.

Pin 31: EA By applying logic zero to this pin, P2 and P3 are used for data and address transmission with no regard to whether there is internal memory or not. It means that even there is a program written to the microcontroller, it will not be executed. Instead, the program written to external ROM will be executed. By applying logic one to the EA pin, the microcontroller will use both memories, first internal then external (if exists).

Pin 32-39: Port 0 Similar to P2, if external memory is not used, these pins can be used as general inputs/outputs. Otherwise, P0 is configured as address output (A0-A7) when the ALE pin is driven high (1) or as data output (Data Bus) when the ALE pin is driven low (0).

Pin 40: VCC +5V power supply.

Features of 8051 microcontroller

Some of the  important Features of 8051 microcontroller

  •     It is an 8 bit ALU.
  •     16 bit PC and DPTR.
  •     8 bit stack pointer and 8 bit PSW.
  •     4K internal ROM
  •     128 bytes of Internal RAM.
  •     32 bits arranged as four,8 bit ports P0-P3.
  •     Two 16 bit timer/counters, T0 & T1.
  •     Full duplex serial Port.
  •     Control Registers
  •     TCON,TMOD,SCON,PCON,IP,IE etc (SFR’s).
  •     Two External and three internal interrupt
  •     0-12 MHz clock.
  •     40 pin DIP package.
  •     Works in Power Down and Idle mode.
  •     Powerful Instruction set.
  •     8bit data bus:-it can access 8bit of data in one operation
  •     8bit accumulator, 8bit Register and 8bit ALU.







Friday, 4 May 2012

Project Topics for OOP

Some of the important project for object oriented programming in java are as follow....

  1. Game snake and Ladder
  2. Windows Explorer that can also open files
  3. Java util
  4. Networking
  5. Speeking calculator
  6. Text Messanger
  7. Media Player
  8. Java Beens
  9. Servlets
  10. Image viewer for all formats plus zoom in/out
  11. Java.io
  12. Data Structures
  13. Chess  game
  14. Tatris game
  15. Moving clock with mouse movement
  16. Text to Image Convertor
  17.  Tic Tac Toe game

What is the difference between microcontroller and microprocessor?

Microprocessor is the device which contains no RAM, ROM and no I/O ports on the same chip itself  and it is also known as the general purpose microprocessor . Some important microprocessors are Intel's x86 family (8086, 80286, 80386, 80486 and the pentium ). Whereas a microcontroller has a CPU (microprocessor) in additiion  it  also have RAM , ROM , and I/O ports on the same chip. In other  words the processor , RAM , ROM , I/O ports and timer  are all embedded together on the one chip.
The microcontroller is widely used in many devices for many diffferent applications. Some of the important microcontroller are  8051, PIC . AVR