SMK Binawiyata Sragen

  • This is default featured slide 1 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 2 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 3 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 4 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 5 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Electronic Circuit Symbols

New Document
In electronic circuits, there are many electronic symbols that are used to represent or identify a basic electronic or electrical device. They are mostly used to draw a circuit diagram and are standardized internationally by the IEEE standard (IEEE Std 315) and the British Standard (BS 3939). NO changes can be brought by the user on any electronic symbol, but the user is free to bring any changes in the architectural drawings like power source and lighting.
Electronic Symbols
The symbols for different electronic devices are shown below. Click on each link given below to view the symbols. Apart from the circuit symbols, each device is also designated a short name. Though these names are not approved as standard notations, they are commonly used by most people. These designations are also given in the list.

Wires


Electronic Component Circuit Symbol Description
Wire
Wire Circuit Symbol
Wire Circuit Symbol
Used to connect one component to another.
  Wires Joined
Wires Joined Circuit Symbol
Wires Joined Circuit Symbol
 
One device may be connected to another through wires. This is represented by drawing “blobs” on the point where they are shorted.
  Unjoined Wires
Wires Not Joined Circuit Symbol
Wires Not Joined Circuit Symbol
When circuits are drawn some wires may not touch others. This can only be shown by bridging them or by drawing them without blobs. But bridging is commonly practised as there will not arise any confusion.
 

Power Supplies


Electronic Component Circuit SymbolDescription
  Cell
Cell Circuit Symbol
Cell Circuit Symbol
 
Used to provide a supply for a circuit.
Battery
Battery Circuit Symbol
Battery Circuit Symbol
A battery has more than a cell and is used for the same purpose. The smaller terminal is negative and the larger one is positive. Abbreviated as ‘B’.
DC Supply
DC Supply Circuit Symbol
DC Supply Circuit Symbol
Used as a DC power supply, that is, the current will always flow in one direction.
AC Supply
AC Supply Circuit Symbol
AC Supply Circuit Symbol
Used as AC power supply, that is, the current will keep alternating directions.
Fuse
Fuse Circuit Symbol
Fuse Circuit Symbol
Used in circuits where a probability of excessive current flows. The fuse will break the circuit if excessive current flows and saves the other devices from damage.
  Transformer
Transformer Circuit Symbol
Transformer Circuit Symbol
 
Used as an ac power supply. Consists of two coils, the primary and secondary that are linked together through an iron core. There is no physical connection between the two coils. The principle of mutual inductance is used to obtain power. Abbreviated as ‘T’.
Earth/Ground
Earth Circuit Symbol
Earth Circuit Symbol
Used in electronic circuits to represent the 0 volts of the power supply. It can also be defined as the real earth , when it is applied in radio circuits and power circuits.
 

Resistor


Electronic Component Circuit SymbolDescription
Resistor  
Resistor Circuit Symbol
Resistor Circuit Symbol
A resistor is used to restrict the amount of current flow through a device. Abbreviated as ‘R’.
Rheostat
Rheostat Circuit Symbol
Rheostat Circuit Symbol
A rheostat is used to control the current flow with two contacts. Applicable in controlling lamp brightness, capacitor charge rate, etc.
Potentiometer
Potentiometer Circuit Symbol
Potentiometer Circuit Symbol
A potentiometer is used to control the voltage flow and has three contacts. Have applications in changing a mechanical angle change to an electrical parameter. Abbreviated as ‘POT’.
Preset
Preset Circuit Symbol
Preset Circuit Symbol
Presets are low cost variable resistors that are used to control the charge flow with the help of a screw driver. Applications where the resistance is determined only at the end of the circuit design.
 

Capacitor


Electronic Component Circuit SymbolDescription
Capacitor
Capacitor Circuit Symbol
Capacitor Circuit Symbol
Capacitor is a device that is used to store electrical energy. It consists of two metals plates that are separated by a dielectric. It is applicable as a filter, that is, to block DC signals and allow AC signals. Abbreviated with the letter ‘C’.
Capacitor - Polarized
Capacitor-Polarised Circuit Symbol
Capacitor-Polarised Circuit Symbol
Capacitor can be used in a timer circuit by adding a resistor.
Variable Capacitor
Variable Capacitor Circuit Symbol
Variable Capacitor Circuit Symbol
Used to vary the capacitance by turning the knob. A type of variable capacitor is the trimmer capacitor that is small in size. The notations are all the same.

Diode


Electronic Component Circuit SymbolDescription
Diode
Diode Circuit Symbol
Diode Circuit Symbol
A diode is used to allow electric current to flow in only one direction. Abbreviated as ‘D’.
Light Emitting Diode (LED)
LED Circuit Symbol
LED Circuit Symbol
LED is used to emit light when a current is passed through the device. It is abbreviated as LED.
Zener Diode
Zener Diode Circuit Symbol
Zener Diode Circuit Symbol
After a breakdown voltage, the device allows current to flow in the reverse direction as well. It is abbreviated as ‘Z’.
Photo Diode
Photo Diode Circuit Symbol
Photo Diode Circuit Symbol
Photodiode works as a photo-detector and converts light into its corresponding voltage or current.
Tunnel Diode
Tunnel Diode Circuit Symbol
Tunnel Diode Circuit Symbol
Tunnel Diode is known for its high-speed operation due to its application in quantum mechanical effects.
Schottky Diode
Schottky Diode Circuit Symbol
Schottky Diode Circuit Symbol
The Schottky Diode is known for its large forward voltage drop and hence has great applications in switching circuits.

Transistor


Electronic Component Circuit SymbolDescription
  NPN Transistor
Transistor NPN Circuit Symbol
Transistor NPN Circuit Symbol
 
This is a transistor with a layer of P-doped semiconductor fixed between two layers of N-doped semiconductors that act as the emitter and collector. Abbreviated as ‘Q’.
  PNP Transistor
Transistor PNP Circuit Symbol
Transistor PNP Circuit Symbol
 
This is a transistor with a layer of N-doped semiconductor fixed between two layers of P-doped semiconductors that act as the emitter and collector. Abbreviated as ‘Q’.
  Phototransistor
Phototransistor Circuit Symbol
Phototransistor Circuit Symbol
 
The working of a phototransistoris similar to that of a bipolar transistor with a difference that it converts light into its corresponding current. The phototransistor can also act as a photodiode if the emitter is not connected.
Field Effect Transistor
Field Effect Transistor Circuit Symbol
Field Effect Transistor Circuit Symbol
Like a transistor, a FET has three terminals, the Gate, Source and Drain. The device has an electric field that controls the conductivity of a channel of one type charge carrier in a semiconductor substance.
N-Channel Junction FET
n-channel Junction Field Effect Transistor (JFET) Circuit Symbol
n-channel Junction Field Effect Transistor (JFET) Circuit Symbol
The Junction Field Effect Transistor (JFET) is the simplest type of FET with applications in Switching and voltage variable resistor. In an N-channel JFET an N-type silicon bar has two smaller pieces of P-type silicon material diffused on each sides of its middle part, forming P-N junctions.
P-Channel Junction FET
p-channel Junction Field Effect Transistor (FET) Circuit Symbol
p-channel Junction Field Effect Transistor (FET) Circuit Symbol
P-channel JFET is similar in construction to N-channel JFET except that P-type semiconductor base is sandwiched between two N-type junctions. In this case majority carriers are holes.
Metal Oxide Semiconductor FET Given Below
Abbreviated as MOSFET. MOSFET is a three terminal device and is controlled by a gate bias. It is known for its low capacitance and low input impedance.
  Enhancement MOSFET
e-MOSFET Circuit Symbol
e-MOSFET Circuit Symbol
 
The enhancement MOSFET structure has no channel formed during its construction. Voltage is applied to the gate, so as to develop a channel of charge carriers so that a current results when a voltage is applied across the drain-source terminals. Abbreviated as e-MOSFET.
  Depletion MOSFET
d-MOSFET Circuit Symbol
d-MOSFET Circuit Symbol
 
In the depletion-mode construction a channel is physically constructed and a current between drain and source is due to voltage applied across the drain-source terminals. Abbreviated as d-MOSFET.

Logic Gates


Gate Standard Symbol IEC Symbol Description
  AND Gate
AND GATE Symbol
AND GATE Symbol
AND Gate IEC Symbol
AND Gate IEC Symbol
 
If all the inputs of an AND gate are HIGH, then the output will also be HIGH. If any one of them is LOW, the output will also be LOW.
NAND Gate
NAND Gate Symbol
NAND Gate Symbol
NAND Gate IEC Symbol
NAND Gate IEC Symbol
Short form for NOT AND Gate. Of all the inputs are HIGH, the output will be LOW. If any one input is LOW, the output will be HIGH.
  OR Gate
OR Gate Symbol
OR Gate Symbol
OR Gate IEC Symbol
OR Gate IEC Symbol
 
If any one of the input is HIGH, the output will also be HIGH. If both inputs are LOW, the output will also be LOW.
  NOR Gate
NOR Gate Symbol
NOR Gate Symbol
NOR Gate IEC Symbol
NOR Gate IEC Symbol
 
Short form for NOT OR. If both inputs are LOW, the output will also be LOW. For other cases, the output will be HIGH.
  EX-OR Gate
EX-OR Gate Symbol
EX-OR Gate Symbol
EX-OR Gate IEC Symbol
EX-OR Gate IEC Symbol
 
Short form for Exclusive NOR. If both inputs are either in LOW state r HIGH state, the output will be LOW. If both inputs are different, the output will be HIGH.
  EX-NOR Gate
EX-NOR Gate Symbol
EX-NOR Gate Symbol
EX-NOR Gate IEC Symbol
EX-NOR Gate IEC Symbol
 
Short form for Exclusive NOT OR. If both the inputs are the same, the output will be HIGH. If both are different, the output will also be different.
  NOT Gate
NOT Gate  Symbol
NOT Gate Symbol
NOT Gate  Symbol
NOT Gate Symbol
 
Also known as the inverter Gate. There is only one input for this gate. If the input is HIGH, the output will be LOW. If the input is LOW, the output will be HIGH.

Meters


Electronic Component Circuit SymbolDescription
  Voltmeter
Voltmeter Circuit Symbol
Voltmeter Circuit Symbol
 
Voltmeter is used to measure the voltage at a certain point in the circuit.
Ammeter
Ammeter Circuit Symbol
Ammeter Circuit Symbol
An Ammeter is used to measure the current that passes through the circuit at a particular point.
Galvanometer
Galvanometer Circuit Symbol
Galvanometer Circuit Symbol
A galvanometer is used to measure very small currents in the order of 1 milli ampere or less.
  Ohmmeter
Ohmmeter Circuit Symbol
Ohmmeter Circuit Symbol
 
Resistance of the circuit is measured using an Ohmmeter.
Oscilloscope
Oscilloscope Circuit Symbol
Oscilloscope Circuit Symbol
An oscilloscope is used to measure the voltage and time period of signals along with their shape display.

Sensors


Electronic Component Circuit SymbolDescription
Light Dependent Resistor (LDR)
LDR Circuit Symbol
LDR Circuit Symbol
It is abbreviated as LDR. Light Dependent Resistor is used to convert light into its corresponding resistance. Instead of directly measuring the light, it senses the heat content and converts it onto resistance.
Thermistor
Thermistor Circuit Symbol
Thermistor Circuit Symbol
Instead of directly measuring the light, a thermistor senses the heat content and converts it into resistance. Abbreviated as ‘TH’.

Switches


Electronic Component Circuit SymbolDescription
  Push Switch
Push Switch Circuit Symbol
Push Switch Circuit Symbol
 
This is an ordinary switch that passes current only upon pressing.
  Push to Break Switch
Push to Break Switch Circuit Symbol
Push to Break Switch Circuit Symbol
 
The push to break switch is usually kept in the ON state (closed). It turns to OFF state (open) only when the switch is pressed.
  Singe Pole Single Throw Switch
On Off Switch (SPST) Circuit Symbol
On Off Switch (SPST) Circuit Symbol
 
Also known as the ON/OFF switch. This switch allows the flow of current only when it is kept ON. Abbreviated as SPST.
Single Pole Double Throw Switch
2-Way Switch (SPDT) Circuit Symbol
2-Way Switch (SPDT) Circuit Symbol
Also known as the 2-way switch. It can be also called as an ON/OFF/ON switch as it has an OFF position in the center. The switch causes the flow of current in two directions, depending on its position. It can be abbreviated as SPDT.
Double Pole Single Throw Switch
Dual On-Off Switch (DPST) Circuit Symbol
Dual On-Off Switch (DPST) Circuit Symbol
Abbreviated as DPST. Can also be called as a dual ON-OFF switch. This is used to isolate between the live and neutral connections in the main electrical line.
Double Pole Double Throw Switch
DPDT Circuit Symbol
DPDT Circuit Symbol
Abbreviated as DPDT. The switch uses a central OFF position and is applied as reversing switch for motors.
  Relay
Relay Circuit Symbol
Relay Circuit Symbol
 
Relay is abbreviated as ‘RY’. This device can easily switch a 230 Volt AC mains circuit. It has three switching stages called Normally Open (NO). Normally Closed (NC), and Common (COM).

Audio and Radio Devices


Electronic Component Circuit SymbolDescription
Microphone
Microphone Circuit Symbol
Microphone Circuit Symbol
This device is used for converting sound to its corresponding electrical energy. Abbreviated as ‘MIC’.
Earphone
Earphone Circuit Symbol
Earphone Circuit Symbol
Does the reverse process of microphone and converts electrical energy into sound.
Loudspeaker
Loudspeaker Circuit Symbol
Loudspeaker Circuit Symbol
Does the same operation as an earphone, but converts an amplified version of the electrical energy into its corresponding sound.
Piezo-Transducer
PiezoTransducer Circuit Symbol
PiezoTransducer Circuit Symbol
It is a transducer that converts electrical energy into sound.
Amplifier
Amplifier Circuit Symbol
Amplifier Circuit Symbol
Used to amplify a signal. It is mainly used to represent a whole circuit rather than just one component.
Aerial
Aerial  Circuit Symbol
Aerial Circuit Symbol
This device is used to transmit/receive signals. Abbreviated as ‘AE’.

Output Devices


Electronic Component Circuit SymbolDescription
Lighting Lamp
Lamp Circuit Symbol
Lamp Circuit Symbol
This is used to provide light for the output.
Indicator Lamp
Lamp Indiator Circuit Symbol
Lamp Indiator Circuit Symbol
Used to convert electrical energy into light. The best example is the warning light on a car dashboard.
Heater
Heater Circuit Symbol
Heater Circuit Symbol
This transducer is used to change electrical energy into heat.
Inductor
Inductor Circuit Symbol
Inductor Circuit Symbol
Inductor is used to produce a magnetic field when a certain current is passed through a coil of wire. The wire is coiled on a soft iron core. Have applications in motors, and tank circuits. Abbreviated as ‘L’.
Motor
Motor Circuit Symbol
Motor Circuit Symbol
This device is used to convert electrical energy into mechanical energy. Can be used as a generator as well. Abbreviated as ‘M’.
Bell
Bell Circuit Symbol
Bell Circuit Symbol
Used to produce a sound as the output, according to the electrical energy produced as the input.
Buzzer
Buzzer Circuit Symbol
Buzzer Circuit Symbol
It is used to produce an output sound corresponding to the electrical energy in the input.
Posted in

Share:

Jam digital dengan IC TTL

Jam Digital di buat dari IC TTL

Daftar Komponen :
  • 6 IC 7490
  • 4 IC 7447
  • 2 Gerbang OR
  • 2 Push Button
  • 1 Clock
  • 1 LCD VI-402-DP
  • 2 Resistor 1K
Simulator Proteusnya dapat didownload disini 
Semoga bermanfaat bagi yang bereksperimen Jooooooo
Share:

Pengendali Lampu lalulintas 4 jalur

 Traficlight seperti kita ketahui digunakan untuk mengatur lalu lintas pada persimpangan jalan baik pertigaan atau perempatan bahkan simpang lima. Traficlight digunakan untuk menggantikan tugas pak polisi supaya kerjanya lebih ringan dan he he he tinggal tilang aja klo ada yang gak nurut.. cukup sekian basa basinya langsung saja ke konfigurasi hardwarenya. trafic ini terdiri dari tiga buah komponen utama yaitu:
1. Controler
2. Counter display 7 segment
3. Led merah, kuning dan hijau
Controler pada trafic ini menggunakan atmega16
Counter display menggunakan 7 segment dengan shift register sebagai perantara pengiriman data dari controler Led merah, kuning dan hijau digunakan mengatur lalulintas merah artinya stop, hijau artinya jalan dan kuning artinya jalan ngebut (keburu lampu merahnya nyala)

Gambar Rangkaian dengan simulator Proteus :

Pada prinsipnya kerja traficlight adalah menyalakan lampu hijau dan lampu kuning secara bergantian, misalnya pada trafic light 4 jalur ini. Pada traficlight ini nyala lampu hijau dan kuning dibuat sama untuk 4 jalurnya yaitu 8 detik untuk lampu hijau dan 2 detik untuk lampu kuning jadi totalnya adalah 11 detik. sedangkan untuk nyala lampu merahnya adalah 3 kali lipat nyala lampu hijau + Kuning, jadi untuk nyala lampu merahnya adalah 11+11+11 = 35. lho kog 35 bukannya 33? eit jangan salah dalam trafic light counter downnya menghitung atau mencacah sampai angka nol (0) bukan 1 untuk lebih jelasnya berikut adalah timeline nya

keterangan
garis hijau = lama nyala lampu hijau
garis kuning = lama nyala lampu kuning
garis merah = lama nyala lampu merah
setelah mengetahui konsepnya maka dapat langsung diimplementasikan pada programnya. disini bahasa pemrogramannya menggunakan Bascomavr. Berikut merupakan inti dari program traficlight diatas:

Souce Code :
$regfile = "m16def.dat"
$crystal = 12000000

Config Portb.0 = Output
Config Portb.1 = Output
Config Portb.2 = Output
Config Portb.5 = Output
Config Portb.6 = Output
Config Portb.7 = Output
Config Portd.0 = Output
Config Portd.1 = Output
Config Portd.2 = Output
Config Portd.5 = Output
Config Portd.6 = Output
Config Portd.7 = Output
Config Porta.0 = Output
Config Porta.1 = Output
Config Porta.2 = Output
Config Porta.5 = Output
Config Porta.6 = Output
Config Porta.7 = Output
Config Portc.0 = Output
Config Portc.1 = Output
Config Portc.2 = Output
Config Portc.5 = Output
Config Portc.6 = Output
Config Portc.7 = Output
'trafic 1
Data1 Alias Portb.0
Clock1 Alias Portb.1
Oe1 Alias Portb.2

Merah1 Alias Portb.5
Kuning1 Alias Portb.6
Hijau1 Alias Portb.7

'trafic 2
Data2 Alias Portd.7
Clock2 Alias Portd.6
Oe2 Alias Portd.5

Merah2 Alias Portd.0
Kuning2 Alias Portd.1
Hijau2 Alias Portd.2

'trafic3
Data3 Alias Porta.2
Clock3 Alias Porta.1
Oe3 Alias Porta.0

Merah3 Alias Porta.7
Kuning3 Alias Porta.6
Hijau3 Alias Porta.5

'trafic4
Data4 Alias Portc.0
Clock4 Alias Portc.1
Oe4 Alias Portc.2

Merah4 Alias Portc.5
Kuning4 Alias Portc.6
Hijau4 Alias Portc.7


Dim Kodesat1 As Byte , Npul1 As Integer , Nsat1 As Integer , Kodepul1 As Byte
Dim Sat1 As Byte , Pul1 As Byte , Flaghijau1 As Bit , Flagkuning1 As Bit , Flag1put As Bit
Dim A1 As Bit , B1 As Bit

Dim Kodesat2 As Byte , Npul2 As Integer , Nsat2 As Integer , Kodepul2 As Byte
Dim Sat2 As Byte , Pul2 As Byte , Flaghijau2 As Bit , Flagkuning2 As Bit
Dim A2 As Bit , B2 As Bit

Dim Kodesat3 As Byte , Npul3 As Integer , Nsat3 As Integer , Kodepul3 As Byte
Dim Sat3 As Byte , Pul3 As Byte , Flaghijau3 As Bit , Flagkuning3 As Bit
Dim A3 As Bit , B3 As Bit

Dim Kodesat4 As Byte , Npul4 As Integer , Nsat4 As Integer , Kodepul4 As Byte
Dim Sat4 As Byte , Pul4 As Byte , Flaghijau4 As Bit , Flagkuning4 As Bit
Dim A4 As Bit , B4 As Bit

Mulai:

A1 = 0
B1 = 0

A2 = 0
B2 = 0

A3 = 0
B3 = 0

A4 = 0
B4 = 0

Flaghijau1 = 0
Flagkuning1 = 0

Flaghijau2 = 0
Flagkuning2 = 0

Flaghijau3 = 0
Flagkuning3 = 0

Flaghijau4 = 0
Flagkuning4 = 0

Sat1 = 8
Pul1 = 0

Sat2 = 1
Pul2 = 1

Sat3 = 3
Pul3 = 2

Sat4 = 5
Pul4 = 3


Do

Gosub Tampil1
Gosub Tampil2
Gosub Tampil3
Gosub Tampil4

Gosub Trafic1
Gosub Trafic2
Gosub Trafic3
Gosub Trafic4

Decr Sat1
Decr Sat2
Decr Sat3
Decr Sat4

Loop

Trafic1:
'lampu
   If A1 = 0 And B1 = 0 Then
     Merah1 = 0
     Kuning1 = 0
     Hijau1 = 1
   End If

   If A1 = 0 And B1 = 1 Then
     Merah1 = 1
     Kuning1 = 0
     Hijau1 = 0
   End If

   If A1 = 1 And B1 = 0 Then
     Merah1 = 0
     Kuning1 = 1
     Hijau1 = 0
   End If

'counter

   If Sat1 = 0 And Pul1 = 0 And Flaghijau1 = 0 And Flagkuning1 = 0 Then
   Sat1 = 3
   Pul1 = 0
   Flaghijau1 = 1
   A1 = 1
   B1 = 0
   End If

   If Sat1 = 0 And Pul1 = 0 And Flaghijau1 = 1 And Flagkuning1 = 0 Then
   Sat1 = 6
   Pul1 = 3
   Flagkuning1 = 1
   A1 = 0
   B1 = 1
   End If

   If Sat1 = 0 And Pul1 = 0 And Flaghijau1 = 1 And Flagkuning1 = 1 Then
   A1 = 0
   B1 = 0
   Flaghijau1 = 0
   Flagkuning1 = 0
   End If

   If Sat1 = 0 And Pul1 = 3 Then
   Decr Pul1
   Sat1 = 10
   End If

   If Sat1 = 0 And Pul1 = 2 Then
   Decr Pul1
   Sat1 = 10
   End If

   If Sat1 = 0 And Pul1 = 1 Then
   Decr Pul1
   Sat1 = 10
   End If

Return


Tampil1:
Reset Oe1
Kodesat1 = Lookup(sat1 , Kode)
Kodepul1 = Lookup(pul1 , Kode)
Shiftout Data1 , Clock1 , Kodesat1 , 1
Shiftout Data1 , Clock1 , Kodepul1 , 1
Waitms 200
Set Oe1
Return

Trafic2:
'lampu
   If A2 = 0 And B2 = 1 Then
      Merah2 = 0
      Kuning2 = 0
      Hijau2 = 1
   End If

   If A2 = 1 And B2 = 0 Then
      Merah2 = 0
      Kuning2 = 1
      Hijau2 = 0
   End If

   If A2 = 0 And B2 = 0 Then
      Merah2 = 1
      Kuning2 = 0
      Hijau2 = 0
   End If

'counter
   If Sat2 = 0 And Pul2 = 0 And Flaghijau2 = 0 And Flagkuning2 = 0 Then
      Sat2 = 9
      Pul2 = 0
      Flaghijau2 = 1
      A2 = 0
      B2 = 1
   End If

   If Sat2 = 0 And Pul2 = 0 And Flaghijau2 = 1 Then
      Sat2 = 3
      Pul2 = 0
      Flagkuning2 = 1
      Flaghijau2 = 0
      A2 = 1
      B2 = 0
   End If

   If Sat2 = 0 And Pul2 = 0 And Flagkuning2 = 1 Then
      Sat2 = 6
      Pul2 = 3
      Flagkuning2 = 0
      Flaghijau2 = 1
      A2 = 0
      B2 = 0
   End If

   If Sat2 = 0 And Pul2 = 3 Then
   Decr Pul2
   Sat2 = 10
   End If

   If Sat2 = 0 And Pul2 = 2 Then
   Decr Pul2
   Sat2 = 10
   End If

   If Sat2 = 0 And Pul2 = 1 Then
   Decr Pul2
   Sat2 = 10
   End If

Return


Tampil2:
Reset Oe2
Kodesat2 = Lookup(sat2 , Kode)
Kodepul2 = Lookup(pul2 , Kode)
Shiftout Data2 , Clock2 , Kodesat2 , 1
Shiftout Data2 , Clock2 , Kodepul2 , 1
Waitms 200
Set Oe2
Return

Trafic3:
'lampu
   If A3 = 0 And B3 = 1 Then
      Merah3 = 0
      Kuning3 = 0
      Hijau3 = 1
   End If

   If A3 = 1 And B3 = 0 Then
      Merah3 = 0
      Kuning3 = 1
      Hijau3 = 0
   End If

   If A3 = 0 And B3 = 0 Then
      Merah3 = 1
      Kuning3 = 0
      Hijau3 = 0
   End If

'counter
   If Sat3 = 0 And Pul3 = 0 And Flaghijau3 = 0 And Flagkuning3 = 0 Then
      Sat3 = 9
      Pul3 = 0
      Flaghijau3 = 1
      A3 = 0
      B3 = 1
   End If

   If Sat3 = 0 And Pul3 = 0 And Flaghijau3 = 1 And Flagkuning3 = 0 Then
      Sat3 = 3
      Pul3 = 0
      Flaghijau3 = 0
      Flagkuning3 = 1
      A3 = 1
      B3 = 0
   End If

   If Sat3 = 0 And Pul3 = 0 And Flagkuning3 = 1 And Flagkuning3 = 1 Then
      Sat3 = 6
      Pul3 = 3
      Flagkuning3 = 0
      A3 = 0
      B3 = 0
   End If

   If Sat3 = 0 And Pul3 = 3 Then
   Decr Pul3
   Sat3 = 10
   End If

   If Sat3 = 0 And Pul3 = 2 Then
   Decr Pul3
   Sat3 = 10
   End If

   If Sat3 = 0 And Pul3 = 1 Then
   Decr Pul3
   Sat3 = 10
   End If

Return


Tampil3:
Reset Oe3
Kodesat3 = Lookup(sat3 , Kode)
Kodepul3 = Lookup(pul3 , Kode)
Shiftout Data3 , Clock3 , Kodesat3 , 1
Shiftout Data3 , Clock3 , Kodepul3 , 1
Waitms 200
Set Oe3
Return

Trafic4:
'lampu

   'If Flag1put = 1 Then
   '   Goto Mulai
   'End If

   If A4 = 0 And B4 = 1 Then
      Merah4 = 0
      Kuning4 = 0
      Hijau4 = 1
   End If

   If A4 = 1 And B4 = 0 Then
      Merah4 = 0
      Kuning4 = 1
      Hijau4 = 0
   End If

   If A4 = 0 And B4 = 0 Then
      Merah4 = 1
      Kuning4 = 0
      Hijau4 = 0
   End If

'counter
   If Sat4 = 0 And Pul4 = 0 And Flaghijau4 = 0 And Flagkuning4 = 0 Then
      Sat4 = 9
      Pul4 = 0
      Flaghijau4 = 1
      A4 = 0
      B4 = 1
   End If

   If Sat4 = 0 And Pul4 = 0 And Flaghijau4 = 1 And Flagkuning4 = 0 Then
      Sat4 = 3
      Pul4 = 0
      Flagkuning4 = 1
      A4 = 1
      B4 = 0
   End If

   If Sat4 = 0 And Pul4 = 0 And Flaghijau4 = 1 And Flagkuning4 = 1 Then
      'Flag1put = 1
      Goto Mulai
   End If

   If Sat4 = 0 And Pul4 = 3 Then
   Decr Pul4
   Sat4 = 10
   End If

   If Sat4 = 0 And Pul4 = 2 Then
   Decr Pul4
   Sat4 = 10
   End If

   If Sat4 = 0 And Pul4 = 1 Then
   Decr Pul4
   Sat4 = 10
   End If

Return


Tampil4:
Reset Oe4
Kodesat4 = Lookup(sat4 , Kode)
Kodepul4 = Lookup(pul4 , Kode)
Shiftout Data4 , Clock4 , Kodesat4 , 1
Shiftout Data4 , Clock4 , Kodepul4 , 1
Waitms 200
Set Oe4
Return

Kode:
Data &HC0 , &HF9 , &HA4 , &HB0 , &H99 , &H92 , &H82 , &HF8 , &H80 , &H90
Share:

Jam Dot Matrik Jumbo


Silahkan downlod disini filenya
Download file hex nya disini


Kode Listing : CodeVision

/*****************************************************
This program was produced by the
CodeWizardAVR V1.25.5 Professional

Project : jam Digital Jumbo
Version : J01/13
Date    : 20 Januari 2013
Author  : Suparno
Company :SMK Binawiyata Sragen
Comments:


Chip type           : ATmega32
Program type        : Application
Clock frequency     : 12.000000 MHz
Memory model        : Small
External SRAM size  : 0
Data Stack size     : 512
*****************************************************/

#include

#include

flash unsigned char numfont[11][24][2]=
{/*0*/{{ 255 , 255 } , { 63 , 252 } , { 143 , 241 } , { 199 , 227 } , { 199 , 195 } , { 195 , 195 } , { 195 , 195 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 195 , 195 } , { 195 , 195 } , { 199 , 195 } , { 135 , 225 } , { 31 , 248 } , { 255 , 255 } , { 255 , 255 }}
,/*1*/{{ 255 , 255 } , { 255 , 252 } , { 63 , 252 } , { 7 , 252 } , { 3 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 252 } , { 31 , 248 } , { 3 , 224 } , { 255 , 255 } , { 255 , 255 }}
,/*2*/{{ 255 , 255 } , { 31 , 252 } , { 7 , 248 } , { 3 , 240 } , { 1 , 224 } , { 57 , 224 } , { 125 , 224 } , { 255 , 224 } , { 255 , 224 } , { 255 , 240 } , { 255 , 240 } , { 255 , 248 } , { 127 , 252 } , { 127 , 252 } , { 63 , 254 } , { 31 , 255 } , { 159 , 247 } , { 207 , 243 } , { 7 , 248 } , { 3 , 248 } , { 1 , 248 } , { 0 , 248 } , { 255 , 255 } , { 255 , 255 }}
,/*3*/{{ 255 , 255 } , { 63 , 240 } , { 15 , 224 } , { 231 , 192 } , { 251 , 193 } , { 255 , 193 } , { 255 , 225 } , { 255 , 248 } , { 127 , 248 } , { 31 , 224 } , { 63 , 192 } , { 255 , 128 } , { 255 , 129 } , { 255 , 129 } , { 255 , 131 } , { 255 , 131 } , { 255 , 131 } , { 243 , 195 } , { 225 , 227 } , { 193 , 225 } , { 1 , 248 } , { 7 , 254 } , { 255 , 255 } , { 255 , 255 }}
,/*4*/{{ 255 , 255 } , { 255 , 227 } , { 255 , 227 } , { 255 , 225 } , { 255 , 224 } , { 127 , 224 } , { 127 , 224 } , { 191 , 224 } , { 223 , 224 } , { 239 , 224 } , { 239 , 224 } , { 247 , 224 } , { 251 , 224 } , { 253 , 224 } , { 1 , 128 } , { 1 , 128 } , { 1 , 128 } , { 255 , 224 } , { 255 , 224 } , { 255 , 224 } , { 255 , 224 } , { 255 , 224 } , { 255 , 255 } , { 255 , 255 }}
,/*5*/{{ 255 , 255 } , { 31 , 128 } , { 15 , 192 } , { 15 , 192 } , { 15 , 224 } , { 247 , 255 } , { 247 , 255 } , { 7 , 255 } , { 3 , 248 } , { 3 , 240 } , { 3 , 224 } , { 1 , 192 } , { 127 , 128 } , { 255 , 131 } , { 255 , 135 } , { 255 , 143 } , { 255 , 159 } , { 243 , 159 } , { 193 , 223 } , { 129 , 207 } , { 3 , 231 } , { 7 , 248 } , { 255 , 255 } , { 255 , 255 }}
,/*6*/{{ 255 , 255 } , { 255 , 135 } , { 255 , 224 } , { 127 , 248 } , { 31 , 254 } , { 15 , 255 } , { 143 , 255 } , { 135 , 255 } , { 131 , 255 } , { 3 , 240 } , { 195 , 225 } , { 193 , 193 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 195 , 131 } , { 131 , 195 } , { 135 , 195 } , { 143 , 225 } , { 63 , 248 } , { 255 , 255 } , { 255 , 255 }}
,/*7*/{{ 255 , 255 } , { 3 , 192 } , { 3 , 192 } , { 3 , 192 } , { 3 , 224 } , { 249 , 231 } , { 253 , 231 } , { 255 , 243 } , { 255 , 243 } , { 255 , 243 } , { 255 , 249 } , { 255 , 249 } , { 255 , 249 } , { 255 , 252 } , { 255 , 252 } , { 255 , 252 } , { 127 , 254 } , { 127 , 254 } , { 127 , 254 } , { 63 , 255 } , { 63 , 255 } , { 63 , 255 } , { 255 , 255 } , { 255 , 255 }}
,/*8*/{{ 255 , 255 } , { 31 , 240 } , { 135 , 227 } , { 195 , 199 } , { 193 , 135 } , { 193 , 135 } , { 129 , 135 } , { 1 , 135 } , { 3 , 194 } , { 3 , 240 } , { 7 , 240 } , { 31 , 224 } , { 31 , 192 } , { 71 , 192 } , { 227 , 128 } , { 225 , 129 } , { 225 , 131 } , { 225 , 131 } , { 225 , 195 } , { 227 , 195 } , { 199 , 225 } , { 15 , 248 } , { 255 , 255 } , { 255 , 255 }}
,/*9*/{{ 255 , 255 } , { 31 , 252 } , { 135 , 241 } , { 195 , 225 } , { 195 , 193 } , { 193 , 195 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 193 , 131 } , { 131 , 131 } , { 135 , 131 } , { 15 , 192 } , { 255 , 195 } , { 255 , 225 } , { 255 , 225 } , { 255 , 240 } , { 127 , 248 } , { 31 , 252 } , { 7 , 255 } , { 195 , 255 } , { 255 , 255 } , { 255 , 255 }}
,/*:*/{{255,255},{255,255},{255,255},{255,255},{255,255},{255,255},{255,255},{255,255},{193,255},{193,255},{193,255},{193,255},{193,255},{255,255},{255,255},{255,255},{255,255},{193,255},{193,255},{193,255},{193,255},{193,255},{255,255},{255,255}}};




unsigned char satr=0;

unsigned char hour=10,minute=58,second=30,weekday=6,monthday=7,monthyear=5,timedigit[9];
unsigned int year=1386;


interrupt [TIM1_OVF] void timer1_ovf_isr(void)
{
   unsigned char i=0,j;
   TCNT1H=0xd1;
   TCNT1L=0x1f;

   PORTB.0=1;//OE inactive
   PORTD=0xff-numfont[hour/10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
   PORTD=0xff-numfont[hour/10][satr][1];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
  
   PORTD=0xff-numfont[hour%10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
   PORTD=0xff-numfont[hour%10][satr][1];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
  
   PORTD=0xff-numfont[10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;

   PORTD=0xff-numfont[minute/10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
   PORTD=0xff-numfont[minute/10][satr][1];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
  
   PORTD=0xff-numfont[minute%10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
   PORTD=0xff-numfont[minute%10][satr][1];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;

   PORTD=0xff-numfont[10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;

   PORTD=0xff-numfont[second/10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
   PORTD=0xff-numfont[second/10][satr][1];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;

   PORTD=0xff-numfont[second%10][satr][0];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
   PORTD=0xff-numfont[second%10][satr][1];
   PORTC=0x20|i;
   PORTC=PORTC|0x30;
   i++;
  
   PORTB.0=0;  
   PORTC=satr;
   satr++;
   if(satr==24)
      satr=0;

}

// Timer 2 overflow interrupt service routine
interrupt [TIM2_OVF] void timer2_ovf_isr(void)
{
   if(second==59)
   {
      second=0;
      if(minute==59)
      {
         minute=0;
         if(hour==23)
         {
            hour=0;
            if(weekday==6)
            {
               weekday=0;
            }
            else
               weekday++;
            if(monthyear<7 br="br">            {
               if(monthday==31)
               {
                  monthday=0;
                  monthyear++;
               }
               else
                  monthday++;
            }
            else
            {
               if(monthday==30)
               {
                  monthday=0;
                  if(monthyear==12)
                  {
                     monthyear=1;  
                     year++;
                  }
                  else
                     monthyear++;
               }
               else
                  monthday++;
            }
         }
         else
            hour++;
      }
      else
         minute++;
   }
   else
      second++;
//   tint2tstring();     
}

// Declare your global variables here
void main(void)
{
// Declare your local variables here

// Input/Output Ports initialization
// Port A initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTA=0x00;
DDRA=0xff;

// Port B initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTB=0x00;
DDRB=0x01;

// Port C initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTC=0x00;
DDRC=0xff;

// Port D initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTD=0x00;
DDRD=0xff;

// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
// Mode: Normal top=FFh
// OC0 output: Disconnected
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;

// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer 1 Stopped
// Mode: Normal top=FFFFh
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer 1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off

TCCR1A=0x00;
TCCR1B=0x81;
TCNT1H=0xa2;
TCNT1L=0x3f;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;

// Timer/Counter 2 initialization
// Clock source: TOSC1 pin
// Clock value: PCK2/128
// Mode: Normal top=FFh
// OC2 output: Disconnected
ASSR=0x08;
TCCR2=0x05;
TCNT2=0x00;
OCR2=0x00;

// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// INT2: Off
MCUCR=0x00;
MCUCSR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x44;

// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;

// Global enable interrupts
#asm("sei")

while (1);
}
Share:

Cara Kerja gerbang AND dengan Atmega 8535

Gerbang AND adalah suatu gerbang logika dasar yang mempunyai 2 input atau lebih dan mempunyai 1 output
Cara kerjanya : output akan berlogika "1" jika semua input berlogika "1"
Gerbang AND ibarat seperti saklar seri
Untuk mengetahui cara kerjanya, penulis kali ini akan mensimulasikan dengan program mikrokontroler  Atmega 8535, seperti di bawah ini

1. Gambar rangkaian


2. List Code : dengan Bascom AVR

$regfile = "m8535.dat"
$crystal = 4000000

Config Portb = Input
Config Portc = Output

Config Lcd = 20 * 4
Config Lcdpin = Pin , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7 , E = Porta.3 , Rs = Porta.2
Cursor Off

Ddrb = 0 : Portb = 255

Locate 1 , 1
Lcd "**** CARA KERJA ****"
Locate 2 , 1
Lcd "    GERBANG 'AND' "
Waitms 2

Portc = 8

Do

If Pinb.0 = 0 And Pinb.1 = 0 Then
Locate 3 , 1
Lcd "Input A = 1 , B = 1  "
Locate 4 , 1
Lcd "Output Q = 1         "
End If

If Pinb.0 = 0 And Pinb.1 = 1 Then
Locate 3 , 1
Lcd "Input A = 1 , B = 0  "
Locate 4 , 1
Lcd "Output Q = 0         "
End If

If Pinb.0 = 1 And Pinb.1 = 0 Then
Locate 3 , 1
Lcd "Input A = 0 , B = 1  "
Locate 4 , 1
Lcd "Output Q = 0         "
End If

If Pinb.0 = 1 And Pinb.1 = 1 Then
Locate 3 , 1
Lcd "Input A = 0 , B = 0  "
Locate 4 , 1
Lcd "Output Q = 0         "
End If
'========================================
If Pinb.0 = 0 And Pinb.1 = 0 Then
Portc = 1
End If
If Pinb.0 = 0 And Pinb.1 = 1 Then
Portc = 0
End If
If Pinb.0 = 1 And Pinb.1 = 0 Then
Portc = 0
End If
If Pinb.0 = 1 And Pinb.1 = 1 Then
Portc = 0
End If
Loop

Semoga bermanfaat
Share:

Jadwal Waktu Sholat

TIME WIB

TV EDUKASI LIVE

Popular Posts

Recent Posts

Pages