Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 21:58 28 Mar 2024 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 : PicoMite V5.07.00b0 - beta firmware

     Page 6 of 13    
Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1754
Posted: 12:21am 26 Jul 2021
Copy link to clipboard 
Print this post

Sorry, I agree but did not want to put it in someone else's post, and if I start another one there will be PCB posts all over the place.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 12:28am 26 Jul 2021
Copy link to clipboard 
Print this post

Not a big deal young fella - it wasn't just aimed at you!
That is why I suggested a "PicoMite Hardware" thread, so that many pcb designs could be collected in one thread.
Keep up the good work though, as I may be interested if you decide to sell some bare boards to recoup outlay.
led
Miss you George
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 12:38am 26 Jul 2021
Copy link to clipboard 
Print this post

VegiPete's Crateaway on ILI9488 480x320

This provides an example of the BLIT LOAD command added in the latest PicoMite Firmware (since the faulty handling of MISO on the ILI9488 LCDs prevents the use of BLIT READ).



But the colors should be like this:


I feel like I've seen this problem before, but I don't remember the details.

capico.zip

When I do LOAD IMAGE "CrateAwaySprites480.bmp", the colors are correct.

With the following, the whites are yellow, perhaps as if blue is missing.

blit load 1,"CrateAwaySprites480.bmp",0,0,120,60
blit write 1,0,0,120,60
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 04:59am 26 Jul 2021
Copy link to clipboard 
Print this post

@Mixtel90
Some more suggestions for PicoMite TINAM:
1. Move the section "PASM - The PIO Compiler" to the bottom of the file (or as an appendix?). When reading through to the end of the PIO stuff, you come to the section, "Predefined Read Only Variables".
This would be very confusing to someone that does not know MicroMites & MMBasic, and thinking that you are still talking about a complicated subject such as PIO.

2. Appendix 1: OPTION LCDPANEL ILI9341, orientation, DCpin, RESETpin, CSpin
(Sorry missed this the first time round)
"Configures the Micromite and Micromite Plus" and further down "Micromite I/O pins"
Rgds
led
Miss you George
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5642
Posted: 07:09am 26 Jul 2021
Copy link to clipboard 
Print this post

Hmmm.... not sure...

I almost put PASM as an appendix, but it isn't really an "addition" to stuff in the main body of the doc. The PIO is part of the RP2040 and hence part of the PicoMite just as much as the SPI and I2C interfaces are. In fact, the RP2040 datasheet gives examples of writing additional SPI, UART and I2C interfaces for the PIO. I couldn't make up my mind. It doesn't sit easily in either location. Eventually I put it where it is because it's logical to put the commands and functions where *they* are, and possibly less logical to put PASM in an appendix away from them. I might cut that section down though, concentrating mainly on how to install and run PASM. Then  it would be closer in context to the subsections that precede "MMBasic Implementation Characteristics" in the CMM2 manual. An appendix might be better to give a bit more depth then. I'm going to refer anyone who wants to use it to any depth to the RP documentation anyway. It's far too complicated to be in a PicoMite manual (and I don't understand a lot of it myself - I'm learning on the job). It might even warrant an additional manual like the Graphics Programming one for the CMM2 or "Getting Started" for the Micromite. I'm not sure yet.

I'm glad I don't have to decide on the layout - this isn't the manual. :)
I'm NOT going to retype the entire MMBasic documentation for the PicoMite manual. Others already have that and it's far easier and quicker for them to modify their existing files than for me to start again. I'm producing a guide for them (some can be cut & paste with a little editing) and a place to keep what we know about PicoMite specific stuff together, that's all. A "fanzine" of sorts. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 11:20am 26 Jul 2021
Copy link to clipboard 
Print this post

V5.07.00b8


PicoMiteV5.07.00b8.zip

Fixes a bug in the DRAWBUFFER primitive

  Quote  With the following, the whites are yellow, perhaps as if blue is missing.

Tested on an ILI9341 and can't replicate. The above will fix one issue but can't see how it would affect a colour shift
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 12:06pm 26 Jul 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  With the following, the whites are yellow, perhaps as if blue is missing.

Tested on an ILI9341 and can't replicate. The above will fix one issue but can't see how it would affect a colour shift

Also correct colors for me with an ILI9341:
> option lcdpanel disable
PicoMite MMBasic Version 5.07.00b8
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> OPTION LCDPANEL ILI9341, LANDSCAPE,GP20,GP19,GP18
> load image "CrateAwaySprites320.bmp"
> cls
> blit load 1,"CrateAwaySprites480.bmp",0,0,120,60
> blit write 1,0,0,120,60

And still no blue for an ILI9488. Any idea why that might be? (Mixing the 320 and 480 versions of the BMP makes no difference.)

Back to the ILI9488 and the 320 version also has no blue for BLIT LOAD, BLIT WRITE combination but LOAD IMAGE "CrateAwaySprites320.bmp" is correct, as is LOAD IMAGE "CrateAwaySprites480.bmp"
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 12:29pm 26 Jul 2021
Copy link to clipboard 
Print this post

  Quote  And still no blue for an ILI9488.


Please try the attached - the red and blue may be reversed but that is easy to fix.


ILI9488test.zip

NB: I'm going to test fixing the ILI9488 problem using a 74LVC1G125GW
Edited 2021-07-26 22:33 by matherp
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 01:58pm 26 Jul 2021
Copy link to clipboard 
Print this post

  matherp said  Please try the attached - the red and blue may be reversed but that is easy to fix.

This one appears to be missing yellow.


Main image, upper left, is of the 320x240 bmp. Upper right image is with 480 version after BLIT LOAD and BLIT WRITE.

  Quote  NB: I'm going to test fixing the ILI9488 problem using a 74LVC1G125GW


I've also ordered some SN74HC125N tri-state buffers to try to fix ILI9488 MISO to enable picomite BLIT READ, SAVE IMAGE based on a circuit I found.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 02:06pm 26 Jul 2021
Copy link to clipboard 
Print this post

One more try:


ILI9488test2.zip
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 02:41pm 26 Jul 2021
Copy link to clipboard 
Print this post

  matherp said  One more try:

Perfect. Thank you.


PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5642
Posted: 08:33pm 26 Jul 2021
Copy link to clipboard 
Print this post

Bug in RESTORE <variable$>


label1:
Data "1-1"
Data "1-2"
Data "1-3"
Data "1-4"
Data "1-5"
Data "1-6"
Data ""

a$="label1"

Print "testing..."
Restore a$
Do
 Read b$
 If b$="" Then Exit
 Print b$
Loop

Print "testing..."
Restore a$
Do
 Read b$
 If b$="" Then Exit
 Print b$
Loop


testing...
1-1
1-2
1-3
1-4
1-5
1-6
testing...
1-2
1-3
1-4
1-5
1-6
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 09:15pm 26 Jul 2021
Copy link to clipboard 
Print this post

  Quote  Bug in RESTORE <variable$>


can't look at it until Friday. What happens if you just use RESTORE LABEL1?
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1081
Posted: 09:25pm 26 Jul 2021
Copy link to clipboard 
Print this post


Do
 Read b$
 If b$="" Then Exit
 Print b$
Loop

Is it safe to EXIT without specifying what you are exiting? (DO/FOR/FUNCTION/SUB)
Visit Vegipete's *Mite Library for cool programs.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5642
Posted: 09:33pm 26 Jul 2021
Copy link to clipboard 
Print this post

@matherp

Just the same, Peter. I thought I had something really weird in my program today. lol

It also does the same if I use RESTORE label1 for the first run and RESTORE a$ for the second. or the other way round.

@vegipete

I don't have much choice. :)  If I enter it as EXIT DO then run the prog (still with bug) then go back to the editor it's lost the DOs.
Edited 2021-07-27 07:36 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3807
Posted: 09:46pm 26 Jul 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  I don't have much choice. :)  If I enter it as EXIT DO then run the prog (still with bug) then go back to the editor it's lost the DOs.


Yes, I think EXIT on its own is synonymous with (and strangely the canonical form of) EXIT DO, at least on the PicoMite ... probably going to give my MMBasic pretty printer apoplexy when I port it.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 02:08am 27 Jul 2021
Copy link to clipboard 
Print this post

@matherp
PicoMite V5.07.00b8
1. OPTION COUNT NULL,NULL,NULL,NULL
Is this necessary or could OPTION COUNT DISABLE make this line redundant?
Apologies, if this has been mentioned before...

2. If line necessary, I added OPTION F6 "Hello" and I a got listing the options:
OPTION COUNT NULL,NULL,NULL,NULLOPTION F6 Hello
(No CR after last NULL)
Thanks once again
led

Edit: Added apology
Edited 2021-07-27 12:10 by led-bloon
Miss you George
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 12:32am 29 Jul 2021
Copy link to clipboard 
Print this post

Here's a file viewer for the Picomite for a 480x320 ILI9488 display.



Font 1 is 8x12, which gives 40 60-character lines; Font 2 is 12x20, which gives 24 26-character lines (so font 2 is not very useful, but it works). Lines from the input file are truncated at 60 characters.

I implemented PgUp, PgDn, Home, End, Up Arrow, and Down Arrow. PgUp and PgDn move as many lines as are available on the display. Up Arrow and Down Arrow move the display up or down a single line.

I set OPTION CPUSPEED 250000.

Here's a 46-second youtube video

The re-writing of the whole screen with each keypress is, to my mind, pretty speedy.

I didn't write this because I thought it would in itself be of much value, but I wanted to see how quick it might be.

I hope Peter will reconsider his decision not to put keyboard functionality and SERIAL CONSOLE into the firmware as is available on the other Mites:



The Picomite is more capable than the MM2 and, except for number of pins, the MM+. It seems to me to be the best device with which to make an inexpensive stand-alone MMBasic computer--keyboard, LCD display, and still enough pins to do a lot of work or to experiment with.


Dim integer i,j,k,l,m,n,flag,l2,ln,nLnScreen,ii
Dim integer lineNo,x,y,nChLn,nAph
Dim string a$,b$,c$,s$,ch$,crlf$=chr$(13)+chr$(10)
Dim string lines$(800) length 60 ' maximum line width @ 480x320, 8x12

 font 1: lineNo=mm.vres/mm.fontheight/2-1
 y=lineNo*mm.fontheight
 nChLn=fix(mm.hres/mm.fontwidth)
 nLnScreen=fix(mm.vres/mm.fontheight)
' read sensors.bas truncated to 60 characters
 n=1
 Open "sensors.bas" For input As #1
 Do While Not Eof(1)
   Line Input #1, a$: ' Print a$
   lines$(n)=mid$(a$,1,60)
   n=n+1
 Loop
 Close #1
 nLines=n
?nLines;" Lines"
ln=1
do
 if ln+nLnScreen-1 > nLines then ln=nLines-nLnScreen+1
 if ln<1 then ln=1
 cls
 y=0
 for i=1 to nLnScreen
   text 0,y,lines(ln)
   y=y+mm.fontheight
'    ?ln;" "+lines(ln)
   ln=ln+1
 next i
 do
   do: ch$=_inkeyCh$(): loop until ch$<>""
'    ?asc(ch$);" ";
   lnn=0
   select case ch$
     case chr$(128): lnn=ln-nLnScreen-1 ' up arrow
     case chr$(129): lnn=ln-nLnScreen+1 ' down arrow
     case chr$(134): lnn=1 ' home
     case chr$(135): lnn=nlines-nLnScreen+1 ' end
     case chr$(136): lnn=ln-nLnScreen*2 ' pgup
     case chr$(137): lnn=ln ' pgdn
     case chr$(13):
   end select
   if lnn<>0 then: ln=lnn: exit do
 loop
loop

Function _inkeyCh$()
 local ky$
 ky$=inkey$
 if asc(ky$)=27 then ' escape sequence
   ky$=inkey$: ky$=inkey$: ky$=ucase$(ky$)
   If ky$="A" Then: ky$=chr$(128) ' up arrow
   ElseIf ky$="B" Then: ky$=chr$(129) ' down arrow
   ElseIf ky$="C" Then: ky$=chr$(131) ' right arrow
   ElseIf ky$="D" Then: ky$=chr$(130) ' left arrow
   ElseIf ky$="H" Then: ky$=chr$(134) ' home
   ElseIf ky$="8" Then: ky$=chr$(135) ' end
   ElseIf ky$="5" Then: ky$=chr$(136) ' pgup
   ElseIf ky$="6" Then: ky$=chr$(137) ' pgdn
   ' Function keys are ???
   EndIf
 endif
 _inkeyCh$=ky$
end function

The code displays the file, sensors.bas, provided in sensors.zip some posts previously, but it can display any basic program or other text file with CRLF delimiting.

PicoMite on FruitOfTheShed
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5642
Posted: 02:06pm 29 Jul 2021
Copy link to clipboard 
Print this post

These may be of interest to those playing with the ADCs: ADC problen on Pico and Non-liniarity and DNL spike - cause
Edited 2021-07-30 00:28 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 10:29am 30 Jul 2021
Copy link to clipboard 
Print this post

V5.07.00b9


PicoMiteV5.07.00b9.zip

Fixes bug in restore
Improves reliability of reading from a ILI9488
Ensures count pins are unique

  Quote  Is this necessary or could OPTION COUNT DISABLE make this line redundant?

The option just nominates which pins can be used for frequency and counting. It does not allocate them in any way unless a SETPIN command is used. If you are not using counting functions just ignore the option - there is no mechanism to disable pins

  Quote  Yes, I think EXIT on its own is synonymous with (and strangely the canonical form of) EXIT DO

EXIT and EXIT DO are the same. The firmware will convert EXIT DO to EXIT. Other variants of EXIT do not run the same code so are not affected

  Quote  I hope Peter will reconsider his decision not to put keyboard functionality and SERIAL CONSOLE into the firmware as is available on the other Mites:

Sorry - no
 
     Page 6 of 13    
Print this page
© JAQ Software 2024