Home
JAQForum Ver 19.8.18
Log In or Join  
Active Topics
Local Time 12:35 22 Aug 2019 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Pi-cromite V5.4.05 with documentation

     Page 1 of 4    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 12:35am 11 Aug 2017
Copy link to clipboard 

The Pi-cromite code has been stable for a bit now so I've tried to pull together as much of the information in the original huge thread as possible and incorporate it into a Pi-cromite manual

2017-08-11_102341_Pi-cromite_Manual.pdf

I've also re-versioned the code and included some additional MMX features to maintain compatibility with the Micromite/MMX versioning

2017-08-11_103150_mmbasic.zip


As always the primary source of information on the MMBasic language and most commands is the Micromite and Micromite+ manuals


 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2743
Posted: 12:40am 11 Aug 2017
Copy link to clipboard 

Brilliant stuff - THANKS
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.org
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1205
Posted: 02:36am 11 Aug 2017
Copy link to clipboard 

Thanks for that from me too Peter. I've been chickening out of trying it out on the Zero-W I bought about two months ago - partly because I wasn't sure where to start in the thread! No excuse now - I'm going to have to bite the bullet and give it a go.

GregEdited by paceman 2017-08-12
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 03:12am 11 Aug 2017
Copy link to clipboard 

... thank you very much Peter ... i like it !

I'm still working on my smart home system - it's running with the Raspberry, but there's still much to make it better

What do you think about my suggestion to use GTK + elements with the PiCromite ---will this be possible? GTK Widgets

regards Ron
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 04:06am 11 Aug 2017
Copy link to clipboard 

  Quote  What do you think about my suggestion to use GTK + elements with the PiCromite


If I understand it this layers on top of X-windows so would need the full version of Raspbian installed. For the Pi Zero this is really too much overhead so I think it makes sense to stick with console window but I may be missing something
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 02:00am 23 Aug 2017
Copy link to clipboard 

hi Peter ,
i like the PiCromite so we have all in one, a finishesd PCB without any soldering and so on and its run at 1200 mhz

for some test i have decrase the clockspeed to 800 mhz .. it works well and the bitstream command does not make problems
the cpu have to be cooled above 74 degrees mmbasic will stopp elesewere

I bought a 3.5 inch display hoping it worked but it only shows half the screen you can help me ??
main parameter

Type :TFT
Interface :SPI
Touch panel control chip : XPT2046
The color index : 65536色
Backlight: LED
resolving power: 320×480 (Pixel)
Size proportion: 8:5
power waste: TBD
Back facet current: TBD
Working temperature (c): TBD



Interface definition
Pin number identification describe

1、17 3.3V ------ Power supply positive (3.3V power input)
2、4 5V -- ---- Power supply positive (5V power input)
3、5、7、8、10、12、13、15、16 NC --- --- NC
6、9、14、20、25 GND ------- Power GND
11 TP_IRQ ------ Touch panel interrupt, detect the touch panel is pressed down to a low level
18 LCD_RS ------- Instruction / data register selection
19 LCD_SI / TP_SI ------ LCD display / touch panel SPI data input
21 TP_SO ----- SPI data output of touch panel
22 RST ----- reset
23 LCD_SCK / TP_SCK LCD -------- SPI clock signal for display / touch panel
24 LCD_CS -------- LCD chip select signal, low level LCD
26 TP_CS --------- The touch panel chip select signal, low level selection of touch panel
Specifications

LCD Type TFT

LCD Interface SPI

Touch Screen Type Resistive
Touch Screen Controller XPT2046

Colors 65536

Backlight LED

Resolution 320*480 (Pixel)
Aspect Ratio 02:03

Power Consumption TBD

Backlight Current TBD

Operating Temp. (℃) TBD



Interface

PIN NO. SYMBOL DESCRIPTION
1, 17 3.3V Power positive (3.3V power input)
2, 4 5V Power positive (5V power input)
3, 5, 7, 8, 10, 12, 13, 15, 16 NC NC
6, 9, 14, 20, 25 GND Ground
11 TP_IRQ Touch Panel interrupt, low level while the Touch Panel detects touching
18 LCD_RS Instruction/Data Register selection
19 LCD_SI / TP_SI SPI data input of LCD/Touch Panel
21 TP_SO SPI data output of Touch Panel
22 RST Reset
23 LCD_SCK / TP_SCK SPI clock of LCD/Touch Panel
24 LCD_CS LCD chip selection, low active
26 TP_CS Touch Panel chip selection, low active


many thanks Ronald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 04:18am 23 Aug 2017
Copy link to clipboard 

  Quote  I bought a 3.5 inch display hoping it worked but it only shows half the screen you can help me ??


Can you provide a link to the specific screen?

The problem is that there are at least three chips on these 3.5” boards ILI9341, ILI9488, ILI9327 which seem to be used interchangeably but are not exactly the same. They need different initialisation although run-time is the sameEdited by matherp 2017-08-24
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 05:31am 23 Aug 2017
Copy link to clipboard 

thank you Peter , here is the link
https://www.amazon.de/gp/product/B06X191RX7/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1

i have a cd with installing instructions files

the driver is called :

LCD-show-160701.tar.gz or
LCD-show-170315.tar.gz




 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 06:11am 23 Aug 2017
Copy link to clipboard 

Not sure I understand but if I assume that you are trying to use the TFT as a Pi console rather than using it from MMBasic then you need to tell MMBasic to leave the pins used by the display alone.

The command for this is OPTION PINS nnnn (see manual for more info)

Try OPTION PINS &B10111101100000010000000000
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 09:00pm 23 Aug 2017
Copy link to clipboard 

hi Peter..,
I wanted to use it as mmbasic display

First I tried it with a zero W-

today I tried it with a RPi 3 and its working
this pic shows the 3.5 Zoll LCD with an RPi3
I think the Zero-W is broken


and this pic shows the 4 Zoll LCD with an RPi3



if someone is interested in it the casing is from Combiplast Link


Edited by RonnS 2017-08-25
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 12:26pm 25 Aug 2017
Copy link to clipboard 

Syntax help needed:

if i try:
save image "Screen"

i got an error: expected a string

what im doing wrong ??Edited by RonnS 2017-08-27
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 10:02pm 25 Aug 2017
Copy link to clipboard 

  Quote  what im doing wrong ??


Looks like SAVE IMAGE has gone missing - leave it with me

One question though are you trying to use it on the display you reference above? If so it won't work because of the way the display is wired you can't read from the graphic memoryEdited by matherp 2017-08-27
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 10:53pm 25 Aug 2017
Copy link to clipboard 

hi Peter,

i used it with a 4 inch RPi Display like this
http://www.thebackshed.com/forum/forum_posts.asp?TID=9546&PN=4

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 11:36pm 25 Aug 2017
Copy link to clipboard 

This can't work with transparent text, blit and save image. These displays are wired as 16-bit parallel with on-board shift registers converting to SPI. The RD pin is not connected and in any event the shift registers are write only so there is no way to get information back from the display
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 11:58pm 25 Aug 2017
Copy link to clipboard 

ok thank you

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 12:30am 31 Aug 2017
Copy link to clipboard 

Please find attached version 5.4.06

2017-08-31_125524_mmbasic.zip

2017-08-31_104350_Pi-cromite_Manual.pdf

Changes are:

Implemented SAVE IMAGE for all panel types including ILI9481

BLIT and transparent text now available for all panels. For the SSD1963 the RD pin no longer needs to be specified and can just be tied high instead. If it is specified it is just pulled high in the code.

Huge (and I mean really huge) performance increase for all SPI panels, including near instantaneous drawing of complex GUI objects like the keyboard. A 320x240 full colour image can now be loaded onto an ILI9341 in 42msec on a Pi-Zero W. Try GUI TEST LCDPANEL before and after installing the new version to see the difference.

Good improvements in SSD1963 drawing speed. Loading a 800x480 full colour image now takes just 0.37 seconds

New option OPTION AUTOREFRESH ON/OFF and new command REFRESH. Together these allow you to update a screen in the background and choose when to display the change. This is best explained with a simple example:


OPTION AUTOREFRESH OFF 'This option is not saved and defaults to ON at MMBasic start
LOAD IMAGE "tiger" 'nothing obviously happens
TEXT 100,100,"Tiger",,,4,RGB(red),-1 'draw a title in the background with transparent text
REFRESH 'image appears with text already in place
OPTION AUTOREFRESH ON
BOX 0,0,320,240 'box appears immediately


This is a fairly major rewrite of the drawing code so there may be bugs - please report anything you find

Edited by matherp 2017-09-01
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 11:06am 31 Aug 2017
Copy link to clipboard 

wow what a speed

im happy..... so it was very slow at last mmbasic version on the Raspi Zero

thank you very much Peter
 
RonnS
Regular Member

Joined: 16/07/2015
Location: Germany
Posts: 89
Posted: 11:31am 31 Aug 2017
Copy link to clipboard 

this Pic i have made with "SAVE IMAGE" from the 3.5 inch display we talk about above
and a Raspi 3


the salesman wrote me it has an ILI9486 Chip
Edited by RonnS 2017-09-01
 
Peter63
Newbie

Joined: 28/07/2017
Location: Sweden
Posts: 14
Posted: 01:55am 03 Sep 2017
Copy link to clipboard 

Hi Peter

Nice work!

Question:
When i use MMBasic on Raspberry Pi (using Raspbian Lite Console mode)
is it any commands for clear console screen (type: CLS console) ?
Position cursor on console screen ?
Console Size command (now 80x24 always) ?

(Using HDMI screen an MMBasic (on Raspberry Pi), is a also a nice thing)

:-) Peter

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 09:02am 03 Sep 2017
Copy link to clipboard 

  Quote  is it any commands for clear console screen (type: CLS console) ?
Position cursor on console screen ?


There is now Note you can already change console size with OPTION DISLPAY height, width as per the Micromite

Please find attached version 5.4.07

2017-09-03_185823_mmbasic.zip


2017-09-03_185953_Pi-cromite_Manual.pdf

Changes are:

CLS CONSOLE 'Clears the text console

CURSOR MOVE x,y 'Moves the text console cursor position to the X,Y position specified

CURSOR COLOUR “fg”, “bc” 'Set the foreground and background colours for the text console. Only valid if OPTION COLOURCODE ON is set. Valid colours must be in quotes and are the normal 8 primaries RED, BLUE WHITE, BLACK, GREEN, CYAN, MAGENTA, YELLOW



CURSOR UNDERLINE mode 'Sets/removes underline on the subsequent output. Valid modes are ON and OFF

CURSOR REVERSE mode 'Sets/removes reverse colours on the subsequent output. Valid modes are ON and OFF


CURSOR BOLD mode 'Sets/removes bold text mode on the subsequent output. Valid modes are ON and OFF
 
     Page 1 of 4    
© JAQ Software 2019