New Koryuu test firmware 1.1-test1

NewHome Forums Koryuu Transcoder New Koryuu test firmware 1.1-test1

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #42585
    megari
    Participant

    A new test version of the Koryuu firmware has been released.

    Please see the release notes and download the firmware images here: Koryuu test firmware 1.1-test1

    #43466
    aotta
    Participant

    Thank you megari for the improvements to the FW, i tried to update my Koryuu with my TL899 programmer (i use it with other ATMEGA328P devices, like Arduino’s) but with no success. Waiting for the usb programmer ordered in next days to make further test.
    In the meanwhile, i wonder if is possible to change the component output from YPbPr to PrPbY as option: i bought Koryuu for working in side to OSCC, and found in a blog that they could be connected by male to male rca adaptor, but obviouvsly it’s not possible because red and blue connector are inverted when Koryuu and OSSC are connected directly. From a quick look at source code, and without schematics, i can’t understand if the RCA are hardcoded or they could be swapped by firmware, can you give us some more info?

    #43504
    megari
    Participant

    Hi @əotta,

    Are you referring to the Minipro TL866 (or some variation thereof), by any chance? I could not find anything relevant when searching for TL899. I have not tried using that particular line of programmers for flashing the Koryuu. If you can get a connection to the 6-pin ICSP header, then it should be theoretically possible. There are a few caveats, though: 1) The logic level must be 5V, and 2) the programmer should not attempt to provide power to the Koryuu (“target mode” off), lest something burns out.

    During programming, the Koryuu needs to be switched on and be powered by its own PSU.

    What software do you usually use to program your atmega328p boards with when using the programmer you mentioned?

    As for the ordering of the component outputs, through a firmware update or other programmatic means, it is only possible to swap R/B or Pr/Pb to B/R or Pb/Pr, IIRC, due to the way the DACs are assigned internally within the encoder. It is unfortunate that there is most likely no further flexibility offered by the video encoder chip. I’ll try to find the time to recheck and confirm this, though.

    #43511
    aotta
    Participant

    Thank you @megari for the help and for your great FW and, yes, i mistyped the programmer’s name, i used the TL866A and TL866 II, powering the board with only it’s psu and by the ICPS vcc line (it gives 5V) only too, with its own programming tools. I checked the wiring connection with the Wiki’s pictures, but the programmer didn’t recognize the ATMEGA328P chip. It worked fine everytime with Arduino’s board, but tomorrow it should arrive the new usbasp programmer i bought for a few euros, so i’ll be able to do further test: I can’t look to use the new “save settings” option!

    For the Y to Pr swapping, i supposed it was not only a software quest, so i’ll continue using cable (or Male to Male adaptors, flipping the Koryuu top-down, it worked but it looks not very nice! 😉

    And, about the “ugly” smoothing, i think it’s useful in some situation (for example, it reduces the artifacts in some solid colour i found with commodore’s and atari’s 8 bit) but the text are less readeable: it will be useful to smooth only “near” colours, and leave more sharp when pixel’s colours are more different!

    Edit for update: tested with new USBISP programmer, but no luck: failing initialization, can’t enable chip, etc.. error with ProgISP and khazama i get.
    Other strange thing, when connected to PSU, i get 5.28v on pin 2 of ASP port even if power toggle is off! is it normal or the board i get has something wrong?

    #43609
    aotta
    Participant

    i made further test with multimeter, and found the reset pin in ATMEGA328P is always high (3.28V): are the board sold by videogameperfection burned with RSTDSBLD, so they can’t be updated??

    #43620
    megari
    Participant

    Hi @aotta, that should not be the case. The intention has always been that the user can upgrade the firmware. Unless there’s been some mistake at the factory, the RESET pin should not be disabled.

    The RESET pin having a high logic level is normal, as it is supposed to be pulled down. When RSTDSBLD is programmed, PC6/RESET/PCINT14 will be an input pin, so it should actually not be supplying any power (“Hi-Z” or “tristate” mode), unless a pull-up is explicitly enabled for it.

    Can you try grounding the RESET pin through a resistor somewhere in the 1 kOhm to 10 kOhm range? The pull-ups on the pin are supposed to be about 50 kOhm, so that should be enough to pull it to ground. If, however, the pin remains high, then there is something sourcing current, actively pulling it up. That would indicate something being seriously wrong.

    Apart from a faulty unit, the only thing I can think of is, are you sure that you have plugged the programming cable the correct way around? If it is plugged the wrong way around, the RESET pin ends up being pulled high both by the programmer’s VCC as well as the MCU itself.

    Yes, ICSP pin 2 being always powered is normal. Pin 2 (programmer VCC) intentionally bypasses the power switch to provide a logic level reference, and is separated from the rest of the power planes on the PCB, so whenever the PSU is connected, pin 2 has a high logic level.

    #43621
    aotta
    Participant

    Thank you @megari for the info and the hints, but I’m not sure how to proceeded.. Isp pin 5 (reset) seems connected to pin 5 of LSF 204, and its pin 10 goes to atmega’s reset pin: programmer pulse low right the isp pin, but ic’s pins remain high (2.89v). So, where could I add the resistors?
    I’m pretty sure my cable connection it’s right, I checked the continuity on isp connection, and my programmers work fine with all my uno and mega arduino boards, so I’m afraid my koryuu has something wrong. I ordered a couple of.atmega328p, but i’d leave the ic replacement as last chance.

    UPDATE: i desoldered Atmega328P pin 29 (Reset) and… Koryuu still works fine, so the reset pin was disabled by factory (or, i think, the Koryuu had to stay always in reset state and never start)

    #43638
    megari
    Participant

    Thank you @megari for the info and the hints, but I’m not sure how to proceeded.. Isp pin 5 (reset) seems connected to pin 5 of LSF 204, and its pin 10 goes to atmega’s reset pin: programmer pulse low right the isp pin, but ic’s pins remain high (2.89v). So, where could I add the resistors?
    I’m pretty sure my cable connection it’s right, I checked the continuity on isp connection, and my programmers work fine with all my uno and mega arduino boards, so I’m afraid my koryuu has something wrong. I ordered a couple of.atmega328p, but i’d leave the ic replacement as last chance.

    I see. I can confirm that the following is correct:

    • ICSP pin 5 (/RESET) is connected to LSF0204 pin 10
    • LSF0204 pin 5 is connected to atmega328p pin 29 (/RESET)

    So you definitely do have the RESET line set up correctly. What is a bit odd is that 2.89V is a bit low for high logic level (nominal 3.3V). The pull-ups on the MCU should not be able to keep the voltage that high if something is actively pulling the /RESET line low. I wonder if a longer pulse width might help. Anyway, something is definitely wrong here.

    As for trying to pull the /RESET line low by grounding it through a resistor, you can do that by connecting the /RESET and GND pins in the ICSP header together. Using a resistor in the single-kOhms range is just a precaution. Due to the pull-up resistor in the MCU being expected to have a high Ohm value, the current should be negligible even when shorting /RESET and GND. However, we’re investigating something suggesting a potential malfunction in the /RESET line, so maybe best be careful…

    UPDATE: i desoldered Atmega328P pin 29 (Reset) and… Koryuu still works fine, so the reset pin was disabled by factory (or, i think, the Koryuu had to stay always in reset state and never start)

    That is not quite accurate, I’m afraid. When the the /RESET pin is not disabled, it has an internal pull-up resistor active due to an override within the chip. Please see atmega328p datasheet section 13.3, “Alternate Port Functions”. The tables are a bit technical and not the easiest to interpret, but it will help to remember that RSTDISBL is 1 when unprogrammed (the default), 0 when programmed.

    Anyway, at this point it does seem that something is wrong with your unit. It would be interesting to know if replacing the MCU fixes the issue, if you’re willing to try it.

    #43753
    aotta
    Participant

    @megari, i made my homework: desoldered AVR and replaced with a pre-programmed (i took it from an arduino nano) atmega328p, and it worked but still no ISP programming.
    In desoldering, i lift a IC’s pad (the pin26 – PC3): Koryuu seems to work fine, but since there is no schematic, can you tell me the right connection, so i can repair it?
    So, i try a different way: i bypassed the LSF0204 and directly connected the MISO, MOSI and Reset from ISP port to AVR: Avrstudio and MKII find the AVR and i could program it!
    Now i’ve 3 small green wires flying under the Koryuu’s shell, but it finally can be update!
    May be my LSF0204 is gone? I found in a Texas Instruments’ datasheet that pins 6 and 9 are not connected in TSSOP 14 pin LSF0204, while in Koryuu they are used.. could it be related to my issue?
    Thank you for your support!

    #43762
    megari
    Participant

    @aotta Thank you for your efforts in troubleshooting this. It does indeed look like your LSF0204 (designation U2) is not working. Bypassing it is perfectly fine, although it is preferable to use a 3V3 logic HIGH level [1].

    PC3 (pin 26) is not connected to anything, so no harm was done there, fortunately.

    May be my LSF0204 is gone? I found in a Texas Instruments’ datasheet that pins 6 and 9 are not connected in TSSOP 14 pin LSF0204, while in Koryuu they are used.. could it be related to my issue?

    Pins 6 and 9 in the 14-TSSOP package LSF0204 are indeed not connected internally. However, those two pins are not used in the Koryuu. The other pins are used as follows:

    • Pin 1: 3V3 IO voltage reference
    • Pin 2: 3V3 MISO
    • Pin 3: 3V3 MOSI
    • Pin 4: 3V3 SCK
    • Pin 5: 3V3 /RESET
    • Pin 7: GND
    • Pin 8: EN (connected to 3V3, so always enabled)
    • Pin 10: 5V /RESET
    • Pin 11: 5V SCK
    • Pin 12: 5V MOSI
    • Pin 13: 5V MISO
    • Pin 14: 5V I/O voltage reference

    All the 3V3 pins are connected to the MCU, while the 5V pins are connected to the ICSP header.

    Thank you for your support!

    Thank you for your efforts! You have been very patient while remotely troubleshooting this kind of a frustrating problem.

    I wonder if you could check one more thing for me, please? I’d like to see a photo of the LSF0204 chip that was used on the board, or alternatively, know all the markings on said chip. That would be helpful in ascertaining that there isn’t a wider problem.

    I have been intending to release somewhat simplified schematics and other technical information helpful for firmware development for quite a long while now, but this year has not been nice (to say the least), delaying these plans.

    [1] The atmega328p is tolerant to 5V logic, but there may be issues in the long term due to the extra voltage causing current through protection diodes to GND and/or VCC. Due to this, all pins except /RESET have an absolute maximum rating of VCC + 0.5V, with VCC equal to 3V3 here.

    #43765
    aotta
    Participant

    The lsf204 code is unreadeable after flush, hot gun, and EPA cleaning.. From a pic I got before working on it, it seems a TI (from the logo) LSF204 97A33 P1FC. Thank to your pinout, i removed the Lsf204 at all and rewired isp’s pins to input pads. I programmed the avr without the psu, and it worked too, with avr studio tools reporting 3.3v in reading voltage.. I hope it’s safer in this way.

    #43767
    megari
    Participant

    @aotta I am glad you got the board working despite the logic level translator most likely being defective. This is the first time I have encountered this problem, and just tried a Koryuu from the same batch, finding that programming through the ISP header and the LSF0204 works fine.

    Thank you for deciphering the chip markings. I’ll do some checks.

    #43772
    aotta
    Participant

    @megari, now i can play with FWs, i’ve a question about FW1.1 t1: i tested both “normal” and “ntp” versions, but i got the coloured vertical bars with ntp one’s too. Is it not the version without output if no input signal? i missed something?
    Thank you for your patience and support!

    Edit: and, for curious guys, the result of my Koryuu surgeon: https://imgbox.com/PsVK3MXM

    #43792
    megari
    Participant

    @megari, now i can play with FWs, i’ve a question about FW1.1 t1: i tested both “normal” and “ntp” versions, but i got the coloured vertical bars with ntp one’s too. Is it not the version without output if no input signal? i missed something?

    Hmm, that’s weird. I’ll try and see if there’s a bug somewhere. Just to confirm we are on the same page, could you check the sha256sum or sha1sum of the .hex files you used, please? That may help me to pinpoint the exact version of the source code they were built from, just in case I made some mistake when building them.

    Edit: and, for curious guys, the result of my Koryuu surgeon: https://imgbox.com/PsVK3MXM

    Well done saving the unit from becoming e-waste just because of such a tiny component being faulty!
    I guess the original atmega328p was OK as well? You’ll be able to save your Arduino Nano then! 🙂

    (BTW, if you do not want your saved settings in EEPROM to be wiped every time you program a new firmware, it’d be best to program the EESAVE hfuse. Just be very careful to get it right.)

    #43798
    aotta
    Participant

    i can compute che checksum if you want, but i didn’t compile myself the hexes files, i used the one zipped in your github files koryuu-fw_1.1-test1.zip. Setting are stored when stored with both buttons, and parameters to set aren’t so much to need the eesave fuse, i think. Anyway, i used fuse setting found in other forum: H:D1, L:62, E:FF.
    About the original AVR, now i’m pretty sure it was fine, but i damaged a couple of pins while desoldering, so it went to e-trash with the arduino nano board… anyway, it was a five euros clone, so it wasn’t a great lost.

Viewing 15 posts - 1 through 15 (of 32 total)
  • You must be logged in to reply to this topic.