Useful Application Notes from
XuMicro, USA |
- This website provides some Simple yet Important Solutions for Computer/Electronics Users
- More material will be added constantly when available
Using PC Serial Port to light up LED
- Just as for USB port, the COM1-COM4 serial port can also light up LED. The only diffrence is it needs appropriate software for Windows XP/2K/NT PCs.
- Now you can download the file PWON.BIN, change its extension to PWON.EXE, then run it on your PC with the circuit shown, the LED will light up.
- To make this experiment easier, use DB9 cable with 2 ends being female connectors (or use Gender Changer connector), and use #22 or #24 AWG solid hookup wires, such that the connections are colse to the breadboard.
CMOS IC Works from 1.5V
- This simple circuit shows what 1.5V power suply can do for us, and the virtue of CMOS over TTL.
- It contains only 6 components: a CMOS Hex Inverter IC with Schmitt Trigger built-in, an LED, two capacitors and two resistors.
- While TTL IC can't work on voltage as low as 1.5V, CMOS IC can. The circuit doesn't work for any 7414 ICs, it only works for CMOS 7414 ICs.
- The first inverter is connected as an RC Oscillator. The second inverter works as a buffer stage to drive the LED. Experiment shows the LED blinks at 46 times per minute, that's frequency f=0.77 Hz.
Very High Constancy Current Source
- We know that usig bipolar transidtor such as 2N2222, or JFET such as 2N5555, can generate a fairly constant current. But the constancy is not very well when the supply voltage changes. Using the OpAmp and MOSFET circuit shown, you can get a very high constancy current source.
- For example, in order to drive an LED or white LED at 10 mA, the circuit shown works very well. Measurement shows that when the supply voltage Vcc changes from 5V to 24V, the current ramains at 10.12 mA. That means the circuit has a four-digit-invariance. A superb performance!
440.0 Hz Standard Music Tone Generator
- Unless you are a "perfect pitch" person (but even great musicians don't have such capability if they were not trained for pitch recognition during thier childhood), you usually need a standard music tone, such as a fine-tuned piano's A key (440.0 Hz) or a tuning fork.
- This circuit is a substitution for the tuning fork. It generates a music tone with frequency of 440.0 Hz. The 1.000000 MHz crystal guarantees that it has four-digit-invariance precision.
- For detailed information on how to build it, please refer to 440.0 Hz Standard Music Tone Generator
- Download the binary Tone File for programming the ATtiny11 (using the AVRHVP-1 Programmer).
Happy Birthday Song on a Chip
- This one-hour project is the ideal gift to celebrate your love one's or yourself's birthday. It has both sound and light effects.
- You can build it on a breadboard, or you can order the business-card-size PCBoard from us ($3 each); you can also order the programmed ATtiny11 ($1 each, together with the $3 PCBoard, can be sent on a self-stamped-self-addressed envelope for free shipping).
- For detailed information on how to compose the song please refer to Chip Music Composing
- Download the binary Song File for programming the ATtiny11 (using the AVRHVP-1 Programmer).
American National Anthem on a Chip
- Celebrating Independence Day with the Star-Spangled Banner song on a chip !
- Several different types of MCU song files in Binary or Hex formats are available to be downloaded as listed below.
- Download the Anthem binary code for ATtiny11 ANTN11A.BIN and program the chip with AVRHVP-1 programmer.
The correct demo circuit connection schematic can be
found here.
- Download the Anthem binary code for AT89C2051/4051 AN2051.BIN and program the chip with an XS51 programmer.
The correct demo circuit connection schematic can be
found here.
- Download the Anthem Hex code for AT89S1200 MCU AN1200.HEX and program the chip with a WWLHTP-1 or WWLHTP-2 Wall-Wart-less AVR HyperTerm programmer.
The correct demo circuit connection schematic can be
found here.
- Last but not least, let's hear a piano version of the Star-Spangled Banner.
It's worth to notice that, thanks to the great power of Java Applet, here we don't need to use Windows MediaPlayer, instead we just apply our simple Java programming skill, and achieve the same sound quality.
To invoke the Java Applet to play the Star-Spangled Banner, just
click here.
Digital Flashlight Design Experiment
- With the advent of white LEDs, the traditional incandescent bulb flashlight is experiencing radical changes.
- Using this experiment's results, you can build 5-10 white LED flashlight
- For detailed information please refer to Digital Flashlight Design Experiment
Create a Software Serial Port for AVR Microcontroller
- While the ATtiny11 is one of the most inexpensive 8-bit MCU (only 52 cents each or $38/100), it doesn't have a serial port. That limits its capability.
- However, we can use the Bit-Banging algoritm to create a software serial port for it.
- To view the complete source code for this Bit-Banging, refer to the attached web document:UARTAVR.htm
Create a Software Serial Port for 8051 MCU
- The 8051 is a very popular 8-bit Microcontroller and it has evolved to many derivatives.
- We can create a software serial port for any 8051-like MCU, such as the Atmel's 20-pin AT89C1051.
- For detailed software program information please refer to the attached Assembly Language Source Code.
- You can use the XS51 programmer to "burn" this code into AT89C1051, then perform the demo by running the Windows HyperTerminal program.
Create a Software Serial Port for PIC Microcontroller
- PIC16F84 or PIC16C84 are very popular MCUs from Microchip, however both don't have a serial port built-in.
- We can use the Bit-Banging algorithm to create a software serial port for each.
- You can use the PIC programmer to "burn" this code into PIC16F84/16C84, then perform the demo by running the Windows HyperTerminal program.
- To view the complete source code, refer to the attached web documentAssembly Language Source Code
Build a hand-made Adapter for AV-3/AV-4 Programmer
- The principle is very simple: because all these AVR MCUs have internal 1 MHz oscillator built-in, we don't need to worry about it. Only six wires are needed to put them in programming mode: Vcc, GND, RESET, SCK, MISO, and MOSI. The following is an example to make a 28-pin adapter for ATmega8/48; for the 40-pin adapter for ATmega16/164P, you can follow the same principle to hook up the six wires onto the 40-pin socket by looking on their pinout diagrams.
- Materials: one high-profile 20-pin Wire-wrap socket, one low-profile 28-pin solder-tail socket, two pieces of perforated boards to let the socket insert thru it(each is a little bigger than the corresponding socket), six pieces of cut-short(about 10 cm) wire-wrap wires(#30 AWG) for Vcc, GND, RESET, SCK, MISO, MOSI respectively, preferably with different colors. And two aluminum male-female threaded hex standoffs (.5" length), two hex nuts(4-40), and two slotted pan head machine screws(4-40) to hold and fix the two sockets in two different layers. The bottom layer will be inserted into the programmer's ZIF socket, while the top layer is used to insert the MCU to be programmed.
- Use wire-wrap tool to wrap one end of each wire to Vcc, GND ... pins on the 20-pin socket, then insert it thru a perfboard, solder and fix each pin. Then insert the 28-pin socket thru the larger piece perfboard, solder other end of Vcc wire to the 28-pin socket's Vcc pin(#7), solder other end of GND wire to the 28-pin socket's GND pin(#8), etc. Until all six wires soldered up.
- At last, use the two standoffs to hold two layers together firmly and use nuts and screws to fasten them in place. Note: remember to leave enough space for the ZIF socket's handle to move freely when designing the perfboard size.
The realized Adapter photo can be seen here.
XuMicro, USA. P.O.Box 14681, Houston, TX 77021, USA |
For the required MCU device programmers used in firmware programming, please visit my website:
http://www.oocities.org/xumicro
Email: xumicro@yahoo.com
Copyright © 2007, XuMicro, USA. All rights reserved.