Difference between revisions of "Koryuu"
(Add notes and tips specific to the Olimex AVR-ISP-MK2 programmer.) |
m (Add a missing paren) |
||
Line 137: | Line 137: | ||
* [https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/open-source-hardware Olimex AVR-ISP-MK2] | * [https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/open-source-hardware Olimex AVR-ISP-MK2] | ||
− | ** NOTE: most likely requires a separate purchase of a 10-to-6-pin ICSP cable or adapter (such as [https://www.sparkfun.com/products/9215 this (Sparkfun)] or [https://www.digikey.com/short/t47b42vz this (Digikey, Olimex branded)], as one is reported '''not''' to be supplied with the programmer itself. | + | ** NOTE: most likely requires a separate purchase of a 10-to-6-pin ICSP cable or adapter (such as [https://www.sparkfun.com/products/9215 this (Sparkfun)] or [https://www.digikey.com/short/t47b42vz this (Digikey, Olimex branded)]), as one is reported '''not''' to be supplied with the programmer itself. |
** For some tips specific to this programmer, please see [https://imgur.com/a/WJbyjcP this album]. | ** For some tips specific to this programmer, please see [https://imgur.com/a/WJbyjcP this album]. | ||
* Sparkfun's [https://www.sparkfun.com/products/9825 Pocket AVR Programmer] + [https://www.sparkfun.com/products/9215 AVR Programming Cable] | * Sparkfun's [https://www.sparkfun.com/products/9825 Pocket AVR Programmer] + [https://www.sparkfun.com/products/9215 AVR Programming Cable] |
Revision as of 15:33, 28 March 2021
Contents
- 1 Introduction
- 2 Power
- 3 AV Inputs
- 4 Output
- 5 Buttons and controls
- 6 Status LEDs
- 7 Saving settings
- 8 Other connectors
- 9 Known issues / limitations
- 10 Firmware Upgrade
Introduction
Koryuu is an affordable composite and S-Video to component video transcoder/converter designed by Ari Sundholm (megari).
Designed particularly with OSSC users in mind, Koryuu can be connected to the AV2 input on the OSSC to add composite and S-video compatibility. It can also be used as a general purpose transcoder for CRT displays.
The device is compatible with many flat panel displays too, but since the Koryuu does not upscale or deinterlace, it is usually best to combine it with a scaler or line doubler, such as an OSSC, in this situation.
Currently, the device has open source firmware. The PCB, case design and detailed schematics are not public at the moment, but sufficient technical information required for firmware development will be made available. There is an intention to eventually make the design files public, but the time frame has not been decided on yet.
Specifications
- Designed for use with OSSC, no additional transcoder/converter required
- Composite and S-Video in, Component video out
- 7.5 IRE option
- PAL 60 supported
- Firmware updatable (requires USB Asp or similar programmer)
- Uses the same PSU as OSSC, no chance of mixing them up and damaging either unit
- Plexiglass enclosure
- Connect Composite and S-Video at the same time, no problems
- Option button for additional features added in future firmware updates.
Availability
Pre-assembled units and accessories are available from VideoGamePerfection (EU).
More information & discussion
Power
Koryuu uses the same 5 volt power supply as OSSC. The specifications are as follows:-
DC 5 Volt output with at least 1 Amp current. The tip must be 2.1 x 5.5mm and center positive.
Do not use a power supply rated for AC output, or a power supply rated higher than 5 volts DC, doing so can damage the Koryuu.
AV Inputs
Koryuu has two AV inputs. The currently selected input can be selected by pressing the input change button, which is the button on the right of the unit. The input signal can be 240/288p or 480/576i (NTSC/PAL).
Composite video
The yellow RCA connector on the front of the unit on the left hand side accepts a standard composite video (CVBS) signal suppled by a single RCA cable. Both PAL and NTSC formats are supported.
S-Video
A S-Video device outputting a separate luma and chroma signal can be connected to the S-video input using a standard S-video cable. Both PAL and NTSC formats are supported.
Output
Koryuu has a single component video output. The device does not scale, deinterlace or affect frame rate, so whatever signal goes in will be transcoded and output via the component video out. The device has no frame buffer so no input lag is added.
Buttons and controls
The device has two buttons on the front of the unit and a power switch. The power switch simply toggles the unit off and on.
Input Change button
By pressing the input change button (see the image above) the user can cycle through the active inputs. There are currently four input modes:-
- Composite video (CVBS)
- Composite video + pedestal (7.5 IRE mode)
- S-Video (YC)
- S-Video + pedestal (7.5 IRE mode)
When powered on, the Koryuu defaults to input mode 1. Press the Input change button to cycle through the available modes. When in mode 4, pressing the input change button again will cycle back to mode 1.
7.5 IRE mode may be required for certain sources (e.g video cassettes). If the picture is too light, try 7.5 IRE mode.
Option button
The option button is for future firmware updates and features and as of firmware 1.0 it applies a smoothing/blur filter however this effect is not correctly implemented.
Status LEDs
The Koryuu Transcoder has four LED (light emitting diodes) that illuminate to indicate various modes of operation. In the picture above we can see the location of these LEDs.
Power LED – This LED will illuminate green whenever the Koryuu is powered on.
Option LED – This LED will illuminate red whenever the Koryuu’s option mode is enabled. This is expected to be utilised in future firmware revisions.
Input mode LEDs – There are two LEDs located at this position. When the unit is in composite video input mode, the bottom LED will illuminate red. When the unit is in S-Video input mode, the top-most LED will illuminate green.
Saving settings
Saving settings is supported as of firmware 1.1. To save current settings, press the INPUT_CHANGE and OPT buttons simultaneously. After hitting the button combo successfully, the Koryuu's LEDs flash a few times.
The following settings are saved:-
- Default input (Composite/S-Video)
- Default input pedestal setting (on/off, corresponding to NTSC-M/J)
- Smoothing (on/off)
Other connectors
J5 – Serial connector for capturing debugging information and development. J5 is located just to the right of the component video output when viewing the unit from behind.
J3 – This connector can be used with suitable USP ASP programmers to load new firmware (see the picture in the firmware upgrade section for pin orientation). The pin-out for this connector is as follows.
Known issues / limitations
- (Firmware version 1.0 only) Interlaced signal field reversal – Intermittently, the Koryuu will reverse the fields in an interlace signal (odd field will be switched with the even field).
- This can cause compatibility issues with the OSSC or other undesirable effects on CRT displays. Usually, power cycling the unit or switching to a different input will cure the problem.
- The issue is believed to have been resolved in firmware version 1.1.
- (Firmware version 1.0 only) Interlaced-to-progressive transitions malfunction – Intermittently, when the input signal changes from interlaced to progressive scan or vice versa, the output signal may be unusable for the OSSC.
- May be related to the previously-mentioned issue.
- This can cause compatibility issues with the OSSC. Usually, power cycling the unit or switching to a different input will cure the problem.
- The issue is resolved in firmware version 1.1.
- Nonstandard or unstable color subcarrier may cause loss of color in output video – If the color subcarrier is nonstandard in terms of frequency and/or amplitude, the Koryuu may be unable to lock onto it. If the subcarrier is weak or unstable, colors may have glitches or the output video may flicker between a colored and a monochrome picture.
- It is under investigation if anything can be done about this.
Firmware Upgrade
The current release firmware is version 1.1 and comes pre-flashed on all Koryuu’s sold on or after 15/03/21.
New firmware versions can be downloaded from the page here.
To program new firmware, a USB ASP programmer is required.
Recommended Programmers
- Olimex AVR-ISP-MK2
- NOTE: most likely requires a separate purchase of a 10-to-6-pin ICSP cable or adapter (such as this (Sparkfun) or this (Digikey, Olimex branded)), as one is reported not to be supplied with the programmer itself.
- For some tips specific to this programmer, please see this album.
- Sparkfun's Pocket AVR Programmer + AVR Programming Cable
- USB ASP programmer
- USB drivers for Windows are available here
Prerequisite Requirements
- Koryuu transcoder and PSU
- Suitable AVR ASP/ISP programmer (see above)
- Ribbon cable and, if applicable, a 10 to 6 pin adapter for the ICSP header.
- A computer with Windows 7/8/8.1/10 with a USB port
- Compiled Firmware file
Note - Firmware needs to have been flashed before the unit is functional. If powered up without firmware, only the PWR LED next to the power switch will light up. This will simply indicate that the unit is receiving power, but tells nothing else. All units sold by VideoGamePerfection.com come with firmware pre-flashed.
Hardware setup
To avoid damage, the programmer must be set at 5V logic high level, with no power supplied to the Koryuu by the programmer (target mode off). These settings are usually configurable through jumpers on the programmer itself. The exact location varies depending on the model. Usually the jumpers are labeled according to their function. Sometimes there is a need to open up the casing of the programmer to access these jumpers.
1. Connect the USB programmer to the PC.
2. Connect the ribbon cable and adapter (if one is needed) to the programmer.
3. Connect the other end of the ribbon cable to the Koryuu transcoder via the header shown in the picture below. Pin 2 is voltage or VCC so orientate the ribbon cable accordingly. Double-check this before proceeding.
4. Check again the orientation of the ribbon cable. Pin 2 is voltage and must match pin 2 as shown on the picture above.
5. Power on the Koryuu transcoder.
6. If needed, install the driver for your programmer. If you are not sure if you have an appropriate driver installed or how to install one, see the Software setup section for details.
7. Start your programmer software. If you do not have one installed yet, see the Software setup section for instructions for one such software.
8. Flash the new firmware image using your programmer software. If you are not sure how, see the Software setup section for instructions how to do this with a particular piece of software.
The Koryuu is now updated.
Software setup (Windows 7/8/8.1/10)
This section walks us through setting up the drivers and software needed to update the firmware on your Koryuu.
There are two pieces of software required:
Install driver using Zadig
First, we need to install Zadig, which is a nifty piece of software for installing drivers for most kinds of ISP/ASP programmers. Simply point your web browser to [1], find the link labeled Download and save the executable file on your desktop (or whichever location you prefer).
You may now plug your programmer into one of the USB ports on your computer, if you have not done so already. Please see the Hardware setup section for more details.
Then, run the executable you saved previously. If an elevation (UAC) prompt pops up, accept it to continue.
The Zadig window should initially look like this:
The type of your programmer may already be shown in the selection box, as in the image above (AVRISP mkII). If it is not, and you are sure it is connected, select the correct programmer from the list. Tick Options->List All Devices to show all supported devices if none show up.
Then you should choose a driver. For our purposes, selecting either the 'libusbK' or 'libusb-win32' driver should be a safe bet, the former having somewhat higher performance than the latter. Click Install Driver.
Once the installation is finished, you should see a dialog stating so.
Finally, you should see something similar to this, indicating that you now have a proper driver set up for your programmer.
The driver setup is now complete. You may now close Zadig.
Install and run AVRDUDESS
Open the AVRDUDESS web page in your web browser and download the portable version of AVRDUDESS, which does not require any particular installation, other than extracting the archive.
Extract the archive to a location of your choosing and then open said location if Windows does not do that for you. There may be more than one file labeled Application. Choose the one with a distinct icon, named avrdudess or avrdudess.exe, and run it by double-clicking it.
At this point you may get a Windows protected your PC box, warning that you attempted to run an unrecognized program:
This is normal, and you should click More info, which makes a button labeled Run anyway appear. Click it.
Next, if you have not run any .Net applications before, Windows may prompt you to install the .Net Framework.
This is completely normal and safe, so allow Windows to install it. This may require accepting another elevation prompt. After the installation is done, you can try opening AVRDUDESS again.
Flash the firmware update using AVRDUDESS
Now we are ready to flash the new firmware. If you do not have AVRDUDESS open yet, open it now. The AVRDUDESS window may look a bit daunting, but fear not! We will walk through the entire process step by step.
First, select the correct kind of programmer for your device from the top-left selection box.
Then select the appropriate port. The port is probably going to be one of usb or COM1, but you can try each option until you find the correct one, or type the correct one in the selection box.
Try detecting the Koryuu on-board MCU using the Detect button. It should come up as ATmega328P.
If not, select ATmega328P manually.
Within the part of the window labeled Flash, enter the path to the Koryuu firmware image or select it using the file picker dialog. Select Write on the radio selector and either Auto or Intel Hex as the format. Then click Go.
If everything went well, you should see a message like so. Please make sure that the verification part is successful. If it was successful, you are done. The Koryuu is now updated.
If you get a failure, such as the one below, make sure all cables are plugged correctly and the settings are as described in the Hardware setup section. Also, try to make sure nothing (such as a high-priority process using a lot of CPU) is disrupting the flashing process, as it is somewhat timing-sensitive. Then try clicking Go again.
Alternative software setup (Windows XP and newer)
If you have a programmer based on the open-source USB ASP design, there is an alternative software setup, using the Khazama AVR Programmer software and a driver specific to this type of programmer. This type of programmer tends to be affordable and widely available from multiple vendors.
Specific requirements
- A programmer based on the USB ASP design.
- USB drivers for the ASP programmer
- Windows drivers are available here
- Khazama AVR Programmer software (direct download link)
Note - Firmware needs to have been flashed before the unit is functional. If powered up without firmware, only the PWR LED next to the power switch will light up. This will simply indicate that the unit is receiving power, but tells nothing else. All units sold by VideoGamePerfection.com come with firmware pre-flashed.
Before proceeding, please make sure you have carefully read the Hardware setup section.
Install Khazama and the driver
1. Download and install the Khazama AVR Programmer software to your PC
2. Connect the USB ASP programmer to the PC
3. If you have never used the programmer on your PC before, install the drivers from this link. If you need help with this, see this page. Scroll down to the heading "Best & Easy method" and follow the instructions from there
Update the Koryuu firmware
1. Double-check that your hardware setup is correct: logic level, cables properly plugged in, the ribbon cable oriented correctly on both ends. If you are unsure, please review the Hardware setup section.
2. Power on the Koryuu transcoder.
3. Start the Khazama AVR Programmer software. The program window shown below should appear.
4. On the drop down box under "AVR:" ensure that the correct AVR is selected. ATMEGA328P is the AVR in our recommended programmer.
5. Open the file menu and choose "Load FLASH file to buffer". Using the standard Windows file requester, navigate to the hex file containing the firmware, click on it and choose "Open".
6. Open the command menu and choose "Write flash buffer to chip". A successful programming should only take a second or two.
Note – On some PCs you may see a message that says "Error setting USBASP ISP Clock". This can safely be ignored (just click on OK to dismiss it).
The Koryuu is now updated.
Firmware Revision History
Version 1.0 – Release - Original firmware shipped with Koryuu.
Version 1.1 – Release - Bug fixes and other changes. Settings can now be saved. Improved robustness of video chip initialization, video mode changes and tracking of current video mode. Transitions between interlaced and progressive video modes should no longer cause trouble with the OSSC. Added -ntp firmware variant (No Test Pattern), which disables video output when there is no input signal on the currently selected input.