RGB Pattern Generator

BARS PAL red CROSSHATCH
PAL BLUE dots cross
This is a pattern generator with 13 images and 1KHZ tone, good for testing LCD TV’s, projectors and cathode ray tube TV’s.
The project is based on ATtiny2313 running at 20MHZ. The horizontal frequency is 15625HZ and the vertical frequency is 50HZ (Europe standard).
With the button S1 you can select the images one by one and with the button S2 you can turn the sound on and off (see the pictures below).
This is the schematic:
Schematic
And this is the PCB and silkscreen:
Board
 
 Silkscreen
 
 generator-silkscreen1
You can download a pdf file with the schematic and pcb from here:
 
attiny2313-pattern-generator.pdf
 
Here are the files for Cadsoft’s eagle design program:
ATtiny2313 pattern generator simple.sch
 
ATtiny2313 pattern generator simple.brd
The program inside the AVR was made with BASCOM-AVR. With the trial version provided you can make modifications in the program if you want to.
Here are the source code and hex file:
ATtiny2313 pattern generator simple.bas
 
ATtiny2313 pattern generator simple.hex
The ATtiny2313 is shipped with internal oscillator activated by default, so you have to program the appropriate fuses yourself. Goto Engbedded AVR Fuse Calculator site, select the appropriate microcontroller and set the settings as you see in the picture below. The program will calculate the appropriate fuses settings. Put them in your programmer and program the chip.
 
This is the picture of the settings (click for larger view):
generator-fuses

Important!

A bug found in the placement of transistor T1 in PCB.
The correct is the reverse of the drawing in silkscreen. The schematic it’s ok.

For any questions submit a comment or mail me to: dselecdim at gmail dot com

40 thoughts on “RGB Pattern Generator

  1. o.k very good job .
    I just finished it. Pay attention on transistor bc 547 . In circuit diagram is o.k but on P.C.B must be reverced.

  2. Hi and congratulations on an excelent and clean project.
    I would like to play around with the program and try to make some more patterns.
    I have BASCOM demo but every time i try to compile your code, i receive the error:
    Error 344 Line349 Program will overwrite bootloader.
    Do you have any idea why this happens???? I’m new to Bascom and this error doesn’t appears in error list.
    Many thanks in advance
    regards

  3. My name is Piter Jankovich. oOnly want to tell, that your blog is really cool
    And want to ask you: is this blog your hobby?
    P.S. Sorry for my bad english

  4. Excellent website. Very informative & useful. Good work!!!! Going to build the RGB Pattern Generator.

  5. Hello
    I just finish the video pattern generator project and iam trying to make it work,
    I would like to make some coments:
    1. The corect position of T1 is that flat side look to internal of the pcb? [in schematic the
    connection of T1 match with this position] what is the mistake?
    2. The corect position of the voltage regulator LM7805 is the metal side look to C7
    [in silkscreen I think looks reverse],
    3.In my project the R12 is burned and i dont know why. had any other the same problem?
    4. The s2d1 is an indicator led? i dont have the right voltage there to power it up,

    • Its sound led indication.
      When you press the sound switch its ilght.
      When you turn off its sout down

  6. Thank You for Your kindness, generousity

    rich information, it was very helpfull

  7. Hello!
    I just finished AVR RGB Pattern Generator, but have problem with SYNC frequency.
    Instead of 15625 Hz i have 14880 Hz on sync out. I controlled the clock, I even made
    a 20 MHz external oscillator, but the sync output still have 14,880 Hz.
    Do you know what to do to get the right frequency on sync out (15625 Hz)?

    Thanks in advance and best regards,

    • I have exactly the same problem. Have you managed to resolve this issue? If you have, what is the solution?

      Regards

      • antonio :
        Fuse bits OK? EXTERNAL X-tal/quartz oscillator!

        I think so. Sound 1khz is Ok! Only Sync is wrong with 14,880Hz.
        Greatings, Lars.

    • Hi ! Try to change speed of clock with Quartz as close as possible to 21 Mhz. I’d had the same problem and I change a quartz with 20.8333 Mhz and now the generator works OK !
      With 14,880 Hz is the Sync too slow for cca 5% ! Now with faster quartz I get 15,500 Hz Sync wich is within 1% of tolerance to needed 15,625 Hz.

      Regards

      • i try 21mhz its dosent work same results.
        simple the project does not work with all tv
        simple fact

  8. Hello! it great project, but all pictures are black and white. Am I wrong something? Greetings: Petar

  9. Lars :
    I have the same error. Is there already a solution?

    +1 same problem. Seems this project dead and no solution provided.

    • Did you checked you’re entering a RGB signal to your TV and NOT the synchro as composite? Don’t forget the slow comutation +5 and +12 into the SCART, these tensions are used to comutate the TV into RGB mode. Normally you won’t have to PUT AV on your TV, the TV should automatically conmute to RGB.

      Regards.

      Axel.

  10. Avevo chiesto se si può mettere delle scritte su questo genaratore di colori nulla risposa ce qualcu che conosce ASM dã poter progrmmare con le scritte a piacere grazie

  11. I had asked if you can put some writings on this genarator of color nothing remarries there is someone who knows ASM to be able to program with the written as you please

  12. ciao al gruppo ho sperimentato un mire_hgi con il MC1377 per uso personale, ho utilizzato attiny2313 in uscita il segnale RGB, ho inserito del encode modularore MC1377 con entrata RGB vedi data scheet, non da il segnale del crome del 2313 posso avere piu in formazioni di aiuto del ASM. vedi qui fimato https://www.qsl.net/ik1hgi/mire/mire_hgi.mp4

    non trovo il croma in uscita

Leave a reply to Derek Leung Cancel reply