|
| |
Simple Signal Generator
|
1/7 |
| |
A signal generator can be a handy tool to have on the bench. This signal generator will generate a square wave from 10 Hz to 10 KHz with a duty cycle of 1% - 99%, and is controlled by a PC.
A quick & dirty version was presented here. I developed it for simulating the output of the TLS-230 light sensor chip in the irradiance meter and recently used it to try out a piezo buzzer at different frequencies.
The recent use revealed how useful a signal generator is on the bench so some rework was done to package the signal generator in an enclosure and to create a PC application to control the frequency and duty cycle.
Source files may be found on the downloads page.
The Hardware
The TAP-28 board with a minimum of components has a PIC18F2520 to generate the square wave. Direct connections were made for the output signal from port C2 to a BNC connector and an ICSP header was included. A push button switch was included as required by the original version of the firmware but it is no longer required or used with the revised firmware. A PIC18F2520 was used as the string-handling routines of Swordfish Basic require considerable variable space - at least 900 bytes are required.
The enclosure is not critical but I used a recent ebay find. The small aluminum enclosure has slots that coincidentally allow the TAP-28 board to slide right in. The enclosure is sold by China Quality Goods on ebay, type DIY 1066.
There are several choices for the USB - TTL-serial adapter. The cable used here uses the Prolific PL2303 chipset. The interface acts as a standard serial comm port on the PC. Other options are available and will work equally well as long as it's a TTL-level and not an RS-232-level interface. A TTL-RS-232 adapter may be used if the controlling PC has an RS-232 port.
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
|