1、用户手册技术规格书英User Manual (Technical specification)HTC320035A1 General information This is a USB 3.5”(320x240)TFT ,16 bit LCD module . Technical specification2 Specifications 2.1 GENERAL SPECIFICATIONS ItemFeature Specifications 1Size 3.5 inch 2Resolutions 320X2403Color Bit 16 Bit 4Color interface RGB56
2、55Technology typea_Si6Viewing direction12:00 7Pixel ConfigurationR.G.B. Vertical Stripe8Mode TM with Normally white9Gray Scale Inversion Direction6:0010Backlight 6个LED in serial 11Driving ICNovatek NT39016DTable 1 General specifications2.2 RGB TIMING ItemSymbolMinTypMaxUnitClk Frequency Fclk6.16.48M
3、HzClk CycleTclk125156164NsClk Duty Tcwh405060%HSYNC setup time Ths4070255CLKTable 2 RGB TIMING2.3 MECHANICAL DIMENSIONFeaturesDescriptions Unit PCB 100725.6mmViewing Area 72.0854.56mmActive Area 70.0852.56mmTable 3 MECHANICAL DIMENSIONDiagram 1 MECHANICAL OUTLINE DRAWING 2.4 BLOCK DIAGRAM Diagram 2
4、BLOCK DIAGRAM 3 INTERFACING 3.1 Mini USB SMD PORT:1 VBUS2 D-3 D+4 NC5 GND3.2 MECHANICAL SIZE:Diagram 3 Mini USB SIZE4 Environmental / Reliability TestTest ItemMinTypMaxUnitOperating Temperature -202560Storage Temperature -302570Operating Voltage 4.5V5V5.2VVTable 4 Environmental / Reliability Test5 E
5、lectrical Characteristics5.1 DC CharacteristicsItem SymbolConditions MinTypMaxUnit Volt VDD4.55.05.2VCurrent VIHVCC=5V,PWM duty=100% (H)150mACurrent VIHVCC=5V,PWM duty=50%94mATable 5 DC Characteristics5.2 TFT LCD Panel Driving Ta=25ItemSymbolMinMaxUnitOperating Voltage VDD3.33.5VOperating Temperatur
6、e Topr-2060Storage Temperature Tstg-3070 Table6 TFT LCD Panel Driving5.3 Backlight Driving ItemSymbolMinMaxUnitItemForward CurrentIf-2025mAForward VoltageVf16.819.221.6VPower ConsumptionW-384510mWLife Time -1000020000-Hrs Table 7 TFT LCD Backlight Driving6 Display Control command6.1 Picture:a) Comma
7、nd packet:Data:0x55 0xAA 0x00 b) Data packet:Data group sequence :B,G,R,B,G,R ,data size0x38400/6.2 Partial Characters:a) Command packet Data: 0x55 ,0xAA ,0x00,X1,Y1,X2,Y2b) Graphic data in Text zone Data group timing:B,G,R,B,G,R. ,data size depends on graphics size 6.3 Remarks 1 Remarks to X1,Y1,X2
8、,Y2 in Text zone X1=X coordinate on top left, 2 bytes.Y1=Y coordinate on top left , 2 bytes.X2=X coordinate on bottom right , 2 bytes Y2=Y coordinate on bottom right ,2 bytes 2 Extract data sequence:According to the actual sequence of image files stored to extract data , not reverse the data sequenc
9、e 3 Sequence of RGB data transmissionThe Data sent to the slave computer from host processor is in BGR sequence which is also the sequence of the file stored . First Send Blue data, and then Green data and Red data last . The receiving sequence at slave processor is same .7 The application and sampl
10、e cases7.1 Hardware Circuit connection图4 The hardware connecting7.2 Software Programming in PCThe DEMO of this product designed based on VC#.net. The user can design it on any platform you are familiar with.7.2.1 Software developing environment Microsoft Visual Studio 2010, Version 10.0.30319.1 RTMR
11、elMicrosoft .NET Framework,Version 4.0.30319 RTMRelInstalled Version: Ultimate 7.2.2 Demos software structureDiagram 5 Demo Software Frame7.2.3 Device connect/cut manipulation functionpivate void UserDeviceAttach(MP_Device pDev) D_ATTACH_GUI_CALLBACK AttachCb = newD_ATTACH_GUI_CALLBACK(DeviceAttachG
12、uiCb);Invoke(AttachCb,new objectpDev);private void DeviceAttachGuiCb(MP_Device pDev) lblNumDevices.Text = uDevManager.GetNumOfDevicesAttached().ToString();DeviceTabPage tabPage = new DeviceTabPage(this, ref pDev);tabDevices.Controls.Add(tabPage); 7.2.4 The function to start connection checkprivate v
13、oid mp_Load(object sender, System.EventArgs e)D_USER_ATTACH_CALLBACK dDeviceAttachCb = new D_USER_ATTACH_CALLBACK(UserDeviceAttach);D_USER_DETACH_CALLBACK dDeviceDetachCb = newD_USER_DETACH_CALLBACK(UserDeviceDetach);uDevManager = new MP_DeviceManager(dDeviceAttachCb, dDeviceDetachCb, DEFAULT_VENDOR
14、_ID, DEFAULT_PRODUCT_ID, DEFAULT_DRIVER_NAME,DEFAULT_LICENSE_STRING);PicturePanel.Width = 320;PicturePanel.Height = 240;UpdateButtons();7.2.5 Pipe listen Function private void btPipeListen_Click(object sender, System.EventArgs e) DeviceTabPage activeTab = GetActiveTab(); if(activeTab = null) return;
15、 MP_Pipe activePipe = activeTab.GetActivePipe();if(activePipe.IsInUse() activePipe.SetContiguous(false);activePipe.HaltTransferOnPipe();else DWORD dwOptions = 0;activePipe.SetContiguous(true);TraceMsg(string.Format(began listening to 0 pipe number +0x1:X, activeTab.GetUsbDev().DeviceDescription(),ac
16、tivePipe.GetPipeNum();activePipe.UsbPipeTransferAsync(true, dwOptions ,TIME_OUT, new D_USER_TRANSFER_COMPLETION(ListenCompletion);UpdateButtons();7.2.6 Function to sending picture private void SendStr(string bmfile)Method:byte fbuffer = File.ReadAllBytes(bmfile);uint filesize = (uint)(fbuffer2 + fbu
17、ffer3 * 256 + fbuffer4 * 256 * 256 + fbuffer5 * 256 * 256 * 256);bmoffset = (uint)(fbuffer0xa + fbuffer0xb * 256 + fbuffer0xc * 256 * 256 + fbuffer0xd * 256 * 256 * 256);bmwidth = (uint)(fbuffer0x12 + fbuffer0x13 * 256 + fbuffer0x14 * 256 *256 + fbuffer0x15 * 256 * 256 * 256);bmheight = (uint)(fbuff
18、er0x16 + fbuffer0x17 * 256 + fbuffer0x18 * 256 * 256 + fbuffer0x19 * 256 * 256 * 256);pixeldeep = (uint)(fbuffer0x1c + fbuffer0x1d * 256);uint datasize = (filesize - bmoffset);/*00 00 00 blackff ff ff white00 00 ff Red00 ff 00 greenff 00 00 blue*/if (pixeldeep = 24) /24bit,32bit?for (uint i = 0; i d
19、atasize; i+)fbufferi = fbufferi + bmoffset;else if (pixeldeep = 32)for (uint i = 0; i datasize / 4; i+)for (uint i1 = 0; i1 8); /X high 8bitHeader4 = (byte )( CurrentLabel.Left & 0xff); /X low 8bitHeader5 = (byte)(CurrentLabel.Top & 0x00ff)8); /Y high 8bitHeader6 = (byte )( CurrentLabel.Top & 0xff);
20、 /Y low 8bitint Xwidth = CurrentLabel.Width + CurrentLabel.Left-1;Header 7=(byte)(Xwidth 8); /width high 8bitHeader 8=(byte)(Xwidth &0xff); /width low 8 bitint Yheight = CurrentLabel.Height + CurrentLabel.Top-1;Header 9=(byte)(Yheight 8); /height high 8bitHeader 10=(byte)(Yheight &0xff); /height low
21、 8bit7.2.9Label combine to Sends bmpAccording to the user added the label, the label text into the current interface.Graphics gph = Graphics.FromImage(bm);for (int i = 0; i LB_MAX_INDEX; i+) if (LbArray i!=null )gph.DrawString(LbArrayi.Text, LbArrayi.Font, new SolidBrush(LbArray i.ForeColor ), LbArr
22、ayi.Left, LbArrayi.Top );bm.Save(bms.bmp, System.Drawing.Imaging.ImageFormat.Bmp);7.2.10Method of extracting partial data of label text Create Bitmap Object.Combine partial bmpRectangle ra;Bitmap bm, tm;if (CurrentLabel != null) bm = new Bitmap(320, 240);ra = new Rectangle(0,0,320,240);PicturePanel.
23、DrawToBitmap(bm, ra);Graphics gph = Graphics.FromImage(bm);/Partial data combine.gph.DrawString(CurrentLabel.Text, CurrentLabel.Font, new SolidBrush(CurrentLabel.ForeColor), CurrentLabel.Left, CurrentLabel.Top);ra = new Rectangle( CurrentLabel.Left, CurrentLabel.Top, CurrentLabel.Width, CurrentLabel
24、.Height);tm = bm.Clone(ra, PixelFormat.Format32bppArgb ); /Convert partial datatm.Save(str.bmp, System.Drawing.Imaging.ImageFormat.Bmp); 7.2.11 The timed loop transmission processing Used the timer interrupt control the bmp loop send,and control the bmp switch displayprivate void timer_send_Tick(obj
25、ect sender, EventArgs e) /Timed send if (listBmpFile.Items.Count = 0) /Check the count is not zeroreturn; timer_send.Stop(); /Stop timer count.if (listBmpFile.SelectedIndex = listBmpFile.Items.Count - 1)listBmpFile.SelectedIndex = 0; /loopelse listBmpFile.SelectedIndex = listBmpFile.SelectedIndex +
26、1; LoadBmpToPicPanl(listBmpFile.SelectedItem.ToString(); /convert bmp SendCurrentBmp(); /send bmp LoadBMP.Enabled = false; SendImage.Enabled = false; timer_send.Start(); /send over,then start count.7.2.12 Add label function Users add labels by clicking button of add label, Check the free label conte
27、nt, Then insert new label.private void button1_Click(object sender, EventArgs e) /Added label nt i;for ( i = 0; i LB_MAX_INDEX; i+)if (LbArrayi = null)InsertLbArray(i);i = LB_MAX_INDEX + 1;if (i = LB_MAX_INDEX)MessageBox .Show (Max Number!,Note);private void InsertLbArray(int index) /Insert label fun.Point PressPoint = new Point();Label lb = new Label();lb.Text = Input Your Data;lb.Size = new Size(50, 25);/lb.Location = new Point(PicturePanel.Top, PicturePanel.Left);lb.Tag =
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1