Pages: 1 2 3 [4] 5   Go Down
Author Topic: Audioino?  (Read 4031 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But serial uploading requires a FTDI chip right? Thats like an extra 4 bucks added to my project cost. Im assuming you cannot program through software serial?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Ive was able to successfully add the arduino verison of the bootloader

As mentioned before: If you compile the software with "ARDUINO_PLATFORM" enabled, you will not get a bootloader. This option is meant to compile a debugging platform to check the correct data transmission. If you take a look at the source code, you will understand.

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Chris, is there anyway you could please recompile a functional bootloader for the atmega328p chip? Ive been trying for multiple days so far and although i can get it to boot up, I cannot get it to program successfully. I am not sure what the issue is anymore.

Thank you!
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But serial uploading requires a FTDI chip right? Thats like an extra 4 bucks added to my project cost. Im assuming you cannot program through software serial?

You only need an FTDI cable (which you share between multiple targets). You don't need one per board. You could conceivably program through software serial, but what does that save? You still need the FTDI interface.

Doesn't the audio interface add cost anyway?

How often are you planning to reprogram? Just using the ICSP interface (6 wires or not) is the simplest anyway.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yea the main thing that I was hoping to solve by using the audio setup vs serial or icsp is that end users would not require any extra hardware and reprogramming would be extremely simplified since they would not even have to use the arduino IDE or anything since one could simple send out the audio file and people could update their devices. ICSP requires either an arduino as ISP or some external programmer which is added cost. And ftdi, although integrates the hardware in to the final product, still requires someone to use the IDE/avrdude to reprogram the device. Overall, although insigificant for someone experienced, for the nontechy these methods of reprogramming are bit more confusing.

But you are correct in that the devices will not be programmed that often. I mainly want to keep the option open just in case there is a patch that needs to be deployed or updates to code over time.

Also, can you trim the reset button off of the ICSP and just require a manual reset press? This would allow one to wire the ICP pins into say a microusb port which would be alot nicer than the current interface.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could trim off the power, since presumably the device is internally powered anyway. (Of course the progammer would then need its own power, eg. a battery).

Quote
end users would not require any extra hardware ...

Apart from an audio player and some wires? And an interface circuit?

You could make a dedicated ICSP programmer (eg. in a small box with a battery). Load the new code into it in program memory (like my bootloader programmer described here), tell the user to shove in the wire you described, and hit the "program" button, and wait until an LED changes colour (a second later).

The programmer itself would only need to be an Atmega328 (or similar) chip, a couple of capacitors, a resonator, a couple of resistors and LEDs, the box and a switch. Should be able to make it for $20. And you could have a similar socket in the programmer for reprogramming it (with the new firmware).

I'm pretty sure there are commercial devices that do just that, I remember CrossRoads was talking about getting one.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i actually need the power and ground since it will be used to charge my device, so i only have 3 pins left on a microusb which would be used for miso, mosi, and sck. but that means reset would have to be left out. would that not work properly?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An ICSP programmer needs to hold reset low during programming. If you only have 3 pins over better use a normal (serial) bootloader. You will need Rx, Tx, Reset, plus power and Gnd.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yea that makes sense, so either inside my project or outside my project there would have to be some usb->ftdi->ttl converter to be able to do the serial communication that the arduino IDE requires correct?
Logged

Temple, Texas
Offline Offline
Sr. Member
****
Karma: 14
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
end users would not require any extra hardware ...
Apart from an audio player and some wires? And an interface circuit?

Aren't we talking about a potential use-case where the user could reprogram it by playing a wav file on their iOS/Android/laptop and an off-the-shelf 3.5mm patch plug? 

I could see the attractiveness of that in certain situations!
Or maybe I'm missing a "fatal-flaw" here?

John

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yea thats the use case i was thinking. adding the audio circuitry to the final product (not really much since its pretty simple) and then anyone could program it using like a website that plays the audio track. much simpler than using the arduino IDE or some programmer for those people that arent techy's. the only flaw i can see is like Nick mentioned, there is no feedback to ensure the program installed successfully so that could be problematic
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2811
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would think that the converter software could test for and reject bad CRC's with an audio return code... with out a great deal of problem but I think only if it was really required to share or more important update user software without the user being able or required to be technically inclined.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yea that makes sense, so either inside my project or outside my project there would have to be some usb->ftdi->ttl converter to be able to do the serial communication that the arduino IDE requires correct?

It depends how you are planning to reprogram. If you are going to distribute a "box with firmware upgrade" on it, that would be TTL to TTL, so you wouldn't require that. If you are going to use the existing bootloader and use, say, a laptop, then you would need a FTDI cable, and some adapter to convert it to the mini-USB plug you are planning on.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

johncc wrote:
Quote
Aren't we talking about a potential use-case where the user could reprogram it by playing a wav file on their iOS/Android/laptop and an off-the-shelf 3.5mm patch plug?


like you mentioned, this guy used the audio bootloader:
http://tadpol.org/projects/AvrianJump.html

sdinnu wrote:
Code:
Chris, is there anyway you could please recompile a functional bootloader for the atmega328p chip?

At the moment I have not so much time and I programmed the bootloader almost a year ago, so I forgott many things.
Couldn't you use for the "first shot" an Atmega168 to see if the bootloader fits your needs?

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An ICSP programmer needs to hold reset low during programming. If you only have 3 pins over better use a normal (serial) bootloader. You will need Rx, Tx, Reset, plus power and Gnd.

1. If my project has a reset button can the user hold the reset button low while programming or does it have to be done through the ICP programmer?

2. I'm not a 100% sure how ftdi works but im assuming it takes signals from usb and then bit bangs it as a serial connection. Would it be possible to skip this chip and somehow bitbang serial through an audio port.. kinda like this guy? http://robots-everywhere.com/re_wiki/index.php?title=Serial_on_Android_using_the_audio_port
Logged

Pages: 1 2 3 [4] 5   Go Up
Jump to: