Sie sind auf Seite 1von 24

hafriz.fikrie@gmail.

com

4.0 CIRCUIT SIMULATION
Design PICs circuit and simulate using simulation software,
write the program source code and build (assemble) the
program and attach the resulting machine code to the
MCU. Hardware testing.
EC501 EMBEDDED SYSTEM
APPLICATIONS
Pg 1
4.1.1 Describe the function of main editing window and mode toolbar.
4.1.2 Demonstrate picking devices from the library
4.1.3 Explain the MCU properties.
4.1.4 List all basic components for PICs circuit.
4.1.5 Drawing the schematic using simulation software.
4.1.6 Write the program source code and attach the resulting machine
code to the MCU.
4.1 Know simulation environment in simulation
software.
Pg 2
4.1 Know simulation environment in simulation
software.
Pg 3
Pspice
-Cct analysis
National Instrument
Multisim & Ultiboard 10
-Limited micro-u,
only PIC16F84A
-Limited animation
Livewire
&
PCB wizard
-Limited animation
-no micro-u
4.1 Know simulation environment in simulation
software.
Melukis dan mereka-bentuk
litar/skematik.
Animasi litar. Analog, digital,
graf generator, virtual
instrument dll.




Membina prototaip PCB
3D-view
4.1.1 Describe the function of main editing window and mode toolbar.
4.1 Know simulation environment in simulation
software.
Pg 5
2 component
toolbar, virtual
instrument, draw
etc
3 object pick/selector
1 edit toolbar,design toolbar etc
4 Editing Windows
4.1.1 Describe the function of main editing window and mode toolbar.
4.1 Know simulation environment in simulation
software.
Pg 6
New, open, save, print..etc
Toggle grid, zoom in, zoom out, zoom to area..etc
Block copy, block move, block rotate..etc
Toggle wire, add sheet, netlist to Ares..etc
Animation, step animation, pause & stop
Pop-up message
4.1.1 Describe the function of main editing window and mode toolbar.
4.1 Know simulation environment in simulation
software.
Pg 7
Cursor
Component mode
Junction dot mode
Buses mode
Text script mode
Wire label
Subcircuit Mode
Terminal Mode
Graph Mode
Devices pin modes
Tape Recorder mode
Generator Mode
Virtual instrument mode
Current probe
Voltage Probe
2D graphics mode
4.1.1 Describe the function of main editing window and mode toolbar.
4.1 Know simulation environment in simulation
software.
Pg 8
4.1.2 Demonstrate picking devices from the library
4.1 Know simulation environment in simulation
software.
Rotate component, flip
Before put under draw
area
Overview Windows
Pick component
Klik icon
Sebelum klik P
Object Selector
4.1.3 Explain the MCU properties.
4.1 Know simulation environment in simulation
software.
Pg 10
Refer datasheet pic18f458
4.1.4 List all basic components for PICs circuit.
4.1 Know simulation environment in simulation
software.
Pg 11
4.1.4 List all basic components for PICs circuit.
4.1 Know simulation environment in simulation
software.
Pg 12
4.1.4 List all basic components for PICs circuit.
4.1 Know simulation environment in simulation
software.
Pg 13
4.1.4 List all basic components for PICs circuit.
4.1 Know simulation environment in simulation
software.
Pg 14
4.1.4 List all basic components for PICs circuit.
4.1 Know simulation environment in simulation
software.
Pg 15
4.1.5 Drawing the schematic using simulation software.
4.1 Know simulation environment in simulation
software.
Pg 16
4.1.6 Write the program source code and attach the resulting machine
code to the MCU.
4.1 Know simulation environment in simulation
software.
Pg 17
LIST P=18F458
#INCLUDE <P18F458.INC>
CONFIG WDT=OFF ; Disable watchdog timer
CONFIG LVP=OFF ; Low-Voltage programming
; disabled (necessary for debugging)
Reg1 EQU 0x300 ; Create temporary storage for delay
Reg2 EQU 0x301
ORG 0x00
CLRF TRISD ;W-->TRISD
CLRF PORTD ;PORTD=0x00
Start INCF LATD,F
CALL Delay
GOTO Start
Delay MOVLW D'200' ; Delay for 250ms
MOVWF Reg1 ; for 10MHz crystal
D1 MOVLW D'250'
MOVWF Reg2
D2 NOP
NOP
DECF Reg2
BNZ D2
DECF Reg1
BNZ D1
RETURN
END
4.2.1 Demonstrate running the simulation.

4.2 Understand the method to test the design using
software simulation software.
Pg 18
4.2.2 Demonstrate how to display source code debug window.

4.2 Understand the method to test the design using
software simulation software.
Pg 19
1. Pause the simulation.
2. Right click on the uController
3. Select PIC18 CPU
4.2.3 Demonstrate how to used virtual instrument to measure circuit
performance.
a. Voltmeter and ammeter
b. Oscilloscope

4.2 Understand the method to test the design using
software simulation software.
Pg 20
4.2.3 Demonstrate how to used virtual instrument to measure circuit
performance.
a. Voltmeter and ammeter
b. Oscilloscope

4.2 Understand the method to test the design using
software simulation software.
Pg 21
4.2.3 Demonstrate how to used virtual instrument to measure circuit
performance.
a. Voltmeter and ammeter
b. Oscilloscope

4.2 Understand the method to test the design using
software simulation software.
Pg 22
1. Create a system that count a number start from 0-5 and than buzzer
on and off.
2. Develop a system that sense an input from the push button (active
low) and the LED will blink for 3 times. (used input at PORTB and
output also in PORTB)
3. Build a system that detect an input from push button (active high) and
LED in PORTC will rotate left and right several times.

Exercise..
Pg 23
hafriz.fikrie@gmail.com

Pg 24
Thank you..