The personal website of Scott W Harden
December 10th, 2009

HF CW on the Cheap

This is a project I intend to work on over Christmas break. I'm wondering if I can make a simple HF transceiver capable of working any HF band by driving a Pixie II CW transceiver with a SI 570 digital programmable oscillator.

Here's what my pixie II sounds like on 80m.mp3 and 40m.mp3 with a strong antenna.

Preliminary work demonstrates a functional receiver powered by a crystal. I don't think the currently-configured digital oscillator is putting out enough power to run the circuit, but it'll take more time to get that up and running. For now, here are some photos of what I've got working and real sound clips of the thing are below. I'm happy with the case I built it in (thanks Ron!), and happy with my level drilling of the holes for power, output, and the CW key!

Briefly, the device is powered by a 9V battery. It's hooked up to an 80m dipole antenna. Output is fed into a computer sound card for amplification / PSK31 analysis.

The internals reveal that it's a simple circuit powered by a single crystal. More crystals are tucked in the case, stuck in foam, for easy transport.

Decoding of PSK31 is happening here, using output from my circuit with the 40m crystal in it.

Markdown source code last modified on January 18th, 2021
---
title: HF CW on the Cheap
date: 2009-12-10 23:44:15
tags: amateur radio, circuit, old
---

# HF CW on the Cheap

__This is a project I intend to work on over Christmas break.__ I'm wondering if I can make a simple HF transceiver capable of working _any HF band_ by driving a [Pixie II CW transceiver](http://www.indianapolis.net/QRPp-I/elmer001/pixie2-schematic.gif) with a [SI 570 digital programmable oscillator](http://www.rfsystem.it/shop/images/si570_view.jpg).

Here's what my pixie II sounds like on [80m.mp3](http://www.SWHarden.com/blog/images/80m.mp3) and [40m.mp3](http://www.SWHarden.com/blog/images/40m.mp3) with a strong antenna.

<div class="text-center img-border">

[![](cw_everything_thumb.jpg)](cw_everything.jpg)
[![](cw_coke_thumb.jpg)](cw_coke.jpg)
[![](cw_close_thumb.jpg)](cw_close.jpg)
[![](cw_open2_thumb.jpg)](cw_open2.jpg)
[![](40mPSK_thumb.jpg)](40mPSK.png)

</div>

__Preliminary work demonstrates a functional receiver__ powered by a crystal. I don't think the currently-configured digital oscillator is putting out enough power to run the circuit, but it'll take more time to get that up and running. For now, here are some photos of what I've got working and real sound clips of the thing are below. I'm happy with the case I built it in (thanks Ron!), and happy with my level drilling of the holes for power, output, and the CW key!

__Briefly, the device__ is powered by a 9V battery. It's hooked up to an 80m dipole antenna. Output is fed into a computer sound card for amplification / PSK31 analysis.

__The internals__ reveal that it's a simple circuit powered by a single crystal. More crystals are tucked in the case, stuck in foam, for easy transport.

__Decoding of PSK31__ is happening here, using output from my circuit with the 40m crystal in it.
June 4th, 2009

Prime Prototype Construction

Now that I've worked-out the software side of the microcontroller-powered prime number generator, it's time to start working on the hardware. I want to make a prototype which is far smaller and simpler than the final version but lets me practice driving lots of LEDs (30). I expect the final version to have around 80. Also, the heart of this project is an ATTiny2313 microcontroller, and for the full version I'd like to use an ATMEega8. I picked up an unfinished wooden box with a magnetic latch from Michaels. It's delicate and tends to chip when you drill it, but moving slowly I'm able to make nice evenly-spaced holes.

This is the circuit concept. The chip is an ATTiny2313, sourced with 5V, where the left pins control the columns (by providing current) and the right pins control the rows (by providing ground). The "holes" at the top of the circuit represent where I hook up my PC and external power for testing purposes.

Thoughts from Future Scott (10 years later, August, 2019)

A+ for enthusiasm and construction but your design is... just no!

Why are you using an external crystal?

The schematic for the crystal is wrong: those capacitors should be to ground not in series!

You made the circuit diagram in InkScape!

You shouldn't drive current directly out of the microcontroller pins.

The majority of the microcontroller CPU cycles will go into managing multiplexing of the display (not calculating primes).

After a little more work I have a functional device and it looks better than I expected. There are a few more features I want to add, and I want to work on the code some more, but I hope to be done tomorrow. The coolest part is that I've included an internal button which drives a pause/resume and speed-controller menu based upon the length of button presses! There's a lot of awesome stuff I want to write, but once again, I'll save it for the completed project page.

I rendered the cover sticker wrong and all the LEDs are mislabled. The first LED should be 2^0 (1), and the second should be 2^1 (2), etc. Also, 2^22 and 2^23 are mislabeled - oops! But the thing really does generate, differentiate, and display [only[ prime numbers. Once again, videos (including demonstration of the menus and the programming options) and source code will be posted soon.

Markdown source code last modified on January 18th, 2021
---
title: Prime Prototype Construction
date: 2009-06-04 12:46:18
tags: circuit, microcontroller
---

# Prime Prototype Construction

__Now that I've worked-out the software side of the microcontroller-powered prime number generator, it's time to start working on the hardware.__ I want to make a prototype which is far smaller and simpler than the final version but lets me practice driving lots of LEDs (30). I expect the final version to have around 80. Also, the heart of this project is an ATTiny2313 microcontroller, and for the full version I'd like to use an ATMEega8. I picked up an unfinished wooden box with a magnetic latch from Michaels. It's delicate and tends to chip when you drill it, but moving slowly I'm able to make nice evenly-spaced holes.

<div class="img-border img-micro">

[![](img_2028_thumb.jpg)](img_2028.jpg)
[![](img_2041_thumb.jpg)](img_2041.jpg)
[![](img_2043_thumb.jpg)](img_2043.jpg)
[![](img_2047_thumb.jpg)](img_2047.jpg)
[![](img_2054_thumb.jpg)](img_2054.jpg)
[![](img_2056_thumb.jpg)](img_2056.jpg)
[![](img_2057_thumb.jpg)](img_2057.jpg)
[![](img_2058_thumb.jpg)](img_2058.jpg)
[![](img_2062_thumb.jpg)](img_2062.jpg)
[![](img_2025_thumb.jpg)](img_2025.jpg)

</div>

__This is the circuit concept. __The chip is an ATTiny2313, sourced with 5V, where the left pins control the columns (by providing current) and the right pins control the rows (by providing ground). The "holes" at the top of the circuit represent where I hook up my PC and external power for testing purposes.

<div class="text-center">

[![](prime-number-broken-circuit_thumb.jpg)](prime-number-broken-circuit.png)

</div>

<blockquote class="wp-block-quote"><p><strong>Thoughts from Future Scott (10 years later, August, 2019)</strong></p><p>A+ for enthusiasm and construction but your design is... just no!</p><p>Why are you using an external crystal? </p><p>The schematic for the crystal is wrong: those capacitors should be to ground not in series!</p><p>You made the circuit diagram in InkScape!</p><p>You shouldn't drive current directly out of the microcontroller pins.</p><p>The majority of the microcontroller CPU cycles will go into managing multiplexing of the display (not calculating primes).</p></blockquote>

__After a little more work I have a functional device__ and it looks better than I expected. There are a few more features I want to add, and I want to work on the code some more, but I hope to be done tomorrow. The coolest part is that I've included an internal button which drives a pause/resume and speed-controller menu based upon the length of button presses! There's a lot of awesome stuff I want to write, but once again, I'll save it for the completed project page.

<div class="img-border img-micro">

[![](img_2066_thumb.jpg)](img_2066.jpg)
[![](img_2076_thumb.jpg)](img_2076.jpg)
[![](img_2085_thumb.jpg)](img_2085.jpg)
[![](img_2089_thumb.jpg)](img_2089.jpg)

</div>

__I rendered the cover sticker wrong and all the LEDs are mislabled.__ The first LED should be 2^0 (1), and the second should be 2^1 (2), etc. Also, 2^22 and 2^23 are mislabeled - oops! But the thing really does generate, differentiate, and display \[only\[ prime numbers. Once again, videos (including demonstration of the menus and the programming options) and source code will be posted soon.
May 27th, 2009

A Prime Idea

I'm completely drained of energy. I visited my wife's family in Tennessee last week. I left Thursday and came back Tuesday (yesterday). I drove a total of 2,180 miles. The drive to Humboldt, TN (the destination) and back is only 1,658 miles. That means that I drove over 520 miles over the 3 days while at my destination. That's about 174 miles a day. At 50 MPH average speed that's about 4 hours in the car. So, 13 hour drive (each way) to get there, then 4 hours in the car every day I was there. That's a lot of car time!

While speaking with my brother-in-law (who just got a BS in computer science with a minor in mathematics) I learned that a faculty member at the university challenged him to write a computer program which could find the N'th prime number (up to 10^15) for a graduate school project. I was fascinated by the idea project and the various techniques, and workarounds related to it. After working on the theory behind the software (which I tested in Python) for a few hours, I had the idea to attempt to perform a similar task at the microcontroller level.

Here's the project I want to begin: I want to build a microcontroller-powered prime number generator which displays results in binary. The binary-encoded output is similar to the binary clocks which are nothing new. My project will calculate prime numbers up to 2^25 (33,554,432) and display the results in binary using long strips of 20 LEDs. There will be 3 rows of LEDs. The middle row (red) will simply count from 0 to 2^25. Every time it gets to a new number, the bottom row (blue) counts from 0 to the square root of the middle row. For every number on the bottom row, the remainder (modulus) of the middle/bottom is calculated. If the remainder is 0, the middle (red) number is divisible by the bottom (blue) therefore it is not prime. If the bottom number gets all the way to the square root of the middle number, the middle number is assumed to be prime and it is copied to the top row (green). The top row displays the most recent number determined to be prime.

Technical details of the project further reveal its dual simplicity/complexity nature. I'll add some buttons/switches for extra features. For example, I want to be able to start the program at a number of my choosing rather than forcing it to start at 0. Also, I want to be able to adjust the speed at which it runs (I don't want the blue row to just flicker forever). The ATTiny2313 (my microcontroller of choice because I have a few extra of them) has 18 IO pins. If I get creative with my multiplexing techniques, I can probably run 81 LEDs from 18 pins (9 rows of 9 LEDs). I've specifically chosen against charlieplexing because I will be lighting many LEDs "simultaneously" and I think the degree of flicker would be far too great to satisfy my sensitive eyes, even though I could do it all with only 10 pins.

I've decided to transistorize the entire project to provide a greater and more constant current to the LEDs. I'll use a set of 9 transistors to set the row that gets power (when the microcontroller powers the base, the row gets power) and another set of 9 transistors to set the LEDs in each row that light up (when the microcontroller powers the base, the LED gets grounded and lights up). To have consistently-bright, non-flickering LEDs which don't dim as more LEDs illuminate, I will add a resistor to every LED. Maybe I can get creative and utilize 10-pin resistor networks (one for each row) immediately after the row-selecting transistor! That will save me so much time. (I just came up with that idea - just now!) Anyway, that's my project idea.

I'd love to make this project look nice. All of my other projects were housed in junky plastic or cardboard boxes (if they were housed at all!) and this is something I want to keep. I start dental school soon, and I've love to have a fancy-looking piece of artsy/geeky/electrical memorabilia so I'll never forget who I am, my roots, and my true interests. Plus, it will give me something groovy to stare at when I come home after a long day cleaning the teeth of manikins and wondering why I went to dental school [sigh].

Update (nextday): I've been toying over some various layouts for the LEDs. I most like the rectangle and hex-rectangle configurations, and am already working on assembly of the "mini" (prototype). Here are some random images of my thinking process.

Markdown source code last modified on January 18th, 2021
---
title: A Prime Idea
date: 2009-05-27 10:28:19
tags: old, circuit
---

# A Prime Idea

__I'm completely drained of energy.__ I visited my wife's family in Tennessee last week. I left Thursday and came back Tuesday (yesterday). I drove a total of 2,180 miles. The drive to Humboldt, TN (the destination) and back is only 1,658 miles. That means that I drove over 520 miles over the 3 days _while_ at my destination. That's about 174 miles a day. At 50 MPH average speed that's about 4 hours in the car. So, 13 hour drive (each way) to get there, then 4 hours in the car every day I was there. That's a lot of car time!

__While speaking with my brother-in-law__ (who just got a BS in computer science with a minor in mathematics) I learned that a faculty member at the university challenged him to write a computer program which could find the N'th prime number (up to 10^15) for a graduate school project. I was fascinated by the idea project and the various techniques, and workarounds related to it. After working on the theory behind the software (which I tested in Python) for a few hours, I had the idea to attempt to perform a similar task at the microcontroller level.

<div class="text-center">

[![](prime_binary_thumb.jpg)](prime_binary.png)

</div>

__Here's the project I want to begin:__ I want to build a microcontroller-powered prime number generator which displays results in binary. The binary-encoded output is similar to the [binary clocks](http://www.thinkgeek.com/interests/giftsforhim/59e0/) which are nothing new. My project will calculate prime numbers up to 2^25 (33,554,432) and display the results in binary using long strips of 20 LEDs. There will be 3 rows of LEDs. The middle row (red) will simply count from 0 to 2^25. Every time it gets to a new number, the bottom row (blue) counts from 0 to the square root of the middle row. For every number on the bottom row, the remainder (modulus) of the middle/bottom is calculated. If the remainder is 0, the middle (red) number is divisible by the bottom (blue) therefore it is not prime. If the bottom number gets all the way to the square root of the middle number, the middle number is assumed to be prime and it is copied to the top row (green). The top row displays the most recent number determined to be prime.

__Technical details of the project__ further reveal its dual simplicity/complexity nature. I'll add some buttons/switches for extra features. For example, I want to be able to start the program at a number of my choosing rather than forcing it to start at 0. Also, I want to be able to adjust the speed at which it runs (I don't want the blue row to just flicker forever). The ATTiny2313 (my microcontroller of choice because I have a few extra of them) has 18 IO pins. If I get creative with my [multiplexing techniques](http://en.wikipedia.org/wiki/Multiplexed_display), I can probably run 81 LEDs from 18 pins (9 rows of 9 LEDs). I've specifically chosen against [charlieplexing](http://en.wikipedia.org/wiki/Charlieplexing) because I will be lighting many LEDs "simultaneously" and I think the degree of flicker would be far too great to satisfy my sensitive eyes, even though I could do it all with only 10 pins.

__I've decided to transistorize__ the entire project to provide a greater and more constant current to the LEDs. I'll use a set of 9 transistors to set the row that gets power (when the microcontroller powers the base, the row gets power) and another set of 9 transistors to set the LEDs in each row that light up (when the microcontroller powers the base, the LED gets grounded and lights up). To have consistently-bright, non-flickering LEDs which don't dim as more LEDs illuminate, I will add a resistor to every LED. Maybe I can get creative and utilize [10-pin resistor networks](http://www.gino-midi.nl/Electr_pagina_afbeeldingen/!SIL10_9.jpg) (one for each row) immediately after the row-selecting transistor! That will save me so much time. (I just came up with that idea - just now!) Anyway, that's my project idea.

__I'd love to make this project look nice.__ All of my other projects were housed in junky plastic or cardboard boxes (if they were housed at all!) and this is something I want to keep. I start dental school soon, and I've love to have a fancy-looking piece of artsy/geeky/electrical memorabilia so I'll never forget who I am, my roots, and my true interests. Plus, it will give me something groovy to stare at when I come home after a long day cleaning the teeth of manikins and wondering why I went to dental school \[sigh\].

__Update (nextday):__ I've been toying over some various layouts for the LEDs. I most like the rectangle and hex-rectangle configurations, and am already working on assembly of the "mini" (prototype). Here are some random images of my thinking process.

<div class="text-center">

[![](prime_layout_2_thumb.jpg)](prime_layout_2.png)
[![](g12684_thumb.jpg)](g12684.png)
[![](rect7887_thumb.jpg)](rect7887.png)

</div>
May 14th, 2009

Simple Case AVR/PC Serial Communication via MAX232

I recently had the desire to be able to see data from an ATMEL AVR microcontroller (the ATTiny2313) for development and debugging purposes. I wanted an easy way to have my microcontroller talk to my PC (and vise versa) with a minimum number of parts. The easiest way to do this was to utilize the UART capabilities of the ATTiny2313 to talk to my PC through the serial port. One problem is that the ATTiny2313(as with most microcontrollers) puts out 5V for "high" (on) and 0V for "low" (off). The RS-232 standard (which PC serial ports use) required -15V for high and +15v for low! Obviously the microcontroller needs some help to achieve this. The easiest way was to use the MAX232 serial level converter which costs about 3 bucks at DigiKey. Note that it requires a few 10uF capacitors to function properly.

Here's a more general schematic:

I connected my ATTiny2313 to the MAX232 in a very standard way. (photo) MAX232 pins 13 and 14 go to the serial port, and the ATTiny2313 pins 2 and 3 go to the MAX232 pins 12 and 11 respectively. I will note that they used a oscillator value (3.6864MHz) different than mine (9.216MHz).

Determining the speed of serial communication is important. This is dependent on your oscillator frequency! I said I used a 9.216Mhz oscillator. First, a crystal or ceramic oscillator is required over the internal RC oscillator because the internal RC oscillator is not accurate enough for serial communication. The oscillator you select should be a perfect multiple of 1.8432MHz. Mine is 5x this value. Many people use 2x this value (3.6864Mhz) and that's okay! You just have to make sure your microchip knows (1) to use the external oscillator (google around for how to burn the fuses on your chip to do this) and (2) what the frequency of your oscillator is and how fast it should be sending data. This is done by setting the UBRRL value. The formula to do this is here:

The datasheet of your microcontroller may list a lot of common crystal frequencies, bandwidths, and their appropriate UBRR values. However my datasheet lacked an entry for a 9.216MHz crystal, so I had to do the math myself. I Googled around and no "table" is available! Why not make one? (picture, below). Anyway, for my case I determined that if I set the UBRR value to 239, I could transmit data at 2800 baud (bits/second). This is slow enough to ensure accuracy, but fast enough to quickly dump a large amount of text to a PC terminal.

AVR Baud Calculator

This will make your life easier. The page wormfood.net/avrbaudcalc.php has a chart of common crystals and the baud rates they work best with! Try to pick a combination that provides the least error possible...

This is the bare-minimum code to test out my setup. Just load the code (written in C, compiled with avr-gcc) onto your chip and it's ready to go. Be sure you set your fuses to use an external oscillator and that you set your UBRRL value correctly.

#include <avr/io.h>  
#include <avr/interrupt.h>  
#include <util/delay.h>  

int main (void)  
{  
  unsigned char data=0;  
  UBRRL = 239;  
  UCSRB = (1 < < RXEN) | (1 << TXEN);  
  UCSRC = (1 < < UCSZ1) | (1 << UCSZ0);  

  for (;;)  
  {  
    if (data>'Z'||data< 'A')  
    {  
      UDR = 10; UDR = 13; data='A';_delay_ms(100);  
    }  

    UDR = data;  
    data += 1;  
    _delay_ms(100);  
  }  
}  

Once you load it, it's ready to roll! It continuously dumps letters to the serial port. To receive them, open HyperTerminal (on windows, under accessories) or minicom (on Linux, look it up!). Set your baud rate to 2800 (or whatever you selected) and you're in business. This (picture below) is the output of the microcontroller to HyperTerminal on my PC. Forgive the image quality, I photographed the LCD screen instead of taking a screenshot.

This is the circuit which generates the output of the previous image. I have a few extra components. I have an LED which I used for debugging purposes, and also a switch (labeled "R"). The switch (when pressed) grounds pin 1 of the ATTiny2313 which resets it. If I want to program the chip, I hold "R" down and the PC can program it with the inline programmer "parallel port, straight-through, DAPA style). One cable going into the circuit is for the parallel port programmer, one cable is for the serial port (data transfer), and one is for power (5v which I stole from a USB port).

I hope you found this information useful. Feel free to contact me with any questions you may have, but realize that I'm no expert, and I'm merely documenting my successes chronologically on this website.

Markdown source code last modified on January 18th, 2021
---
title: Simple Case AVR/PC Serial Communication via MAX232
date: 2009-05-14 11:00:19
tags: microcontroller, circuit, old
---

# Simple Case AVR/PC Serial Communication via MAX232

__I recently had the desire__ to be able to see data from an ATMEL AVR microcontroller (the [ATTiny2313](http://www.SWHarden.com/blog/images/attiny-2313.gif)) for development and debugging purposes.  I wanted an easy way to have my microcontroller talk to my PC (and vise versa) with a minimum number of parts.  The easiest way to do this was to utilize the [UART](http://en.wikipedia.org/wiki/UART) capabilities of the [ATTiny2313](http://www.SWHarden.com/blog/images/attiny-2313.gif) to talk to my PC through the serial port. One problem is that the [ATTiny2313](http://www.SWHarden.com/blog/images/attiny-2313.gif)(as with most microcontrollers) puts out 5V for "high" (on) and 0V for "low" (off).  The RS-232 standard (which PC serial ports use) required -15V for high and +15v for low!  Obviously the microcontroller needs some help to achieve this.  The easiest way was to use the [MAX232 serial level converter](http://en.wikipedia.org/wiki/MAX232) which [costs about 3 bucks at DigiKey](http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=MAX232CPE%2B-ND). Note that it requires a few 10uF capacitors to function properly.

<div class="text-center img-border">

[![](serialcircuit_thumb.jpg)](serialcircuit.png)

</div>

__Here's a more general schematic:__


<div class="text-center">

![](max232_serial_microcontroller.gif)

</div>

__I connected my ATTiny2313 to the MAX232__ in a very standard way. (photo)   MAX232 pins 13 and 14 go to the serial port, and the ATTiny2313 pins 2 and 3 go to the MAX232 pins 12 and 11 respectively.  I will note that they used a oscillator value (3.6864MHz) different than mine (9.216MHz).

__Determining the speed of serial communication__ is important.  This is dependent on your oscillator frequency!  I said I used a 9.216Mhz oscillator.  First, a crystal or ceramic oscillator is required over the internal RC oscillator because the internal RC oscillator is not accurate enough for serial communication.  The oscillator you select should be a perfect multiple of 1.8432MHz. Mine is 5x this value.  Many people use 2x this value (3.6864Mhz) and that's okay!  You just have to make sure your microchip knows (1) to use the external oscillator (google around for how to burn the fuses on your chip to do this) and (2) what the frequency of your oscillator is and how fast it should be sending data.  This is done by setting the UBRRL value.  The formula to do this is here:

<div class="text-center">

![](ubrrformula.gif)

</div>

__The datasheet of your microcontroller__ may list a lot of common crystal frequencies, bandwidths, and their appropriate UBRR values.  However my datasheet lacked an entry for a 9.216MHz crystal, so I had to do the math myself.  I Googled around and no "table" is available!  Why not make one? (picture, below).  Anyway, for my case I determined that if I set the UBRR value to 239, I could transmit data at 2800 baud (bits/second).  This is slow enough to ensure accuracy, but fast enough to quickly dump a large amount of text to a PC terminal.

<div class="text-center">

![](ubrr-table.gif)

</div>

## AVR Baud Calculator

This will make your life easier. The page <a href="http://www.wormfood.net/avrbaudcalc.php">wormfood.net/avrbaudcalc.php</a> has a chart of common crystals and the baud rates they work best with! Try to pick a combination that provides the least error possible...

__This is the bare-minimum code__ to test out my setup. Just load the code (written in C, compiled with avr-gcc) onto your chip and it's ready to go.  Be sure you set your fuses to use an external oscillator and that you set your UBRRL value correctly.

```c
#include <avr/io.h>  
#include <avr/interrupt.h>  
#include <util/delay.h>  

int main (void)  
{  
  unsigned char data=0;  
  UBRRL = 239;  
  UCSRB = (1 < < RXEN) | (1 << TXEN);  
  UCSRC = (1 < < UCSZ1) | (1 << UCSZ0);  

  for (;;)  
  {  
    if (data>'Z'||data< 'A')  
    {  
      UDR = 10; UDR = 13; data='A';_delay_ms(100);  
    }  
    
    UDR = data;  
    data += 1;  
    _delay_ms(100);  
  }  
}  
```

__Once you load it, it's ready to roll!__  It continuously dumps letters to the serial port.  To receive them, open HyperTerminal (on windows, under accessories) or minicom (on Linux, look it up!).  Set your baud rate to 2800 (or whatever you selected) and you're in business.  This (picture below) is the output of the microcontroller to HyperTerminal on my PC.  Forgive the image quality, I photographed the LCD screen instead of taking a screenshot.

<div class="text-center img-border">

[![](avr_serial_console_thumb.jpg)](avr_serial_console.jpg)

</div>

__This is the circuit__ which generates the output of the previous image.  I have a few extra components.  I have an LED which I used for debugging purposes, and also a switch (labeled "R").  The switch (when pressed) grounds pin 1 of the ATTiny2313 which resets it.  If I want to program the chip, I hold "R" down and the PC can program it with the inline programmer ["parallel port, straight-through, DAPA style](https://wikis.mit.edu/confluence/download/attachments/20512/dapa.png)).  One cable going into the circuit is for the parallel port programmer, one cable is for the serial port (data transfer), and one is for power (5v which I stole from a USB port).

<div class="text-center img-border">

[![](avr_max232_thumb.jpg)](avr_max232.jpg)

</div>

__I hope you found this__ information useful.  Feel free to [contact me](http://www.swharden.com/blog/send-scott-a-message/) with any questions you may have, but realize that I'm no expert, and I'm merely documenting my successes chronologically on this website.
April 22nd, 2009

Puxing 777 Radio Headset Schematic

I successfully created a speaker/microphone/transmit button circuit for the puxing 777 which probably works for all puxing radios. Instead of simply using circuits found on other websites (always for other radios), I decided to reverse-engineering an earphone/microphone headset that came with the radio to determine how it worked. I can't claim that I'm an expert in electronics theory, but I can say that I faithfully rebuilt the circuitry within the factory-shipped headset and it worked. The result allows me to leave my handheld radio in its charger while casually listening/transmitting with a button that I made instead of having to reach around and awkwardly squeeze the transmit button on the side of the radio. Once again, I built this circuit and it was successful for me, but there may still be a better way to do it.

The microphone is a 20-cent electret microphone with no special modifications. The speaker I used is a standard 8ohm loudspeaker with no special modifications. The switch is a keyboard-style (push-to-talk) switch, and the capacitor I used is good for 10nF.

If you have any ideas for improvements, let me know! I'll post some photos once I have my completed little "base station" set up. My ultimate goal is to turn an el-cheapo handheld VHF radio into a decent desktop transceiver by combining it with a nice antenna (located on a balcony at 30ft) and a convenient, easy-to-use switches/buttons/microphone/speaker/etc on a desktop panel.

Markdown source code last modified on January 18th, 2021
---
title: Puxing 777 Radio Headset Schematic
date: 2009-04-22 11:56:42
tags: amateur radio, circuit, old
---

# Puxing 777 Radio Headset Schematic

__I successfully created a speaker/microphone/transmit button circuit for the puxing 777__ which probably works for all puxing radios.  Instead of simply using circuits found on other websites (always for other radios), I decided to reverse-engineering an earphone/microphone headset that came with the radio to determine how it worked. I can't claim that I'm an expert in electronics theory, but I can say that I faithfully rebuilt the circuitry within the factory-shipped headset and it worked.  The result allows me to leave my handheld radio in its charger while casually listening/transmitting with a button that I made instead of having to reach around and awkwardly squeeze the transmit button on the side of the radio.  Once again, I built this circuit and it was successful for me, but there may still be a better way to do it.

<div class="text-center img-border">

[![](puxing_thumb.jpg)](puxing.png)

</div>

The microphone is a 20-cent [electret microphone](http://en.wikipedia.org/wiki/Electret_microphone) with no special modifications.  The speaker I used is a [standard 8ohm loudspeaker](http://en.wikipedia.org/wiki/File:3.5_Inch_Speaker.jpg) with no special modifications.  The switch is a keyboard-style (push-to-talk) switch, and the capacitor I used is good for 10nF.

<div class="text-center img-border">

![](headset.jpg)

</div>

__If you have any ideas for improvements, let me know!__  I'll post some photos once I have my completed little "base station" set up.  My ultimate goal is to turn an el-cheapo handheld VHF radio into a decent desktop transceiver by combining it with a nice antenna (located on a balcony at 30ft) and a convenient, easy-to-use switches/buttons/microphone/speaker/etc on a desktop panel.
Pages