HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Oct 11, 2011, 04:50 PM
Registered User
Italia, Lombardia, Milano
Joined Jun 2010
146 Posts
Quote:
Originally Posted by Dennis Frie View Post
I have only allowed menu-access on power-up. That will allow GPS-code etc. to run as usually. You can change it and allow menu-access all the time, but as I only rarely plan to make changes i figured this was the best solution.

The 3-finger problem... Well, you can just reverse the code to enter menu if button is not pressed. But then you always have to exit menu.
You can also add like 5 seconds delay to allow menu-access.

Except for that, have you successfully tried version 15? And been able to save settings etc.?
OK Dennis, I'm thinking for the best solution about 3-fingers problem, may be add a delay to enter is the best solution.
About testing ver 15; I did not tested well because the button reversing, after first attempt I removed my button thinking I made a mistake connecting normally close button, but was correct (after your clarify), so I can not retry, tomorrow I will reconnect again the button and test it better.
For the moment I saw the setup menu very usefull

Thanks, Carlo
carlonb is offline Find More Posts by carlonb
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 11, 2011, 05:42 PM
Registered User
CheckSum's Avatar
Joined Jan 2011
512 Posts
FTDI>>Atmega Connection

So I am trying to build one with an Atmega breakout board that I bought and was wondering if any of you could give me a hand with the FTDI connection as I am unfamiliar with the vendors connection scheme on the break out board that I bought.
Thanks-


***POSSIBLE ANSWER***

To hook it up to the FTDI, my guess is that you'd hook up TXD to RXI and RXD to TXO, and connect the grounds. The SCL and SDA pins on the ATMega adapter are for the two-wire interface, and the XCK (only used for synchronous transfer), TXD, and RXD are for the serial USART of the ATMega.
CheckSum is offline Find More Posts by CheckSum
Last edited by CheckSum; Oct 11, 2011 at 06:10 PM.
Reply With Quote
Old Oct 12, 2011, 02:28 AM
Registered User
Canberra, Australia
Joined Jan 2008
60 Posts
Quote:
Originally Posted by CheckSum View Post
So I am trying to build one with an Atmega breakout board that I bought and was wondering if any of you could give me a hand with the FTDI connection as I am unfamiliar with the vendors connection scheme on the break out board that I bought.
Thanks-


***POSSIBLE ANSWER***

To hook it up to the FTDI, my guess is that you'd hook up TXD to RXI and RXD to TXO, and connect the grounds. The SCL and SDA pins on the ATMega adapter are for the two-wire interface, and the XCK (only used for synchronous transfer), TXD, and RXD are for the serial USART of the ATMega.
I believe you will first have to connect the "ICSP" connector to an AVR programmer and burn the arduino bootloader before you can hookup the FTDI and flash DIY-OSD. There may be other "life-support" that the ATMEGA needs to become an "arduino" too, perhaps a 16MHZ crystal?

Dave
davico is offline Find More Posts by davico
Reply With Quote
Old Oct 12, 2011, 02:55 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
755 Posts
Quote:
Originally Posted by CheckSum View Post
So I am trying to build one with an Atmega breakout board that I bought and was wondering if any of you could give me a hand with the FTDI connection as I am unfamiliar with the vendors connection scheme on the break out board that I bought.
Thanks-


***POSSIBLE ANSWER***

To hook it up to the FTDI, my guess is that you'd hook up TXD to RXI and RXD to TXO, and connect the grounds. The SCL and SDA pins on the ATMega adapter are for the two-wire interface, and the XCK (only used for synchronous transfer), TXD, and RXD are for the serial USART of the ATMega.
Your hardware looks like an Arduino? If that's the case you don't have to use ICSP programmer etc. as mentioned by davico.

As you have suggested you just have to connect TX->RX, RX->TX and ground. Remember you have to press reset on Arduino just before Arduino IDE uploads the code.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 12, 2011, 03:43 AM
Registered User
CheckSum's Avatar
Joined Jan 2011
512 Posts
Great, thanks Dennis. I almost have one built, but I am a little confused on which pins to attach the GPS and voltage sensor to?
-Thanks
**Edit**
It's an Atmega328 w/an Ardunio boot loader already loaded up on it. Using a resonator instead of a xtal, so I guess well see if there is any drift???.
CheckSum is offline Find More Posts by CheckSum
Reply With Quote
Old Oct 12, 2011, 04:29 AM
Multi Rotors Rule ! ;-)
SkyEyes's Avatar
United Kingdom
Joined Jul 2010
879 Posts
Dennis, this project looks fantastic.

I'm sorry I have not had an opportunity to read through it all, but I would be very interested to "purchase" a completed OSD. Meaning all components built onto a little board with recent firmware update. $$$ or £££ = Cost of parts + your time.

Would you cater for this? Or is there already a batch being produced.

There will for sure be a marketplace for your item, along with alot of people like me who perhaps doesnt have the time to go through everything and build it myself (I know, i wont get any build satisfaction this way).
SkyEyes is offline Find More Posts by SkyEyes
Reply With Quote
Old Oct 12, 2011, 04:44 AM
Registered User
Canberra, Australia
Joined Jan 2008
60 Posts
Quote:
Originally Posted by android78 View Post
From a coding perspective, I think it would be good to break the code into several files to make it easier to maintain as the project becomes larger too. For instance, it would be good to have a separate file for the sensors, one for the display, etc. This way, people with different sensors know that they can mess with the one file without messing up the display module.
The overhead with doing this shouldn't be too much, and it would make it much more readable.

Just my personal opinion though.
I agree that this would be a great move for future development, along with uploading to a version-control/hosting site such as github or google code.

I've had a quick look at cl-osd (http://www.rcgroups.com/forums/showthread.php?t=1490446) which is a project for similar hardware. It's code seems nicely organised, he has also abstracted away some of the nastiness regarding alignment/placement of text etc

I also have to agree that with Dennis though that the "one-file" version is easier to get started with, I think that can only last so long though

Dave
davico is offline Find More Posts by davico
Reply With Quote
Old Oct 12, 2011, 06:06 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
755 Posts
Quote:
Originally Posted by CheckSum View Post
Great, thanks Dennis. I almost have one built, but I am a little confused on which pins to attach the GPS and voltage sensor to?
-Thanks
**Edit**
It's an Atmega328 w/an Ardunio boot loader already loaded up on it. Using a resonator instead of a xtal, so I guess well see if there is any drift???.
GPS goes to the RX pin on Arduino (GPS TX -> Arduino RX). If you need to config the GPS you also need to connect Arduino TX -> GPS RX.

The current-sensor can be connected to any analog input. You just have to specify the input-pin in the file.
Same goes with the voltage (just remember the voltage-divider).

I doubt you will have any problems with a resonator

Quote:
Originally Posted by SkyEyes View Post
Dennis, this project looks fantastic.

I'm sorry I have not had an opportunity to read through it all, but I would be very interested to "purchase" a completed OSD. Meaning all components built onto a little board with recent firmware update. $$$ or £££ = Cost of parts + your time.

Would you cater for this? Or is there already a batch being produced.

There will for sure be a marketplace for your item, along with alot of people like me who perhaps doesnt have the time to go through everything and build it myself (I know, i wont get any build satisfaction this way).
I'm only doing this for fun, so I'm not gonna sell anything
I have written support for SimpleOSD OPEN - so I suggest you buy one of those instead. At the moment they seem to be sold with software version 14 - but you can probably ask Melih to flash before shipping
http://flytron.com/osd-headtrackers/...uino-boot.html
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 12, 2011, 06:12 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
755 Posts
Quote:
Originally Posted by davico View Post
I agree that this would be a great move for future development, along with uploading to a version-control/hosting site such as github or google code.

I've had a quick look at cl-osd (http://www.rcgroups.com/forums/showthread.php?t=1490446) which is a project for similar hardware. It's code seems nicely organised, he has also abstracted away some of the nastiness regarding alignment/placement of text etc

I also have to agree that with Dennis though that the "one-file" version is easier to get started with, I think that can only last so long though

Dave
The code is a bit of a mess - that's no secret at all
I never expected this project to go as far as this, and I would have done a few things different if I knew (especially the way screen-output is handled and more configurable layout)

The major problem have been timing. With full speed SPI, even a for-loop is too slow for blasting pixels/characters to SPI.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 12, 2011, 07:02 AM
Multi Rotors Rule ! ;-)
SkyEyes's Avatar
United Kingdom
Joined Jul 2010
879 Posts
Thankyou for your feedback Dennis.
Have looked at the site you link to and will order via that page (+ gps module).

Cheers.
SkyEyes is offline Find More Posts by SkyEyes
Reply With Quote
Old Oct 12, 2011, 04:09 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
755 Posts
The timing problem with for-loops have been pretty annoying as it wasn't fast enough to shift out characters.

Looking at the code from CL-OSD I realized there is a major different between this:

Fast for-loop:
for (unsigned char ij = 0 ; ij< 10 ; ij++) {
_delay_loop_1(5);
SPDR = letters[(3<<3)+(temp-8)];
}

slow loop:
unsigned char ii =0;
for (ii = 0 ; ii< 10 ; ii++) {
_delay_loop_1(5);
SPDR = letters[(3<<3)+(temp-8)];
}

I have no idea why that's faster, but it would diffinatly have made things quite a lot easier and more or less eliminated the problems with timing... Barhh
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 12, 2011, 04:13 PM
CL-OSD developer
Sverige, Östergötlands Län, Linköping
Joined Apr 2011
279 Posts
Quote:
Originally Posted by Dennis Frie View Post
The timing problem with for-loops have been pretty annoying as it wasn't fast enough to shift out characters.

Looking at the code from CL-OSD I realized there is a major different between this:

Fast for-loop:
for (unsigned char ij = 0 ; ij< 10 ; ij++) {
_delay_loop_1(5);
SPDR = letters[(3<<3)+(temp-8)];
}

slow loop:
unsigned char ii =0;
for (ii = 0 ; ii< 10 ; ii++) {
_delay_loop_1(5);
SPDR = letters[(3<<3)+(temp-8)];
}

I have no idea why that's faster, but it would diffinatly have made things quite a lot easier and more or less eliminated the problems with timing... Barhh
If you put the variable inside the for loop I guess the compiler knows it's not used outside and can optimize but this might not always be true if you put it outside of the loop. And if you are using the variable in other places it's going to be slower.
callelj is offline Find More Posts by callelj
Reply With Quote
Old Oct 12, 2011, 04:16 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
755 Posts
Quote:
Originally Posted by callelj View Post
If you put the variable inside the for loop I guess the compiler knows it's not used outside and can optimize but this might not always be true if you put it outside of the loop. And if you are using the variable in other places it's going to be slower.
Wow, quick response - thanks.
That could have saved me quite a few hours and made the code a lot easier to read and write. I tried quite a few things but had no idea that would solve the problem
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 12, 2011, 04:43 PM
Registered User
Italia, Lombardia, Milano
Joined Jun 2010
146 Posts
Quote:
Originally Posted by carlonb View Post

OK Dennis, I'm thinking for the best solution about 3-fingers problem, may be add a delay to enter is the best solution.
About testing ver 15; I did not tested well because the button reversing, after first attempt I removed my button thinking I made a mistake connecting normally close button, but was correct (after your clarify), so I can not retry, tomorrow I will reconnect again the button and test it better.
For the moment I saw the setup menu very usefull

Thanks, Carlo
Hi Dennis, I added a delay of about 3sec in setup routine in order to have a short time to press button for enabling setup menu, it's working good
I have also quickly tested the setup parameters menu' and seems works good and the EEProm parameter saving as well.
Ciao, Carlo
carlonb is offline Find More Posts by carlonb
Reply With Quote
Old Oct 12, 2011, 04:55 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
755 Posts
Quote:
Originally Posted by carlonb View Post
Hi Dennis, I added a delay of about 3sec in setup routine in order to have a short time to press button for enabling setup menu, it's working good
I have also quickly tested the setup parameters menu' and seems works good and the EEProm parameter saving as well.
Ciao, Carlo
That's great to hear, thanks
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Diy osd karl k FPV Talk 2 May 03, 2011 12:31 AM
Idea New DIY OSD? atari7202 FPV Talk 1 Mar 25, 2011 12:08 AM
Discussion see my own diy OSD video Passion Aerial Photography 7 May 27, 2010 01:28 AM
Discussion REAL homebrew DIY OSD - Check it out! jafoca FPV Talk 8 Jun 29, 2009 06:52 PM
Discussion picoOSD DIY PIC12F683 based OSD in C kbosak FPV Talk 6 Jan 31, 2008 07:47 AM