完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我现在正在做一个使用MIKRO-1142TFT显示器的项目,它具有ILI934 1控制器。我使用PIC32 MX微控制器(PIC32 MX795F512H现在),用MPLAB X IDE开发。对于显示功能,我使用Microchip的图形库(来自MicroChIP-SoReStsV2013-0615版本)。n)我一直在尝试为显示控制器(ILI931)编写自己的驱动程序代码,因为我发现的所有示例代码都没有我需要的所有功能。特别是,我找不到库所使用的ISDeVice Buy()函数的任何实现。我需要它使用非阻塞配置(因此应用程序在TFT显示管理数据显示的同时继续进行其他进程)在数据表中只提到“忙”的命令是:“NV内存状态读取(D2H)”-(在数据表233中的第186页中找到):HTTPS://CDN商店。AdAuRuth./DATSHIETS/ILI931.PDF)当我尝试编写自己的代码时,我似乎无法接收我正在寻找的正确数据。我是否正确地执行它?(1)读取NV内存状态(空隙){//IL934,读取NV内存状态(D2H),第三参数D7位(“忙”)字为忙=0;/ /清除LCDYR RS位(命令)DISPLATE命令命令();/ /清除LCDCCS CS位(Active Load)DeSabEnable();/*MMand用于读取内存状态ByTeDeVice(0xD2);//设置LCDYRs位(Data)DeSabStata Data(;)//MimeRead;通过2个第一字节的LeDeVeCeRead();/3/RD字节有数据,如果该设备是BuyISIS繁忙=(SunLeDeCeRead())和0x80;//设置LCDCCS CS位(低电平)DISpPaseDeable();返回(Is繁忙);第二个总是0x03,第三个阅读等等总是0x00。(在调试器捕获数据时,忙状态位会被重新设置)。有什么建议吗?抱歉无知,但我真的找不到任何好的例子……谢谢你,Tsoof A.
以上来自于百度翻译 以下为原文 Hello, I am currently working on a project using MIKROE-1142 TFT display that has ILI9341 controller. I use pic32mx microcontrollers (PIC32MX795F512H for now), developing with MPLAB X IDE. For the display functionality I use the Microchip's Graphics Library (from microchip_solutions_v2013-06-15 version) I've been experimenting with writing my own driver code for the display controller (ILI9341) since all the example codes I found for this one doesn't have all the functionality that I need. In particular, I couldn't find any implementation for the isDeviceBusy() function used by the library. I need it to use the non blocking configuration (so the application proceed to other processes while the TFT display manages the data to display) The only mentioning I found in the datasheet for "busy" is in the command: "NV Memory Status Read (D2h)" - (This is found in Page 186 of 233 in the Datasheet : https://cdn-shop.adafruit../datasheets/ILI9341.pdf ) And when trying to write my own code I can't seem to receive the correct data i'm searching for. Am I implementing it correctly? /*============================================================================*/ WORD IsDeviceBusy(void) { // ILI9341 , Read NV Memory Status (D2h) , 3rd parameter D7 bit ("BUSY") WORD isBusy = 0; // Clear LCD_RS bit (command) DisplaySetCommand(); // Clear LCD_CS bit (active low) DisplayEnable(); // Send command for reading the memory status bytes DeviceWrite(0xD2); // Set LCD_RS bit (data) DisplaySetData(); // Dummy reads; to pass the 2 first bytes SingleDeviceRead(); SingleDeviceRead(); // 3'rd byte has the data if the device is busy isBusy = (SingleDeviceRead() & 0x80); // Set LCD_CS bit (active low) DisplayDisable(); return (isBusy); } /*============================================================================*/ I tried to play around with the number of dummy reads, and also to use the debugging tool to see if I receive anything, and I do. The first read is the same as the command sent (0xD2), the second one is always 0x03, and the third read and so on are always 0x00.. (no surprise there, the busy status bit would reset by the time the debugger catch the data). Any suggestions? Sorry for the ignorance, but I really couldn't find any good example... Thanks in advance, Tsoof A. |
|
相关推荐
1个回答
|
|
编辑:(由于某种原因,无法将其添加到帖子中)我现在明白硬件所实现的原始函数是导致“忙”位设置为高的原因。有可能通过ILI934控制器的硬件实现2D图吗?或者它只支持软件原始图?我还是想知道它是否正确实施,
以上来自于百度翻译 以下为原文 EDIT: (for some reason couldn't add this to the post) I now understand that the primitive functions that are implemented by the hardware are the ones that cause the "busy" bit to set to high. Is it possible to implement 2D Drawings through the hardware of the ILI9341 controller? or does it only support software primitive drawings? And still i'd like to know if it is implemented right, |
|
|
|
只有小组成员才能发言,加入小组>>
4814 浏览 9 评论
1823 浏览 8 评论
1743 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
2949 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2055 浏览 5 评论
452浏览 1评论
1107浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
355浏览 0评论
260浏览 0评论
LAN9252使用SQI通信,进行数字复位后读BYTE_TEST异常
1777浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-18 15:57 , Processed in 1.355134 second(s), Total 72, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号