Go Down

Topic: Arduino + MAX7456 OSD (Read 77129 times) previous topic - next topic


Yes, all the characters have a single black pixel outline.  Using the Maxim util you could edit any of them to say have a two pixel black outline if you wanted.  Also by setting a bit in the command sent to the MAX7456, you can just invert the entire character to black.



Hey your code worked perfectly! (Well, after I changed NTSC to PAL, duh!)

Here's my setup:


After I got it working on breadboard, I put everything together so it will fit in my RC plane:

Hello World!!

Thanks a lot for sharing your work, much less work for me to get it working!  :)



Thank you dfraser,

This is an excellent building block for MAX7456 OSD work. I'm just waiting for a breakout board to mount the MAX device now.

Your code will be a magical head start for me in my intended application.

Thank you very much for sharing your code with us all.

With Regards




Just to return the favour, I've made an easier to use write_to_screen function that allows you to print a string to a (x,y) location on the screen, and set whether you want it to blink or invert colour:


OSD_write_to_screen("Hello World", 3, 5, 1,0);

Code: [Select]
// ============================================================   WRITE TO SCREEN
void OSD_write_to_screen(const char s[], byte x, byte y, byte blink, byte invert){
 unsigned int linepos;
 byte local_count;
 byte settings, char_address_hi, char_address_lo;
 byte screen_char;

 local_count = 0;

 char_address_hi = 0;
 char_address_lo = 0;
 Serial.print(" - ");
 // convert x,y to line position
 linepos = y*30+x;
 // divide in to hi & lo byte
 char_address_hi = linepos >> 8;
 char_address_lo = linepos;
 // clear the screen
 settings = B00000001;
 // set blink bit
 if (blink) {
   settings |= (1 << 4);       // forces nth bit of x to be 1.  all other bits left alone.
   //x &= ~(1 << n);      // forces nth bit of x to be 0.  all other bits left alone.  
 // set invert bit
 if (invert){
   settings |= (1 << 3);       // forces nth bit of x to be 1.  all other bits left alone.


 spi_transfer(DMM_reg); //dmm

 spi_transfer(DMAH_reg); // set start address high

 spi_transfer(DMAL_reg); // set start address low
 while(s[local_count]!='\0') // write out full screen
   screen_char = s[local_count];
 spi_transfer(DMM_reg); //dmm

 spi_transfer(VM0_reg); // turn on screen next vertical


Check out the video of my FPV OSD testing using the above code (and some more stuff).



Your video looks great.  I've been off on a two week vacation (sans computers) so I was surprised by the activity and what you have done with your OSD MAX7456.

I will try and post some more code in the next week.  Though I have never done one before, I suppose I should look into putting together a MAX7456 library.

That would make it easier for everybody to use.



Well work finally let up enough for me to finish up this last MAX7456 util.  This sketch allows you to use the MAX7456 Eval software 'Display Memory File Builder' function.  With it you can quickly create a screen, with attributes, like blink, invert and background and then upload that to the Arduino + MAX7456.  It is very useful if you are using border or underline graphic characters.

(Make sure that the mcm file referenced by the mdm file is in fact the one MAX7456 NVram uses.  Please see the MAX7456_font software above.)

Selecting a character

Setting character attributes

Final display (though it doesn't show in the picture, the word 'TEST' is blinking on and off)

Here is a zip file with the sketch code, the mdm test file and a copy of the arduino.mcm file.

I hope that this will be of some use to people playing with the Arduino + MAX7456 OSD.



Awesome! This should be very useful, thanks for the work!


Nov 16, 2008, 05:48 pm Last Edit: Nov 16, 2008, 07:41 pm by tolisn Reason: 1

I have made an OSD using the MAX chip. The Max chip is connected to a ATMega168 and I'm using the whole system to display an scale overlay on the rear-view camera monitor in my car. The goal is to display the distance from objects, when parking, on the rear-view monitor.
So far I have succeeded in showing information on the monitor using the max chip.
What I need to do is customize the character set to make some custom graphics that I need.
I think that you guys can help me out on this.

Is there anyway that I can use the above mentioned programs to program my ATmega168 so that it can burn the custom graphics into the MAX chip?

The board that I'm using has a built in serial port connection using a MAX232 chip.

Can someone please make a small step by step tutorial on how I would go about using the above files with my setup?

Excuse me for the long post and all the newbie questions :-[


Well, if your ATMega168 talks to the MAX7456 via SPI (which if would have to do to display characters) then yes it should be possible to set it up to change the MAX7456's eeprom set.  Having said that I would need to know much more info about your board.



Hey thanks for replying. What info do you need about my board. I would be more than happy to tell you. :)


Well to cut through all the back and forth on this, there are a couple of ways to proceed.

The easiest (and best) would be to get an Arduino + Proto shield and put together a setup like the ones described here.  Then down load the MCM burning code and away you go.

If your MAX7456 is not on a daughter card, then you could still use the Arduino to burn a modified version of the MCM sketch to work with your board (ie changed SPI & serial pin numbers, clock speed, etc).  Swap the Arduino 168 with yours and program the 7456.

If your 168 is not a socket dip, I suppose you could try in circuit programming, if your system allows it, again with a modified MCM sketch.

The sketch code for changing the 7456 eeprom is nothing terribly complex and could be rewritten in straight 'C' to make it more generic.

If none of the above seems workable then I'm at a loss and not sure what to tell you.

I'm afraid, as only you know how you built this system, only you can tell which technique would be the best to use.



Nov 17, 2008, 08:39 pm Last Edit: Nov 17, 2008, 08:50 pm by tolisn Reason: 1
Ok. Let me get his straight.

1. I have to get an arduino board and connect it to my MAX7456 board via the SPI interface
2. I then upload the sketch to the arduino board using the Arduino UI and run it
3. After that I use hyper terminal to send the MCM code to the arduino which in turn decodes it and sends it to the MAX7456 for burning
4. What protocol do you use to send the file from hyper terminal ?
5. Will any arduino board do, or do I have to get a certain model?

Please feel free to fill in the dark spots

Regards and thanks for your time  


Hey this nice!  There are definitely some Amateur Television (ham radio) applications for this!


Hey this nice!  There are definitely some Amateur Television (ham radio) applications for this!

Sure are - the price for an ATV video overlay board borders on obscene.  I figure for the price and size of the last one we bought, the GPS should have been thrown in there, too.

There are general purpose display opportunities, too.  According to the datasheet the MAX7456 can generate output without an input signal.  This could allow some interesting display capabilities (although probably monochromatic).

My Sparkfun order arrived today, and the Digikey order should arrive in a couple of days.  Then I'll have all the parts I need to get started playing.


Go Up