Coder Social home page Coder Social logo

ghent360 / rtd-2660-programmer Goto Github PK

View Code? Open in Web Editor NEW
95.0 13.0 39.0 124 KB

Realtek RTD2660/2662 programmer

License: BSD 3-Clause "New" or "Revised" License

C++ 27.55% C 62.40% Assembly 10.05%
lcd-controller i2c programmer rtd266x rtd2660 rtd2662 firmware-tools

rtd-2660-programmer's Introduction

Realtek RTD2660/2662 programmer

Note this project is quite old. There have been sevaral ports to different hardware or languages (in no particular order):

##Firmware programmer for LCD controllers based on the RTD2660 or RTD2662 chips.

The Realtek RTD2662 chip sometimes mislabeled as RTD2660 is found in many cheap LCD controller boards, most popular seems to be the PCB800099. In order to support different LCD panel resolutions, one has to load the "correct" firmware on the board.

If you search around the net you can find many different firmware images for this controller. I found that loading the firmware into the board was not for the weak of heart and requires some shady tools from eBay.

Here is a project how to build a programming tool for less than $15.

To build the programmer you would need a basic FX2LP device. One from amazon or ebay based on CY7C68013A would do. Install the FX2LP SDK from Cypress and use the Cypress Control Center tool to flash the i2c.iic file from the USB-I2C folder on the FX2LP device.

Many other hardware devices can be used to program the LCD controller - the protocol is based on the i2c standard.

Connect:

    FX2LP       VGA Port
    Device      Target
    ------      ---------------
    PA0    ---> Pin 15 DDC SCL
    PA1    ---> Pin 12 DDC SDA
    GND    ---> GND (choose any of the white ports, not the VGA connector itself)

You would need to power the target board from a 12V or 5V power supply.

Use the PC software to flash a .bin file to the target or to read the content of the existing flash. Saving a copy of the existing software is recommended.

The code may require some modification if your LCD controller is using different SPI flash chip to store the firmware. I've only tested this code with Winbond SPI flash chips.

Building the software:

There is a Windows PC project for visual studio 2010. Multiplatform support is pending.

The FX2LP device software needs the Keil PK51 toolchain. It is a very simple firmware that implements i2c protocol and can be commanded via USB. There is a compiled binary i2c.iic you can upload to the FX2LP device as well.

rtd-2660-programmer's People

Contributors

ghent360 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtd-2660-programmer's Issues

Python port, and native linux port for Raspberry Pi

Hello.

I've adapted your code to work with native i2c port on raspberry pi. Added cmake proj for native build for it.

Also when playing with code I've prototyped the whole of it on python and found that version more 'hacker-friendly' (since it is not necessary to have a compiler when you want to make a change).

Feel free to copy anything like ideas, snippets, etc.
(I an in 'fork' section, seems to be the only one).

RTD Programmer error with S25FS-S Family Serial flash

Dear Bernard Black and ghent360,
I am using S25FS-S Family serial flash.

rtd266x_programmer/main.cpp

Line 19 in e83f32e
static const FlashDesc FlashDevices[] = {

in ghent360 code:

static const FlashDesc FlashDevices[] = {

but this SPI flash not listed in your program. Can you please tell me how can i add this device to list , i checked the datasheet some registers are differnet but maximum are same.

Building in Microsoft Visual 2017

Building this in Microsoft Visual 2017 on windows 7 PC returns an error requiring an update to a pointer to updated SDK. This is easily fixed by simply clicking retarget solution.

Then rebuild returns an error that makes no sense seen below

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol _sprintf referenced in function "public: void __thiscall CCyUSBDevice::UsbdStatusString(unsigned long,char *)" (?UsbdStatusString@CCyUSBDevice@@QAEXKPAD@Z) rtd2660 C:\YOURFILEPATH\RTD-2660-Programmer-master\RTD Programmer\CyAPI.lib(CyAPI.obj) 1

Double clicking on this error and MV2017 cannot even find the location to correct the syntax.
control + f search of entire build for _sprintf returns no results.

How do I correct a syntax error that doesn't exist?

(Obviously change YOURFILEPATH to your file path to get to the folder)

Potencial stack overflow issue

In ReadReg:

uint8_t result;
ReadBytesFromAddr ( reg, &result, 1 );

in ReadBytesFromAddr ( uint8_t reg, uint8_t * dest, uint8_t len ):

...
ReadBytes ( dest ); // = which is & of local uint8_t result

in static void ReadBytes ( uint8_t * dest ):

uint8_t buf[64];
LONG buflen = sizeof(buf); // i.e. 64
...
memcpy ( dest, buf, len ); // 64 bytes from buf into 1-byte local uint8_t result, placed in ReadReg.

Other words, you've just copied 64 bytes into the local variable (result) (allocated at stack) sized 1 byte.

port for arduino

hiya, i did a port for arduino - i had been using the $75 standalone programmers (they can store the BIN in a flash chip for untethered programming but requires win XP). using an arduino compat+SD card is way superior!

https://github.com/adafruit/Adafruit_RTD266X_I2CFlasher

works great, and am compiling some custom RTD firmware, with success so far. thanks for the i2c code :) life is ๐Ÿ’ฏ

RTD2668 support

Please consider adding RTD2668 support (for example for boards from ebay known as: PCB800116 or VS-TY2668-V1).

Not sure if that's feasible though. RTD2668 seems to be using UART interface for programming.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.