Silicon ChipPICAXE VSM: It’s Time to Play; Pt.3 - March 2008 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: High-definition TV in limbo until the Olympics
  4. Feature: How To Get Into Digital TV by Alan Hughes
  5. Review: Tevion TEV8200 HD Set-Top Box by Leo Simpson
  6. Feature: How To Solder Surface Mount Devices by Jim Rowe
  7. Project: 12V-24V High-Current DC Motor Speed Controller, Pt.1 by Mauro Grassi
  8. Feature: PICAXE VSM: It’s Time to Play; Pt.3 by Clive Seager
  9. Project: A Digital VFO with LCD Graphics Display by Andrew Woodfield, ZL2PD
  10. Feature: The I²C Bus: A Quick Primer by Jim Rowe
  11. Project: A Low-Cost PC-to-I²C Interface For Debugging by Jim Rowe
  12. Feature: Electric Flight by Ross Tester
  13. Vintage Radio: The batteries used to power vintage radios by Rodney Champness
  14. Project: One-Pulse-Per Second Driver For Quartz Clocks by Jim Rowe
  15. Book Store
  16. Advertising Index
  17. Order Form

This is only a preview of the March 2008 issue of Silicon Chip.

You can view 32 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • How To Get Into Digital TV (March 2008)
  • How To Get Into Digital TV (March 2008)
  • How To Get Into Digital TV, Pt.2 (April 2008)
  • How To Get Into Digital TV, Pt.2 (April 2008)
Items relevant to "12V-24V High-Current DC Motor Speed Controller, Pt.1":
  • PIC16F88-I/P programmed for the DC Motor Speed Controller [0910308A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the 12-24V High Current Motor Speed Controller [0910308A.HEX] (Software, Free)
  • 12-24V High-Current Motor Speed Controller main PCB pattern (PDF download) [09103081] (Free)
  • 12-24V High-Current Motor Speed Controller display PCB pattern (PDF download) [09103082] (Free)
Articles in this series:
  • 12V-24V High-Current DC Motor Speed Controller, Pt.1 (March 2008)
  • 12V-24V High-Current DC Motor Speed Controller, Pt.1 (March 2008)
  • 12V-24V High-Current DC Motor Speed Controller, Pt.2 (April 2008)
  • 12V-24V High-Current DC Motor Speed Controller, Pt.2 (April 2008)
Articles in this series:
  • PICAXE VSM: The PICAXE Circuit Simulator! (January 2008)
  • PICAXE VSM: The PICAXE Circuit Simulator! (January 2008)
  • PICAXE VSM: The PICAXE Circuit Simulator, Pt.2 (February 2008)
  • PICAXE VSM: The PICAXE Circuit Simulator, Pt.2 (February 2008)
  • PICAXE VSM: It’s Time to Play; Pt.3 (March 2008)
  • PICAXE VSM: It’s Time to Play; Pt.3 (March 2008)
Items relevant to "A Digital VFO with LCD Graphics Display":
  • AT89C4051 firmware and source code for the Digital VFO with LCD Graphics Display [DDSFINAL.HEX] (Software, Free)
  • DDS VFO PCB pattern (PDF download) [06103082] (Free)
  • DDS VFO front panel artwork (PDF download) (Free)
Items relevant to "A Low-Cost PC-to-I²C Interface For Debugging":
  • Philips Universal Register Debugger software for the Low-Cost PC-to-I²C Debugging Interface (Free)
  • Low-Cost PC-to-I²C Interface for Debugging PCB pattern (PDF download) [04203081] (Free)
Items relevant to "One-Pulse-Per Second Driver For Quartz Clocks":
  • One Pulse Per Second Driver for Quartz Clocks PCB [04103081] (AUD $2.50)
  • 1pps Quartz Clock Driver PCB pattern (PDF download) [04103081] (Free)

Purchase a printed copy of this issue for $10.00.

PICAXE VSM: It’s Time to PLAY! In the third part of our PICAXE VSM tutorials Clive Seager talks us through using some of the ‘virtual instrumentation’ included with the software – from a simple voltmeter to an advanced I2C protocol debugger! A fter you have designed a circuit using PICAXE VSM, you will naturally want to test it! Fortunately VSM has a wide range of ‘virtual instruments’ available for testing purposes. This article assumes you have worked through the tutorials in parts 1 and 2 of this series, so are familiar with drawing circuits in the VSM software. Voltmeter and Ammeter Voltage and current can be measured in two separate ways. As an example, open the ‘high command.dsn’ sample file from the /samples/picaxe/commands folder. You will then need to use the ‘File>Save As’ menu to save with a different filename so you can experiment and save modifications to it. Fig.1 shows the circuit with a traditional voltmeter connected across the LED. When run, the voltmeter will show the voltage when the LED switches on and off. An ammeter can be added by deleting the wire between the resistor and PICAXE pin. Right click and select Place>Virtual Instrument>DC Ammeter. Once dropped, right click on the ammeter symbol and edit the properties ‘Display Range’ from amps to milliamps. Then draw the Fig.2: virtual ammeter added to the circuit. Remember to change to mA range! two wires back in as shown in Fig.2. When run you will now have a display of both current and voltage. If you change any of the other component properties – eg, (changing the ‘Forward Voltage’ of the LED from 2V to 2.5V or the resistor from 330W to 270W) you will see corresponding changes in the current. The second, slightly simpler way of measuring voltage and current is to just add probes onto any component pin or wire. To do this, right click, select place and then either the voltage or current probes (see Fig.3). Once the simulation is run, the probes will show the current or voltage at the probe position. Oscilloscope Fig.1: simple LED circuit with voltmeter attached. 46  Silicon Chip On occasions you may wish to trace the voltage or a signal over a period of time. This is when the virtual oscilloscope is of use Open the ‘infrain.command dsn’ sample file and re-save with a different filename. This uses a ‘simulated’ IR LED and IR receiver (eg, equivalent to the TSOP4840). Two siliconchip.com.au Fig.3: right-click the mouse to add voltage and current probes. Fig:6: serial terminal demonstration. channels of the oscilloscope are connected across the LED output and the receiver output. When run, the oscilloscope display panel will appear on screen, showing the trace from the two channels. As can be seen from Fig.5 the top LED trace clearly shows the modulating signal, while the receiver trace shows the demodulated inverted output! The virtual oscilloscope includes all controls that you would expect to find on a real device, and so the position, timebase etc can all be adjusted as you require. Serial Terminal This time take a look at the ‘sertxd command.dsn’ sample file. This demonstrates the ‘Virtual Terminal’ which acts as an RS232 serial terminal for testing programs with serial data. When run, the serial data output from the PICAXE chip is displayed on screen within the terminal window. As with all serial systems, you do need to set the baud rate and polarity of the terminal to match the PICAXE settings (4800,n,8,1 [inverted polarity] in this case). This is carried out by right-clicking on the terminal symbol and selecting ‘Edit Properties’. COMPIM While we are talking about serial communication it is also worth mentioning the COMPIM (COM Physical Interface Model). This ‘symbol’ acts as a link between the Fig.4: two PICAXE chips communicating via a simulated infrared link. Fig.5: virtual oscilloscope trace. siliconchip.com.au Fig.7: remember to set the serial baud rate and other parameters, or you will see corrupt characters on screen! March 2008  47 simulator and the real serial port of the computer. This, amazingly, allows connection of real serial devices to a simulated PICAXE chip! As an example you could connect a serial GPS module to the serial port of the computer and then have the simulated PICAXE chip parse the NMEA serial data stream! The ‘COMPIM demo.dsn’ file demonstrates the COMPIM feature. Signal Generator The Signal Generator is demonstrated via the ‘count command.dsn’ file. When this simulation is run the Signal Generator control panel is displayed on screen. First make sure the generator is outputting a square wave (sawtooth, triangular and sine are also available) of around 5V and then try adjusting the frequency. The change in frequency should result in a different ‘count command’ value displayed on the serial terminal. An alternate, simpler, way of applying test signals to a wire is to just drop a generator probe onto the wire (as Fig.10: I2C debugger analysing data written to a 24LC16B EEPROM but fortunately the technicalities of the protocols are taken care of automatically in the PICAXE system, via use, as an example, of the writei2c and readi2c commands. Those interested in studying these protocols further may be interested in the function of the I2C and spi debugger instruments. For instance, the writei2c command.dsn’ file demonstrates how the ‘I2C debugger’ instrument is connected to the I2C bus. When the simulation is run the details of each I2C transaction – start signal (S), address (AO), data pulses, ack pulses (A), nack pulses (N), stop signals (P) etc – are clearly listed in sequence on screen. This makes it an in- Fig.8: demonstration of the COMPIM feature. with the voltage and current probes). This is carried out by right-clicking and selecting Place>Generator. SPI and I2C debuggers SPI and I2C are two different communication protocols used to link ICs together. The protocols are quite complex Fig.11: I2C debugger trace. This shows the time, and type, of all activity on the I2C bus valuable learning tool for those interested in understanding these protocols. Summary Fig.9: virtual signal generator. 48  Silicon Chip The software also contains a few other instruments such as a logic analyser – have a play with them! Using ‘virtual simulated’ instruments will never be quite the same experience as twiddling dials on real-life bench-top models but using these simulations is still a worthwhile process. PICAXE VSM incorporates an impressive array of virtual instruments – and you certainly wouldn’t be able to buy a new oscilloscope, signal generator or I2C debugger for anything like the price of a VSM licence! SC siliconchip.com.au