Thread Tools
Oct 16, 2019, 04:53 PM
Registered User

another diy osd question


hi everyone im from argentina , its posible to do the osd with arduino uno? arduino uno doesnt have adc7 or 6 how can i change that?

thanks !
Sign up now
to remove ads between posts
Sep 18, 2021, 04:45 AM
Registered User

OSD using ItsyBitsy M4 and Lm1881


It's been a while since this thread saw any activity, but nonetheless I was really glad to find it and thanks to all, especially Dennis, for the great discussion and ideas on how to generate OSD using an Arduino. I started to use a Sparkfun Pro Micro to do it, and got it almost working before I blew it up. (Yeah, I know, you've heard that line before, especially if you are a teacher who deals with student projects...One of the things I did in a former life.)
So anyway, I thought I'd look into how well it could be done with one of the faster boards, like an ItsyBitsy M4 which uses an ARM Cortex M4 running at 120MHz.
First thing I discovered is that the M4 is a different beast than the AVR chips. It took me a week just to get the analog comparator going. I had to read the datasheets over and over, again and again to see which bit in which (of the many) control registers I had missed. In the end I got it working, but meanwhile I had found that LM1881 I knew I had somewhere, so I thought I'd give that a go and see if I could stay out of the mire of low-level programming.
Here's what I have so far, and the code for this is disarmingly simple (although it only generates white bars so far) but it does it without resort to using the SPI (at 120Mhz, even a digitalWrite is pretty fast). Most complicated thing I do in the code is set up an external interrupt then in the ISR for it I do some digitalWrites to generate vertical bars.
Note also that although the LM1881 is supposed to be powered by 5v to 12v, I tried 3.3V and was pleasantly surprised that it worked. I used the LM12881's BPout signal for Hsync to detect start of video lines. I'll use O/E out for the Vsync to work out when new frames start.
Tomorrow I tackle the character generation and I'm happy to say that I'll be using Dennis's fonts for that!
Last edited by tcornall; Sep 19, 2021 at 02:53 AM. Reason: resize photo
Sep 19, 2021, 03:00 AM
Registered User
Here's a quick picture of the 'A' character generated. I changed the code to use a direct I/O method rather than digitalWrite and it is something like 20 times faster. I had to put in a lot of 'nops' into the code to get the character size as big as it is, so it'll be capable of small characters without messing around with SPI.
Sep 24, 2021, 01:24 PM
Just another user
Dennis Frie's Avatar
Thread OP
Quote:
Originally Posted by tcornall
It's been a while since this thread saw any activity, but nonetheless I was really glad to find it and thanks to all, especially Dennis, for the great discussion and ideas on how to generate OSD using an Arduino. I started to use a Sparkfun Pro Micro to do it, and got it almost working before I blew it up. (Yeah, I know, you've heard that line before, especially if you are a teacher who deals with student projects...One of the things I did in a former life.)
So anyway, I thought I'd look into how well it could be done with one of the faster boards, like an ItsyBitsy M4 which uses an ARM Cortex M4 running at 120MHz.
First thing I discovered is that the M4 is a different beast than the AVR chips. It took me a week just to get the analog comparator going. I had to read the datasheets over and over, again and again to see which bit in which (of the many) control registers I had missed. In the end I got it working, but meanwhile I had found that LM1881 I knew I had somewhere, so I thought I'd give that a go and see if I could stay out of the mire of low-level programming.
Here's what I have so far, and the code for this is disarmingly simple (although it only generates white bars so far) but it does it without resort to using the SPI (at 120Mhz, even a digitalWrite is pretty fast). Most complicated thing I do in the code is set up an external interrupt then in the ISR for it I do some digitalWrites to generate vertical bars.
Note also that although the LM1881 is supposed to be powered by 5v to 12v, I tried 3.3V and was pleasantly surprised that it worked. I used the LM12881's BPout signal for Hsync to detect start of video lines. I'll use O/E out for the Vsync to work out when new frames start.
Tomorrow I tackle the character generation and I'm happy to say that I'll be using Dennis's fonts for that!
Quote:
Originally Posted by tcornall
Here's a quick picture of the 'A' character generated. I changed the code to use a direct I/O method rather than digitalWrite and it is something like 20 times faster. I had to put in a lot of 'nops' into the code to get the character size as big as it is, so it'll be capable of small characters without messing around with SPI.
The ARM-architecture is definitely more of a handful to get started with, especially when setting everything up manually. However, the flexibility and possibilities makes it so much more fun and capable

While the use of digital write might be easier initially, it does give a lot of limitations, as the MCU must be running pixel-output 90% of the time, leaving little processing power for everything else. On the AVR that was pretty much the only possible option and I just had to accept the limitations and work around it (SPI was used, but the MCU still had to constantly fill data into the buffer).
However, using the SPI with DMA on an ARM gives a much more capable and flexible solution. It works like a charm

Looks good with the GFX integration, that should make it a lot easier to do more fancy graphics
Sep 02, 2022, 08:51 AM
Registered User
How to change text size for 1280x700 screen?
Sep 04, 2022, 06:55 AM
Fly Hard or Fly Home!!!
VF-Alpha's Avatar
im happy to see some life in here again most everything now is digital off the shelf ready to go. I still have a lot of diy and analog video systems tucked away. I'm going to be using them for fpv planes and cars while digital is nice analog backup is handy as well especially for long range


Quick Reply
Message:

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 08:47 AM