I've made a few updates to the MAX7456 video overlay library. The begin() function now has a second optional boolean parameter that causes the library to translate from ASCII to the MAX7456 native character set. This allows you to use the MAX7456 straight out of the box - no character memory reloading required! Just use osd.begin(SLAVE_SELECT, true); to take advantage of the translation.
It has also been updated to work with the soon to be released Arduino 1.0.
This functionality has not been tested extensively; please PM me if you have problems.
Hello,
We have been trying for two days to get the sparkfun max7456 going on some of D Frasers code and have up loaded the new character set.
The funny characters in the picture were there from the start before the new character sets. we downloaded your library but winzip free trail version barffs on the file format. Any chance of pointing towards a windows zip file of your work or please if anyone has a clue as to why the characters please let us know. Skill levels fairly low on our side. Thank you for your time
we downloaded your library but winzip free trail version barffs on the file format.
It's a gzipped tarball; I thought winzip could handle those. I've extracted it on the web site; it's a directory and two files. You can grab them and recreate in your libraries folder.
Thanks for the quick response. The character set is stuck in the old one with the first space character corrupted so if you change the original d fraser code with the mapping in to char32 = any other character in the old table it will put in the correct character. Using teraterm to up load and it takes the three minutes as suggested.
Downloaded the two files thank you and created a directory in the libraries folder and ran one of your first sample sketches but get this
error as we said fairly low skilled in C. Any help appreciated
MAX7456_lib_test.cpp: In function 'void setup()':
MAX7456_lib_test:14: error: no matching function for call to 'MAX7456::begin()'
C:\Users......\Downloads\arduino-0022\arduino-0022\libraries\MAX7456/MAX7456.h:105: note: candidates are: void MAX7456::begin(byte, boolean)
MAX7456_lib_test.cpp: In function 'void loop()':
MAX7456_lib_test:60: error: 'class MAX7456' has no member named 'noblink'
MAX7456_lib_test:67: error: 'class MAX7456' has no member named 'noblink'
MAX7456_lib_test:68: error: 'class MAX7456' has no member named 'noinvert'
Wow, that MAX7456_lib_test is ancient. It isn't compatible with the library (except maybe an extremely early 0.0.0 alpha version). Thanks for pointing this out - I'll get rid of it.
Try this code.
-j
// video overlay for ATV
// code for the kg4wsv video overlay board
// 8MHz board, internal 8MHz oscillator, MAX7456, 3:1 voltage divider on analog input 3
// kg4wsv at or near gmail
#include "MAX7456.h"
MAX7456 osd;
#define MAX7456_SELECT 10
void setup()
{
Serial.begin(9600);
osd.begin(MAX7456_SELECT, true); // true means we're using the MAX7456 native character set
// remove if you've done the ASCII character set load on your 7456
}
void loop()
{
float voltage;
// 3:1 voltage divider, 5V reference, 10 bit ADC
voltage = 4.0 * 5.0 * ((float) analogRead(3)) / 1024.0;
osd.home();
osd.println("");
osd.print("KG4WSV ");
osd.print(voltage);
osd.println("V ");
Serial.print("KG4WSV ");
Serial.print(voltage);
Serial.println("V");
delay(250);
}
thanks, compiled and uploaded, have fixed the dud character in the max unit. Still have a little maybe hardware issue where the characters only turn up after the video source is turned off, but the serial output shows that the voltage keeps on being read. Thanks again will keep on playing
This the point where we usually ask for a schematic and your code...
Sounds like a bad video signal, or a hardware problem. Does the MAX7456 pass the video through while connected?
Is this PAL or NTSC? THe library is written for NTSC; you'll have to change code in the library to support PAL.
The MAX7456 has 4 "modes" for the output sync signal. They are:
use the eternal source
use an internally generated sync
use external if it's there, otherwise use the internal
no sync; no display
The library uses the third mode (use external if available, internal otherwise) because it allows the most flexibility and it's always worked for me. Your problem sounds as if there may be a bad signal on the input.
OK PAL or NTSC is the problem. I work with PAL signal and when I imput a NTSC signal the MAX7456 work perfectly and now... What library I have to change and what lines must I change for work perfecly in PAL mode?
In the file MAX7456.cpp, look for this code starting at line 152:
// make sure the MAX7456 is enabled
digitalWrite(_slave_select,LOW);
MAX7456_spi_transfer(VM0_WRITE_ADDR);
MAX7456_spi_transfer(VERTICAL_SYNC_NEXT_VSYNC|OSD_ENABLE);
digitalWrite(_slave_select,HIGH);
delay(100);
Please report back if that solves the problem. I'm aware that lots of the world uses PAL, but I don't have any hardware to test with, so I haven't added code to switch to PAL mode. If this works for you, I'll try to add a PALL switch to the library.
KG4WSV, first I want to thank you for all your hard work on the Max7456. Maybe you are the one who can help me. I've tried almost every lib I can find online, and I just can't get mine to work. I'm using an Arduino Mega 1280 with the Sparkfun max7456 Breakout Board.
I have the Max Breakout Board DIN to 50, DOUT to 51, SCK to 52, CS to 53, and VSYNC to 2. I feel like I'm making some stupid mistake, because it all seems SO simple.
I'm not getting any kind of text on my screen. Also, I'm having the same problem as everyone else, my screen only displays for 5 or 10 seconds...and yes, I have Max RST on a 10k resistor to +5V.
I feel like I'm taking crazy pills! If anyone can help me I will forever be in your debt!
I have a NTSC setup. I tried tying reset directly to +5v when I first wired it up, with the same result. I am going to look into the SPI registers, as you recommend, but that is going to slow learning experience. The Sparkfun Tech Support emailed me back today, they suggested using an Arduino UNO. I really hate to admit defeat, but I'm at the point where I'll probably just buy an UNO and try that.
Okay, the good news is I got the on screen display working, but it is still drops the video after a few seconds. I've tried connecting the RST directly to +5v, and also with 1k and 10k resistors. I've tried several different video sources, as using no video, but it always drops the video after a few seconds. Any ideas?