what we need for the project
Hardware
- UVC analog to usb video converter or TV with analog input
- an analog camera ,I use fvp 1000 TVL
- MAX7456 module board
- Arduino board
Software
so first connect the Arduino pins to the MAX7456 board as the following.- pin 10 to SC or SS
- pin 11 to SDOUT
- pin 12 to SDIN
- pin 13 to SCLK
- VCC to 5 volt
- GND to ground
The code
so at the beginning and this is so importing we do, need to write the font by uploading the example "CharsetLoader" ,after that open the serial monitor and type "y" to download the fonts than you can upload any sketch you want.Note: do not forget to change the SS pin in the example to 10
so the result must be like the photo below
then upload the Hello world example to Arduino to double check that everything works fine.
Note: the diameters of the OSD 16 rows by 24 column.
Custom made OSD fonts
thankfully we have a max7456 font editor that tool can draw anything you want like a letter or shape by pressing in the pixel, and there are two types of output the first one "*.mcm" the second "*.h", I'm always using "save as H" which mean as hex file to upload it by the Arduino sketch.the white pixel still white on the screen and the black also only the blue it means the background color which in this case the camera input video.
after the modification, you must export the file to hex by choosing the option " save as H" then open the file with text or Notepad++ and change the first line code from "PROGMEM const byte fontdata[16384]" to "PROGMEM const char fontdata[16384]"
download the sketch and change the including file by copy and paste the hex output file of the max7456 font editor