View Full Version: AudioOutput on the pv2 (not just beeps)

camerahacks >>Applications / Developers >>AudioOutput on the pv2 (not just beeps)


<< Prev | Next >>

zapped- 02-28-2008
AudioOutput on the pv2 (not just beeps)
I wrote a program that demonstrates audio output on an output port on a pv2 camera. The data was created from a wav file using BTc Sound Encoder 2.0 from http://www.romanblack.com/picsound.htm I used Algor. Type: 1 bit, and Fineness: BTc16 and massaged the exported data into 8 byte .DB statements. To hear the sound, you can wire up an RC filter to your chosen DATA0 port. I couldn't find a 0.22uF capacitor so I just touched my headphone plug to the output port on the camera. It may not be a good idea, but you can hear a very faint sound without connecting headphones by selecting shutter open ($02) for DATA0. I just guessed on the value for the BITDELAY and it sounds fine, but you could probably calculate a more accurate value. http://camerahacks.wikispaces.com/AudioOutput

bando- 02-29-2008

Wow, that's cool. Do you have pics of where that data0 port is? And where do you upload to on the PV2?

zapped- 02-29-2008

To use the program, you first need to assemble it with the assembler found in pv2devkit. Then you run the resulting pv2 file with the "Run PV2 Code" button in pv2tool. If you define DATA0 as $08 then you will use the right side (toward the battery) of the power LED which is labeled D8. I have not tried it yet, but you may be able to connect an LED or solar cell to an amplifier and receive the audio wirelessly from the power LED. The range would probably very low unless you replaced your power LED with a brighter one. On one of my cameras I have removed the flash circuitry and so I found it more convenient to use DATA0 as $40 which is the third pin on the flash/battery header. I have labeled the two points on the picture below. Note that you will probably not have the -*test*-('") point directly below pin 3 on your camera as shown in the picture.

zapped- 02-29-2008

I wouldn't call DATA0 a port, but I used a .DEFINE to allow me to easily change all occurrences in the program. The value you define DATA0 to is simply the value that will be written to hardware register $f71b in order to turn on the associated I/O pin. You can read more about $f71b and the other hardware registers at http://camerahacks.wikispaces.com/PV2+Hardware+Analysis

bando- 03-02-2008

Wow, ok so you can transmit audio wirelessly with it. I think I may have to hold off on this one 'til I understand it better, but thanks for responding.

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.