![]() |
Forum Index : Microcontroller and PC projects : ILI9341 Manual?
Page 1 of 3 ![]() ![]() |
|||||
Author | Message | ||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
I've seen references to a maunual and demos for the ILI9342 TFT display. I've searched the MMBasic Manual with no result. Where should I be looking? Paul VK2AHB |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
The ILI9341 (not 9342) is the default (320x240) LCD display for micromites and picomite for some time. Almost every application is based on this display. A quick demo is "GUI TEST LCDPANEL", that is build in into the micromite firmware. Examples of how to use the code are in the user manual (how to show text in color), and you could analyze code available in the threads here, or on "fruitoftheshed". fruitoftheshed Also look at the applications made by Geoff (section "LCD backpack" projects), most of them are portable amongst the many mites (or with small changes). geoff's projects Some mites have the basic drawing set (LINE, BOX, CIRCLE) and depending on the memory available, some have the extra commands as GUI TEXTBOX etc... Regards, Volhout Edited 2022-08-24 17:39 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
I don't think the ILI9342 is supported (by name, at least). The only thread I could find is here John Edited 2022-08-24 17:38 by JohnS |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
Thanks for those suggestions. Too late now to have a look, bedtime. It was a typo, the correct number in the title, not the body. Paul VK2AHB |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2566 |
MMbasic supports the Ili9341 very well using picomite. Just wire it up first from the diagram in the manual then test the display lcdtest. test the sd card slot, calibrate touch then test touch. I posted sprite code and how easy a gauge is. lcd graphics is page 51 in the manual. You got to read the info in the manual as I have been told many times. This is a gauge OPTION EXPLICIT dim myvoltage! CONST bk = RGB(BLack) const wh = rgb(white) const bl = rgb(blue) const gr = rgb(green) const cy = rgb(cyan) const re = rgb(red) const ma = rgb(magenta) const ye = rgb(yellow) const br = rgb(brown) ' SETPIN GP26, AIN cls gui gauge #1, 120, 160, 100, wh, bk, 0, 3.3, 2, "V", wh do myvoltage! = PIN(GP26) ''text 0,0,left$(str$(myvoltage!),4) CtrlVal(#1) =myvoltage! loop The gui features need setting up and it is explained at the start but the commands need setting up at the command prompt, not in your code. OPTION GUI CONTROLS 75 needs setting up or you will get no memory errors and it is set up in the terminal. I am learning as I go. The blit function is useful. try text 0,0,"hello"... you use text, not print with lcd displays. Edited 2022-08-25 05:43 by stanleyella |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
I'm using User Manual MMBasic Ver 5.07.04 Rev 4. I have confirmed that this is the latest download. The only LCD Display with a wiring diagram I see is the HD44789 type on Page 34. I have a couple of these with I2C interfaces using SDA and SCL. easier to connect than direct. How do I use these with the picomite? Page 54 in Commands discusses the HD44780 BITBANG commands. eg BITBAND LCD INIT d4, d5, d6, d7, rs, en I've been through all 140 pages and no TFT seen. Paul VK2AHB |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
The PCF8574 I2C I/O expander used to connect to those HD44789 LCDs is complicated to use. They employ "nibble mode", writing data and control bytes 4 bits at at time. The manuals don't cover how to do this, and I'm not sure whether anyone has done it with MMBasic. I have seen it done with a PICAXE. Searching for both HD44789 and PCF8574 in a post timed out for me. EDIT: Oops, it has been done--by GoodToGo, and documented on fruitoftheshed: 16x2 LCD with PCF8574 I/O expander. (Still not straightforward.) ~ Edited 2022-08-25 12:44 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
@VK2AHB, Assuming you are talking about connecting an ILI9341 LCD to a Picomite, the User manual on Geoff's site, titled , page 47 gives details and a diagram of using an ILI9341. panky Edit: Looking at Geoff's site, where you speak about '140 pages', I think you are looking at the VGA version of the Picomite which outputs to a VGA monitor. If you want to output to any of the common LCD displays (from 0.96" up to 9") then you need to refer to the manual above - both versions of the Picomite running MMBasic use the same Raspberry Pi Pico module but the firmware for the VGA version is different from the LCD display version (and the VGA version does not support any of the LCD displays referred to above). Hope this helps, Doug. Edited 2022-08-25 14:10 by panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
Ah! Thanks for that! I was very confused :-) Paul |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
I have used both 2x16 and 4x20 displays and the 2.8" TFT with the Arduino Nano. THey have their own libraries of course, makes it simple. Paul |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2566 |
Paul, I think @panky is correct. You are using the vga mmbasic nanual. from Geoff's mmbasic site I downloaded Downloads User Manual (170 pages including a BASIC programming tutorial) DOWNLOAD PicoMite firmware V5.07.04 (includes the above manual). DOWNLOAD Known bugs and issues DOWNLOAD In that manual see image from ![]() page 47 |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2566 |
That is the "ili9341 manual". All the pixel, line, circle, box, etc. just work. MMBasic does not use libraries for lcd devices as Arduino does... or gcbasic, which calls them include files. I found if I wired the ili9341 as the instructions correctly (we all make mistakes :) ) then read the manual carefully, it works very well. IMHO the mmbasic graphics for this lcd are excellent. It is fast for spi. Hope you get it working. stan |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
Hi Stan, Yes, I finally found the "right" manual. Very confusing for a 'mite newbie! I'll take it to Officeworks and add the appropriate pages to the VGA manula that I had printed. Paul |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
So re-reading panky's info: both versions of the Picomite running MMBasic use the same Raspberry Pi Pico module but the firmware for the VGA version is different from the LCD display version (and the VGA version does not support any of the LCD displays referred to above). Hope this helps, Doug. I guess I have to download and the upload the appropriate firmware as well <sigh>. I'll get there eventually I suppose. Paul |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
They are a bit different in concept, but with quite a bit of overlap: PicoMite Think of it as an embedded controller that can support a LCD display. You can have touch control with the right display. Although a PS/2 keyboard is supported and it's possible to use the display as a console it's not a lot of use as the text is too small and the scrolling speed is poor. These disadvantages are alleviated if you use a parallel-connected display but they use a lot of I/O pins. If you program it via the console you don't have to have a display anyway. PicoMite VGA Think of this one as a 1980's home computer but with a much better BASIC. You can have a much bigger (physically) display so it's quite possible to use it for programming and console connection isn't needed for most purposes. The PS/2 keyboard is normally used. There is no touch screen support so, if you want to use it as a control station, you need to consider how you would do your displays in BASIC. You still have access to all the I/O pins, of course. You can, of course, swap a Pico from one to the other simply by loading the appropriate version of the firmware. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
OK, I've done that. Got the relevant LCD pages of the manual printed at Officeworks, downloaded and installed the other firmware. Great, ready to rock'n'roll! Wired up the panel, did the OPTION LCDPANEL ,GP15, GP14, GP13. Guess what?!? System SPI not configured. ![]() Paul |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
hehe.... DON'T PANIC! <---- in large, friendly letters You'll figure this stuff out eventually. As the display is a SPI device it needs a port to connect to. The Pico has re-definable I/O pins that do nothing initially so you have to connect one of the internal SPI devices to some of them. There is no concept of a SYSTEM SPI on the VGA version as it can't have a SPI-connected display or Touch. OPTION SYSTEM SPI ..... will do that for you. (Fill in the rest from the manual). OPTION LCDPANEL ...... then tells MMBasic that there is that particular LCD panel on that particular SPI. It's a bit like loading a driver. With the display working you can then set up Touch: OPTION TOUCH ....... And, if you have connected it, the SD card socket: OPTION SDCARD .... (Note that the VGA version is slightly different here. You have to specify all the pins as SYSTEM SPI hasn't been used.) Edited 2022-08-26 17:40 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2566 |
If you do not want vga then use the picomite zip not the one with vga in the file name, you will have touch screen. Do you want a microcontroller and basic for robots and graphic lcd or a system that looks like '80's style. Try just wiring the screen ie. all pins except the 5 touch and the sd card pins at the top of the display. try to get a display working. The wiring diagram does work as do the tests and setups. It really does all work, if it does not work then it is user errors... as I discovered. I am a newbie so I should not give advice just share my experiences. I said before I am learning as I go but like sharing things that worked. If I can help ask me. OPTION LCDPANEL ,GP15, GP14, GP13. Guess what?!? should be OPTION LCDPANEL GP15, GP14, GP13 These are commands in a terminal not mmedit program. Edited 2022-08-27 02:29 by stanleyella |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
This is on the micromite VGA board. I've reloaded the Rev 3 LCD firmware file then done what the manual says: > OPTION SYSTEM SPI GP18, GP19, GP16 Error : SDcard already configured > OPTION LCDPANEL ILI9341, L, GP15, GP14, GP13 Error : Pin 17 is reserved on startup I am in the wading pool of micromites. Can someone who is diving of the 10m tower give me a clue please? Paul VK2AHB |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
On the VGA board, the SDCARD is configured with OPTION SDCARD GP13, GP10, GP11, GP 12 so I guess I've got to configure some other pins. Paul VK2AHB |
||||
Page 1 of 3 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |