Re: LCD screen for your dockstar (cheap! <$5) February 16, 2012 12:01PM |
Registered: 13 years ago Posts: 78 |
Quote
user=dpffan
Since the dockstar doesn't have buttons, I want to 'borrow' the buttons from the Parrot to serve as input.
Will probaby need some glue code/shell script .
dpffan
Re: LCD screen for your dockstar (cheap! <$5) February 17, 2012 08:35AM |
./button-input; echo $? | nc 172.16.61.3 3333
echo $(nc -lp 3333)
Re: LCD screen for your dockstar (cheap! <$5) March 02, 2012 09:27PM |
Registered: 12 years ago Posts: 2 |
cougarten
Re: LCD screen for your dockstar (cheap! <$5) March 04, 2012 10:28AM |
Re: LCD screen for your dockstar (cheap! <$5) March 04, 2012 10:33AM |
Registered: 13 years ago Posts: 261 |
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 05, 2012 03:08AM |
Patalhetas
Re: LCD screen for your dockstar (cheap! <$5) March 06, 2012 03:25PM |
justmad
Re: Project : DS indicate the next train of my station March 08, 2012 03:00PM |
Re: LCD screen for your dockstar (cheap! <$5) March 13, 2012 12:59PM |
Registered: 13 years ago Posts: 22 |
svn co https://dpf-ax.svn.sourceforge.net/svnroot/dpf-ax dpf-ax
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 13, 2012 10:24PM |
> svn co > https://dpf-ax.svn.sourceforge.net/svnroot/dpf-ax > dpf-ax >>
restore.py fw_<your DPF type>.bin -f
headers: ax206.h ax206.inc ili9163.h ili9320.h otm3225.h otm3225.inc
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 13, 2012 11:04PM |
> headers: ax206.h ax206.inc ili9163.h ili9320.h > otm3225.h otm3225.inc >I found config.h, this is the equivalent/replacement in ver2.0develop for profiles.py from the earlier version?
define LCD_CONTROLLER_ILI9163B define LCD_CONTROLLER_ST77XX define LCD_CONTROLLER_OTM3225 define LCD_CONTROLLER_ILI9325But the header file for ST77XX is missing from source. though a strings command on lcd.lib revealed lcd_st77xx_init.rel.
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 14, 2012 12:50AM |
> define LCD_CONTROLLER_ILI9163B > define LCD_CONTROLLER_ST77XX > define LCD_CONTROLLER_OTM3225 > define LCD_CONTROLLER_ILI9325 >I think I figured it out, edit this line in Makefile
ifndef TYPE TYPE = white endifto match the DPFMODEL definition in config.h
#if defined (DPFMODEL_white) # define LCD_128x128 # define LCD_CONTROLLER_ILI9163B # define LCD_ORIENTATION_RGB RGB_DOWN # define BUTTON_SWAP # define DEFAULT_ORIENTATION ROT_UPPending hackfin's upload of restore.py, I'll try this out soon.
Re: LCD screen for your dockstar (cheap! <$5) March 14, 2012 06:04AM |
Registered: 13 years ago Posts: 22 |
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 14, 2012 07:49AM |
?ASlink-Warning-Cannot open library module ./T 02 9F 00 00 00 8D 00 00 01 74 09 2A F8 86 03 74.rel ?ASlink-Warning-Cannot open library module ./R 00 00 00 16 F1 21 02 00 03 F1 21 06 00 03.rel ?ASlink-Warning-Cannot open library module ./T 02 A9 0A 2A F8 86 04 8C 05 E4 FC FE EB 42 04 EE.reland similiar errors. I messed with bootstrap.lnk , Makefile and attempted to resolve these but to no avail.
Re: LCD screen for your dockstar (cheap! <$5) March 14, 2012 08:51AM |
Registered: 13 years ago Posts: 22 |
Re: LCD screen for your dockstar (cheap! <$5) March 14, 2012 01:23PM |
Registered: 12 years ago Posts: 3 |
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 14, 2012 07:44PM |
Found AX206 DPF (bootloader) Erase full flash... Reading USB: Resource temporarily unavailable Traceback (most recent call last): File "fw/restore.py", line 32, in <module> flash_restore(d, data) File "fw/restore.py", line 12, in flash_restore d.eraseFlash() # erase full flash SystemError: 146:(ffffff92): Unknown errorSeems like the 25Q80SCP that my ax206 dpf used is not supported. The openschemes folks have extended Windows's ProgSPI flashlib.ini with its definition. I guess I need to do the same for dpf-ax?
Re: LCD screen for your dockstar (cheap! <$5) March 15, 2012 03:10AM |
Registered: 13 years ago Posts: 22 |
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 15, 2012 07:18AM |
Found AX206 DPF (bootloader) Manufacturer: Apple Size : 1 MB Erase full flash... Flashing sector 0... Flashing sector 1... Executing applet..
Re: LCD screen for your dockstar (cheap! <$5) March 15, 2012 07:50AM |
Registered: 12 years ago Posts: 3 |
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 15, 2012 08:38AM |
grep lcd_ot_setorientation * init.c: lcd_ot_setorientation(which); lcd.h:void lcd_ot_setorientation(unsigned char which); Binary file lcd.lib matches
grep lcd_ili_setorientation * init.asm:; init.c:114: lcd_ili_setorientation(which); init.asm: lcall _lcd_ili_setorientation init.c: lcd_ili_setorientation(which); init.lst: 918 ; init.c:114: lcd_ili_setorientation(which); init.lst: 00C1 12s00r00 921 lcall _lcd_ili_setorientation init.rel:S _lcd_ili_setorientation Ref0000 init.rst: 918 ; init.c:114: lcd_ili_setorientation(which); init.rst: 12C1 12 00 00 921 lcall _lcd_ili_setorientation init.sym: _lcd_ili_setorientation **** GX lcd.h:void lcd_ili_setorientation(unsigned char which); main.map: 0C:0000 _lcd_ili_setorientation main.map:?ASlink-Warning-Undefined Global '_lcd_ili_setorientation' referenced by module 'init'lcd.lib is missing the definition for lcd_ili_setorientation.
Re: LCD screen for your dockstar (cheap! <$5) March 15, 2012 08:51AM |
Registered: 13 years ago Posts: 22 |
Re: LCD screen for your dockstar (cheap! <$5) March 17, 2012 06:07AM |
Registered: 12 years ago Posts: 365 |
Re: LCD screen for your dockstar (cheap! <$5) March 18, 2012 04:28AM |
Registered: 13 years ago Posts: 22 |
Re: LCD screen for your dockstar (cheap! <$5) March 18, 2012 06:52AM |
Registered: 12 years ago Posts: 365 |
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 18, 2012 08:33PM |
// API #if LCD_WIDTH != LCD_HEIGHT # if (DEFAULT_ORIENTATION == ROT_RIGHT) || (DEFAULT_ORIENTATION == ROT_LEFT) # define disp_blit MANGLE2(_INTERNAL_TAG, landscape, blit) # else # define disp_blit MANGLE2(_INTERNAL_TAG, portrait, blit) # endif #else # define disp_blit MANGLE(_INTERNAL_TAG, blit) #endif #define init_sequence MANGLE(_INTERNAL_TAG, initseq) void disp_blit(void); extern __code unsigned char init_sequence[];What is the structure of init_sequence values?
const BYTE ILI9341_init[] = { 23, // 23 parameter sets 3, INTERFACE_CONTROL, 0x01, 0x01, 0x00, 3, UNDOCUMENTED_0xEF, 0x03, 0x80, 0x02, 3, POWER_CONTROL_B, 0x00, 0xF2, 0xA0, 4, POWER_ON_SEQUENCE_CONTROL, 0x64, 0x03, 0x12, 0x81, 5, POWER_CONTROL_A, 0x39, 0x2C, 0x00, 0x34, 0x02, 2, DRIVER_TIMING_CONTROL_B, 0x00, 0x00, 3, DRIVER_TIMING_CONTROL_A, 0x85, 0x10, 0x7A, 1, POWER_CONTROL_1, 0x21, //VRH[5:0] 1, POWER_CONTROL_2, 0x11, //SAP[2:0];BT[3:0] 2, VCOM_CONTROL_1, 0x3F, 0x3C, 1, VCOM_CONTROL_2, 0xC6, // 0xD2 1, PIXEL_FORMAT_SET, 0x55, 1, MEMORY_ACCESS_CONTROL, 0x08, 2, FRAME_RATE_CONTROL, 0x00, 0x1B, 2, DISPLAY_FUNCTION_CONTROL, 0x0A, 0xA2, 1, ENABLE_3G, 0x00, // 3Gamma function disable 1, GAMMA_SET, 0x01, // Gamma curve selected 15, POSITIVE_GAMMA_CORRECTION, 0x0f, 0x24, 0x21, 0x0F, 0x13, 0x0A, 0x52, 0xC9, 0x3B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 15, NEGATIVE_GAMMA_CORRECTION, 0x00, 0x1B, 0x1E, 0x00, 0x0C, 0x04, 0x2F, 0x36, 0x44, 0x0a, 0x1F, 0x0F, 0x3F, 0x3F, 0x0F, 0, WRITE_MEMORY, 0, SLEEP_OUT, // exit sleep 0xFF, 120, // delay 120msec 0, DISPLAY_ON // display ON };Are there any ways to identify LCD drivers for unsupported ones? Thanks for your effort.
Re: LCD screen for your dockstar (cheap! <$5) March 19, 2012 03:26AM |
Registered: 13 years ago Posts: 22 |
#include "mylcd.h" // These are the register defines of your LCD #include "lcduser.h" #pragma codeseg LCDAUX #pragma constseg LCDAUX __code unsigned char mylcd_initseq[] = { CMD_CS, CMD_CS, DELAY(10), CMD_RESET | LOW, DELAY(10), CMD_RESET | HIGH, DELAY(25), CMD(SleepOut), DELAY(20), CMD(FrameRateControl1), DATA(3), 2, 0x35, 0x36, /* fill in more initialization data */ CMD_END
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 19, 2012 07:35PM |
To get the right screen driver for your DPF when building the SDK firmware: 1 Extract the firmware bin file from your DPF with Dermaik’s Dump Tool. 2 Search for 75 EC 00 53 EA E8 53 EB FD in the extracted file. This corresponds to the initialisation of the LCD port. The rest of the code should correspond to the initialisation sequence for your LCD. I used PowerGREP 4 to search for the code. 3 Disassemble the code and find the best match in LcdInit.asm or LcdInitTbl.asm files in the sub directories of DPF206_AllFunction\Lcd\. Most LCD chips seems to have many of the same control instructions, but the parameters differs. Make sure that the number of parameters for the commands SET_COLUMN_ADDRESS (0x2A) and SET_PAGE_ADDRESS (0x2B) matches sine these commands are used in OpenWin.asm and OpenWindow_Read.asm. I used a hex2bin tool to get the hex dump from PowerGREP into binary and DIS8051 for disassembly. 4 Copy the sub diretory and edit your LcdInit.asm or LcdInitTbl.asm in accordance with the disassembled sequence. 5 Update LcdComm.asm for your screen resolution 6 Edit DPF206_AllFunction\config.ini: add the line “export LCDDIR =” and insert a hash (‘#’) before the export for the currently enabled LCD in the section 7 build your firmware and load it onto your DPF Now you should have a perfect picture, allthough I found that I could improve it by changing the gamma correction (commands 0×26, 0xE0 and 0xE1)I will attempt to duplicate this in Linux with hexdump, grep and d52 and the earlier version of dpf-ax with the reverse scripts.
dpffan
Re: LCD screen for your dockstar (cheap! <$5) March 19, 2012 07:57PM |
X1330: mov _p3dir,#0x0 ; 1330 75 ec 00 ul. anl _p1dir,#0xe8 ; 1333 53 ea e8 Sjh anl _p2dir,#0xfd ; 1336 53 eb fd Sk} clr _LCD_CS ; 1339 c2 a1 B! clr _LCD_RST ; 133b c2 90 B. mov a,#0x96 ; 133d 74 96 t. lcall X16b3 ; 133f 12 16 b3 ..3 ....I assume everything before the ret instruction is the lcd initialization sequence? To use it in the alternative firmware for dpf-ax, I will need to write a new mylcd.c, mylcd.h and update the .lnk file? Thanks for any hints
Re: LCD screen for your dockstar (cheap! <$5) March 28, 2012 08:28AM |
Registered: 12 years ago Posts: 365 |