Audio (voice) - Stock 9X PCB

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

Been there done that.. the first megasound ever was like that.. using an atmega instead of the arduino requires actually more space. Maybe I did it wrong.
Yes this arduino uses a crystal. Most don't. I'm building another module with a different design and uses an arduino with a resonator. Hopefully will work as good.
Even if we both and a few others can change crystals, most of the megasound users are not able to. The problem is that at the time the megasound was developed there weren't any cheap sd card modules on ebay. Therefore we went with 3.3V and 12 Mhz as far as I remember. Otherwise I believe it would have used an arduino.
I think someone has one working at 8Mhz..
Let's see what the one I'm building says tomorrow :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: Audio (voice) - Stock 9X PCB

Post by flybabo »

Maybe it's a time to have all new MegaSound V2.
New business opportunity? Not for me :)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

Business opportunity? The person that used to sell them stopped doing it. Maybe the sales weren't great anymore. It is understandable as more powerful radios came out.. I myself have a 9xr pro and a 9x with skyboard and both have voice already integrated. . I do love the 9x radio though. My radios are heavily modded. You can see on the video I posted above what I am doing also parallel to the voice modules.
I think we reached something we thought impossible until now. Model backup and restore. We can probably have a couple switches quite easily as far as hardware is concerned. Also as far as I understand the limitation is not just the voice module. It is also the 9x processor.

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
HC1969
Posts: 421
Joined: Wed Dec 28, 2011 8:47 am
Country: Hungary
Location: Istvan Magi
Contact:

Re: Audio (voice) - Stock 9X PCB

Post by HC1969 »

The original MegaSound 9X card will be available again. This can be converted into the new communication?
Image
http://rc-miskolc.emiter.hu/rc-miskolc/ ... gasound-9x
http://rc.emiter.hu/ (MegaSound 9X, GCL-2, FrSky-RSSI-DAC, etc.) Keress fel!
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice) - Stock 9X PCB

Post by MikeB »

Yes. Your board has connections 5 and 6 as RS232 type serial and 7 and 8 as logic serial. The logic serial connections go to the main processor board.
The only problem will be if you wish to use a logic level serial connection to the PC instead of the RS232 one on 5 and 6.
Connection 8 (Tx out) may be used directly, but a diode will be needed in the extra Rx in signal, connecting to the end of D2 that is not going to connection 7.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

And if you use an adapter with the CH340 chip instead of a FTDI adapter, you need another diode on the TX line as well. Otherwise it will prevent the module from working.

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice) - Stock 9X PCB

Post by MikeB »

To handle the conversion of 2-pos to 3-pos switches needs some RAM to make it work 'properly'. Even the '128 is struggling for enough RAM space as it still only has 4K. It is likely I shall need to remove the "throttle trace" option from the '128 version to make things fit. The '2561 will be OK as it has 8K RAM.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice) - Stock 9X PCB

Post by MikeB »

Here is my first attempt at some instructions on wiring up the serial for the Megasound board.
SerialVoice.pdf
11-Mar-2015 16:00
(228.5 KiB) Downloaded 306 times
I'm also posting hex files for the Megasound board and a hex file for the '128 version of er9x on the test versions thread of er9x. I have still to build and test the '64 and '2561 versions of er9x.

The Megasound hex files are:
amod_last.hex - 12MHz standard (LCD)
amod_last16.hex - 16MHz standard (LCD)
amod_lastSer.hex - 12MHz serial
amod_lastSer16.hex - 16MHz serial

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
HC1969
Posts: 421
Joined: Wed Dec 28, 2011 8:47 am
Country: Hungary
Location: Istvan Magi
Contact:

Re: Audio (voice) - Stock 9X PCB

Post by HC1969 »

Thank you Mike!

Image
Pins for MegaSound 9X
http://rc.emiter.hu/ (MegaSound 9X, GCL-2, FrSky-RSSI-DAC, etc.) Keress fel!
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice) - Stock 9X PCB

Post by MikeB »

General information regarding flashing the Megasound board using its serial bootloader:

The recommended way is to set the throttle away from idle, thus causing er9x to stop at the throttle warning screen at power on, then hold the left vertical trim switch active (either way, I just checked it). This should force the Megasound board into the bootloader.
If you have the backlight coming on normally at power on, you can tell the Megasound is in bootloader mode as the backlight will be off.
Stopping the main processor at the throttle warning screen makes sure it is not affecting the bootloader of the Megasound board.

To "improve" on this with the '128 you can put the main processor into its bootloader (only the '128 version currently has a serial bootloader). This is done by holding both horizontal trims towards the centre. For the '64 and '2561 I'm adding a "stop the main processor" feature activated in the same way with the trims.

This then means to flash the Megasound board you just power on holding both horizontal trims towards the centre AND the left vertical trim on one way or the other. (You may use your other hand to hold a glass of your favourite drink while doing this :mrgreen: ). I can actually (just) do that with one hand!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

I had the use one foot for the power switch and my tongue on the throttle trim to be able to flash the board. Oh, had to use the left foot as it didn't work with the right one. STK500 not in sync error :mrgreen:

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: Audio (voice) - Stock 9X PCB

Post by flybabo »

MikeB wrote:To handle the conversion of 2-pos to 3-pos switches needs some RAM to make it work 'properly'. Even the '128 is struggling for enough RAM space as it still only has 4K. It is likely I shall need to remove the "throttle trace" option from the '128 version to make things fit. The '2561 will be OK as it has 8K RAM.

Mike.
It may be the right time to upgrade to 2561 since it's on sale at Newark/Element14 :)
https://www.newark.com/atmel/atmega2561 ... ooH%2FJ01X
I guess I definitely need more RAM to experiment GPS logging and additional inputs.
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

HELLP!!!!!!!!!!!!!!

any way to test my megasound 9x board??
i connected serially as per MikeB's diagram, flash amod_lastSer.hex - 12MHz serial, and program my tx with er9x-128.zip 11-Mar-2015 16:100, but i have no sound and cant backup any models to sd card. for sd im using a 8gb fat32 format
Miguel
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

Did you turn the option "M'SoundSerial" to ON? It's in the Radio Setup/Hardware menu
Also you have to select "Megasound" in Radio Setup/AudioHaptic/Sound Mode option..

What serial adapter are you using? FTDI?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

jhsa wrote:Did you turn the option "M'SoundSerial" to ON? It's in the Radio Setup/Hardware menu
Also you have to select "Megasound" in Radio Setup/AudioHaptic/Sound Mode option..

What serial adapter are you using? FTDI?

João
yes both "M'SoundSerial" is on and "Megasound" selected.

seriaL adapter???
i connected the megasound 9x straight to pins 27 and 28 of my uP, a mega128.
Miguel
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

For the communication between voice module and computer you need a USB to serial adapter, right?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

ok. i have a usb to ttl adapter from ebay. i use it to program my gps and my arduinos. i flashed my megasoung using a usbasp adapter. i havent connect my megasound thru serial to my computer
Miguel
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice) - Stock 9X PCB

Post by MikeB »

The Megasound board processor fuses are set to start in the bootloader. If you flashed the application using the USBASP, you will have erased the bootloader.

Here is the .hex of the bootloader:
optiboot_atmega328.zip
(800 Bytes) Downloaded 196 times
If you flash this using your USBASP, then flash the application using the bootloader over serial you should be running.

I'll see if I can put together a "combined" hex (one file both application and bootloader) later today.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

im at work now. (0600 est). will try as soon as I get home (1630 est). when you said the flash the application using the bootloader over serial , do you mean this flie :"amod_lastSer.hex".????
and what software to upload via serial?

thanks
Miguel
flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: Audio (voice) - Stock 9X PCB

Post by flybabo »

If you just want to flash the amod_lastSer.hex using USBASP, you need to remove the boot loader by setting the fuses by following command:
avrdude -c usbasp -P usb -p m328p -B 100 -u -U lfuse:w:0xff:m -U hfuse:w:0xd1:m -U efuse:w:0x05:m

And then flash amod_lastSer.hex by another avrdude command:
avrdude -p m328p -c usbasp -P usb -B 1 -U flash:w:amod_lastSer.hex:i

That's what I'm doing as I don't have any extra serial connections on my voice card which is based on Martin's PCB design.
viewtopic.php?f=5&t=948&start=3300#p48603

Or wait until Mike post a combined hex including both boot loader and amod_lastSer.

Actually, I'm working on a SD card boot loader which allows flashing the voice card firmware from a hex file saved at a MicroSD card.
This 2KB boot loader seems to work but needs more testing.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

flybabo wrote: That's what I'm doing as I don't have any extra serial connections on my voice card which is based on Martin's PCB design.
You don't need much to be able to communicate with the PC. You use one diode from the m328 RX pin to pin28 of the radio processor, it can be soldered on the wire itself, and another from the m328 RX pin to the FTDI TX pin. It can be placed on the wire too. No modification to the voice board. And you then have communication with eepe and can flash the module.. as easy as that..
I'm also preparing some documentation about the boards I built using arduino. Will post it somewhere when it is ready..
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice) - Stock 9X PCB

Post by MikeB »

Here's the combined .hex that may be flashed with the USBASP:
CombinedSerial.zip
13-Mar-2015 19:08
Amod_lastser.hex merged with optiboot.hex
(27.48 KiB) Downloaded 206 times
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: Audio (voice) - Stock 9X PCB

Post by flybabo »

jhsa wrote:
flybabo wrote: That's what I'm doing as I don't have any extra serial connections on my voice card which is based on Martin's PCB design.
You don't need much to be able to communicate with the PC. You use one diode from the m328 RX pin to pin28 of the radio processor, it can be soldered on the wire itself, and another from the m328 RX pin to the FTDI TX pin. It can be placed on the wire too. No modification to the voice board. And you then have communication with eepe and can flash the module.. as easy as that..
I'm also preparing some documentation about the boards I built using arduino. Will post it somewhere when it is ready..
João
Thanks, but I don't think that's very useful for me as I have neither a FTDI card nor a PC to connect :)
Also, if I need to open the case to flash, I'd better use USBASP which can program both firmwares.
Since the MicroSD card is accessible without opening my custom transmitter case,
I'd like to use the SD boot loader to flash the firmware.
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

MikeB wrote:Here's the combined .hex that may be flashed with the USBASP:
CombinedSerial.zip
Mike.
I tried the file and its not working for me. :(
I use this commands
avrdude -p m328P -b 38400 -F -P usb -c usbasp -B100 -U lfuse:w:0xdf:m -U hfuse:w:0xd6:m -U efuse:w:0x05:m

avrdude -p m328P -b 38400 -F -P usb -c usbasp -U flash:w:CombinedSerial.hex:i -u

pause

what am i doing wrong??????????
Miguel
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice) - Stock 9X PCB

Post by jhsa »

You are using the -F option.. That's not good at all. I will be surprised if you didn't brick the chip..

@Flybabo, ok it is your choice but I'm sure most of the people that have the sound module like the possibility of connecting to the computer without having to remove the card or opening the radio to flash the module's firmware.. ;)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

flybabo wrote:If you just want to flash the amod_lastSer.hex using USBASP, you need to remove the boot loader by setting the fuses by following command:
avrdude -c usbasp -P usb -p m328p -B 100 -u -U lfuse:w:0xff:m -U hfuse:w:0xd1:m -U efuse:w:0x05:m

And then flash amod_lastSer.hex by another avrdude command:
avrdude -p m328p -c usbasp -P usb -B 1 -U flash:w:amod_lastSer.hex:i

That's what I'm doing as I don't have any extra serial connections on my voice card which is based on Martin's PCB design.
viewtopic.php?f=5&t=948&start=3300#p48603

Or wait until Mike post a combined hex including both boot loader and amod_lastSer.

Actually, I'm working on a SD card boot loader which allows flashing the voice card firmware from a hex file saved at a MicroSD card.
This 2KB boot loader seems to work but needs more testing.
if I try it you way ill get this error:
Attachments
error.png
Miguel
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

im getting device signature 0x000102 and is spectating 1e9514
am i bricked.
Miguel
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice) - Stock 9X PCB

Post by MikeB »

Try reading the fuses with:
avrdude.exe -c usbasp -P usb -p m328p -B 1000 -U lfuse:r:-:i -U hfuse:r:-:i -U efuse:r:-:i

If using a USBASP, make sure you have removed the SD card while programming as the USBASP will be using 5V and this is too high for the SD card.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

fix the signature problem. (bad connection) signature now reads as m328 not m328p. no biggie. here is a shot of my fuses:
fuses.png
Miguel
User avatar
magnetus
Posts: 92
Joined: Tue Mar 12, 2013 2:10 am
Country: United States
Location: Orlando, FL

Re: Audio (voice) - Stock 9X PCB

Post by magnetus »

try to reprogram again using this commands:
avrdude -p m328 -b 38400 -P usb -c usbasp -B100 -U lfuse:w:0xdf:m -U hfuse:w:0xd6:m -U efuse:w:0x05:m

avrdude -p m328 -b 38400 -P usb -c usbasp -U flash:w:CombinedSerial.hex:i -u

pause

still no voice and no backup
Attachments
20150313_185217.jpg
Miguel

Post Reply

Return to “er9x”