Get
6 Free Virtual Board Layouts & Code Examples With Virdes 52™ |
Get
started straight away with 6 ready to use Virtual Board Layouts.
You also get at least one free code example project with each of
our Virtual Board layouts. Similar projects exist in both C and
Assembly format to demonstrate equivalent functionality. Each code
example demonstrates features of the 8051/8052 microcontroller so
you can quickly build up an understanding of the microcontroller
architecture. Click here to download our 'Get Started Guide' and
see the great features of our IDE & how quickly you can open our
projects and begin to Compile, Build and Debug projects. In all
cases you can edit these example projects or write your own code
around these layouts. Note:
Virdes 52™ should be used with Windows XP Only |
Simple
Blink Layout
This layout consists of our virtual 8052 microcontroller
and a LED connected to port 3 (P3). The example Blink Project
flashes the LED on the Simple Blink Layout at a specified rate,
which is defined by the delay in the program. It introduces how
to define a bit define to a bit on an SFR (namely bit 4 of P3).
This bit is complemented (xor'd), therefore changes the value of
bit and then the LED changes accordingly. |
 |
Blink & Switch Layout
An 8052 microcontroller device is connected
to an external I/O button through pin P3.2 (which is external
interrupt 0 on the 8052) and an external LED through pin P3.4.
For the projects where an internal interrupt is required, simply
left click the I/O button in the layout with your mouse to trigger
the interrupt. To turn on the LED write '1' (high) to P3.4 and
'0' (low) to turn off the LED. This is similar to Blink project
but the LED is controlled by button connected to external interrupt
0 pin on the microcontroller. Once the button is pressed on layout
the LED changes (on/off). Set simulator cycles to 5000 to make
the interrupt more sensitive to button press'. The example LED
Control Project introduces Interrupt Service Routines
(ISRs). All interrupts have a different vector address and in
this case the external interrupt vector (handler) is at 03h.
The other example Timer Project
introduces timers. It uses Timer 0 to change the LED value. The
external interrupt 0 (INT0) is used to switch the Timer on and
off. There are two interrupts used in this project. The other
interrupt is the Timer0 interrupt.
|
 |
P0
Count Layout
In this layout each of the port 0 pins of
the virtual 8052 are connected to a separate LED. Setting a pin
(any port 0 pin) high enables the LED and low to turn off the LED.
This layout demonstrates the use of Port Input/Output pins. The
example LED Display (LED Count) Project performs
a binary count on connected LEDs to Port 0. LED on indicates a one
and LED off indicates a zero. When the LED count reaches 0b11111111
(maximum 8bit value) the program pauses for period before restarting
the count again from zero. Run this program and watch the LEDs displaying
a binary count. Vary the delays in the program to view LED display
at different speeds.This project demonstrates how to access Port
registers connected to some real device. LEDs in this case. |
 |
Num
Display Layout
The virtual 8052 device is connected to a
numerical keypad, through lower nibble (4 bits) of Port 1 and lower
nibble of Port 2. And four Seven-Segment Displays are connected
to Port 0 in parallel. The relevant or all four Seven-Segment Displays
can be selected through the upper nibble of Port 2 (select lines
for each seven-segment display).Then a numeric value entered on
the keypad can be displayed on any of the 4 seven-segment displays.
The example Number Display Project reacts to a
keypad press (a digit) on the layout and displays the corresponding
digit on a chosen seven-segment display attached. There are four
seven-segments attached and the program writes to each of them from
left to right.Run this example and watch the Seven-Segments being
updated following your key press' on the keypad. This program checks
that each sequential input from the keypad is different. |
 |
A
to D (Analog to Digital) Layout
In this layout a virtual signal generator
is connected to ADC channel 0 on microcontroller. The same signal
is inputted into channel 1 of a virtual oscilloscope. The microcontroller
DAC output is connected to channel 2 on the oscilloscope. Here you
can use our interactive Signal Generator & Oscilloscope windows
to monitor and adjust the microcontroller input & output. The
example D to A Generate Project uses the attached
virtual oscilloscope in the layout to monitor the DAC channel from
the 8052. The on-chip DAC uses a 12-bit value to generate the signal,
by using DACL and DACH SFRs. Both the signal generator and oscilloscope
are used in the alternative Analog to Digital Sampling (ADCSineInvert)
Project. This project samples the inputted sine signal
using ADC channel 1 and then inverts this value and outputs it on
the DAC channel. |
 |
Terminal Layout
The TXD (Transmit Data) and RXD (Receive
Data) lines of the Uart (serial) in the virtual 8052 are connected
to a Serial Interface keyboard and PC Terminal Window respectively.The
same pins are also connected to the virtual oscilloscope for the
purpose of viewing transmit and receive patterns. The RXD is connected
to channel 1 and TXD connected to channel 2. Using the example
Serial Comms Project, type characters on the
PC Terminal Window and they will be recorded and displayed on
the serial port again. Therefore everything that is inputted is
repeated back to the user. Note that the Baud can be changed on
this window.
Memory Addressing Project
This project does not require any layout because it involves manipulating
different memory areas. Also we do not choose any chip in Project
Settings, since we are not using any of the chip's features, only
addressing memory areas. Follow the inline comments in source
to see memory areas being addressed. Use the breakpoint at start
of code and then step through the source and see line by line
changes in memory and register views. Open 'All Symbols' list
to locate variables and validate their addresses in memory.
Download Virdes 52 Now
For Free!
|
 |