Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:45 28 Nov 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.08 betas

     Page 7 of 11    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 03:37pm 27 Aug 2023
Copy link to clipboard 
Print this post

  matherp said  As in all versions the commands blit and sprite are interchangeable


Except that SPRITE SHOW has to be replaced with BLIT WRITE.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9128
Posted: 03:39pm 27 Aug 2023
Copy link to clipboard 
Print this post

  Quote  Except that SPRITE SHOW has to be replaced with BLIT WRITE.


NO. Completely different functionality. On versions with full sprite support both SPRITE WRITE and SPRITE SHOW exist or you could type BLIT SHOW and BLIT WRITE
Edited 2023-08-28 01:40 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 03:39pm 27 Aug 2023
Copy link to clipboard 
Print this post

  matherp said  ... no other parameters, w and h are taken from the read


Makes sense.

I'm going to mention a couple of things, I've no expectation that you'll do them, but it's possible they are already done and I've missed them, or you might be able to tell me that I shouldn't even try to implement them myself.

1. A mechanism to populate a BLIT buffer without having to READ from the display (or FRAME BUFFER/LAYER). i.e. memory poking/copying to the BLIT buffers (can you get their address?) if not a specific (sub-)command for it.

2. Support for 16 colour BLIT buffers on the PicoMite.

Thanks for listening,

Tom
Edited 2023-08-28 01:40 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 03:49pm 27 Aug 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Except that SPRITE SHOW has to be replaced with BLIT WRITE.


NO. Completely different functionality. On versions with full sprite support both SPRITE WRITE and SPRITE SHOW exist or you could type BLIT SHOW and BLIT WRITE


But BLIT SHOW errors on the Picomite, and BLIT WRITE works (at least to display the sprite, without regard to whatever other functionality SHOW might provide).

But I admit my near-complete ignorance of sprites.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9128
Posted: 03:50pm 27 Aug 2023
Copy link to clipboard 
Print this post

1. You can use BLIT LOAD to populate from a bmp file reading all of it or a subsection into the blit buffer. I could easily add BLIT CREATE to make an empty buffer and then MM.INFO(BLIT ADDRESS n) to return the address if it is genuinely useful. The buffer is in RGB888 format.

2. No chance - big work, but if you want to code it I'll include it. The guts are there in the VGA code but need a lot of integrating. It would be somewhat slower but obviously save memory.

  Quote  But BLIT SHOW errors on the Picomite


Correct, only the VGA version has the full sprite functionality. I judge the lcd displays are too slow for full sprites hence haven't/won't implement it.
Edited 2023-08-28 01:52 by matherp
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 511
Posted: 05:08pm 27 Aug 2023
Copy link to clipboard 
Print this post

  Quote  Corrects MM.WATCHDOG (I hope)

After a quick check, MM.WATCHDOG does indeed now work with the hardware watchdog.
Thanks. :-)
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 172
Posted: 05:32pm 27 Aug 2023
Copy link to clipboard 
Print this post

  karlelch said  Hi,

I am experiencing trouble with the latest beta version (5.07.08b11) of the WebMite. I am aware that ideally, I post a short example here, however, I did not yet have time to search for the specific error condition with a respective code snippet. Hence, my question is more if anyone else experienced stability issues with that beta version.

My code can be found here on GitHub.

It uses MQTT to receive messages about two solar panels. It restarts automatically if the WLAN connection is lost. Also, to recover also from different issues, it uses the new HW watchdog.

I went back to 5.07.08b10 and my code seems to run fine.
With 5.07.08b11, the firmware seems to crash (?) from time to time - then all the options and any programs in the flash are gone. Drive A: is still fine.

The options are:
OPTION COLOURCODE ON
OPTION DISPLAY 64, 80
OPTION WIFI "Elchland3", "xxx"
OPTION TCP SERVER PORT 80
OPTION HEARTBEAT OFF
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SDCARD GP22
OPTION LCDPANEL ST7789_320, LANDSCAPE,GP8,GP15,GP9,GP13
OPTION TOUCH GP16,GP17


Any leads that I could follow?

Thanks
Thomas


I quote me here because the other thread was not the right place for comments on the current beta.

Update: After playing around with other 08-betas, I went back to the current release version (5.07.07) and back to using the "standard" WATCHDOG and now my MQTT application runs just fine for more than one week. Unfortunately, I did not have time for more specific tests; my suspicion is that changes related to introducing the hardware WATCHDOG broke my way of restarting the Pico after it lost its WiFi connection or the MQTT broker.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9128
Posted: 06:53pm 27 Aug 2023
Copy link to clipboard 
Print this post

Please try b12 using the SW watchdog and let me know results. b12 fixes an issue in both watchdogs
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 172
Posted: 07:55am 28 Aug 2023
Copy link to clipboard 
Print this post

  matherp said  Please try b12 using the SW watchdog and let me know results. b12 fixes an issue in both watchdogs

Thanks for the hint. I will try later today.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 10:53am 28 Aug 2023
Copy link to clipboard 
Print this post

Hi Peter,

I have a set of b12's dated 24/8/2023 and a set of b12's dated 27/8/2023. And the readme lists all the new functionality at revision b11.
I guess the b12 dated 24'th is actually a b11
And the current b12 is a bugfix (no new functionality) ?

Just to make sure my archive is correct...

Regards,

Volhout
P.S.: the PIO assembler issue is fixed...thanks !!
Edited 2023-08-28 21:02 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9128
Posted: 03:58pm 30 Aug 2023
Copy link to clipboard 
Print this post

V5.07.08b14

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Fixes bug in web transmit page when the size of included variables + text exceeds the size of the html file by a margin

New MATH command

MATH WINDOW inarray(), scalepoint1, scalepoint2, outarray()


This command takes the data in the inarray calculates the min and max values of the data and then rescales the data to the range specified by scalepoint1 and scalepoint2

e.g.
dim a(99),b(99)
for i=0 to 99:a(i)=i*0.2+40:next
math window a(),100,0,b()
for i=0 to 99:?a(i),b(i):next


What is this useful for? Scaling data to plot on a display would be a good example. Just set your measured data as the inarray, specify the min and max y coordinates in the order required, and the data is automatically placed in the outarray ready to plot

inarray and outarray can be any mixture of floats and integers (all the math is done as floats) and the data ready for plotting will be in outarray.
scalepoint1 can be greater or less than scalepoint2.
Edited 2023-08-31 02:04 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 08:57pm 30 Aug 2023
Copy link to clipboard 
Print this post

Hi Peter,

For my personal wish list:

MATH AND a(),&h80,b()
MATH OR a(),&h02,b()

Similar to math add, but perform a logic function on each element

Especially the AND is nice to extract 1 bit from the logic analyzer buffer, and combined with the MATH WINDOW, plot it.

That will speed up display a lot.

Volhout
PicomiteVGA PETSCII ROBOTS
 
aFox
Regular Member

Joined: 28/02/2023
Location: Germany
Posts: 76
Posted: 09:05pm 30 Aug 2023
Copy link to clipboard 
Print this post

  matherp said  V5.07.08b14

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Fixes bug in web transmit page when the size of included variables + text exceeds the size of the html file by a margin

New MATH command

MATH WINDOW inarray(), scalepoint1, scalepoint2, outarray()


This command takes the data in the inarray calculates the min and max values of the data and then rescales the data to the range specified by scalepoint1 and scalepoint2

e.g.
dim a(99),b(99)
for i=0 to 99:a(i)=i*0.2+40:next
math window a(),100,0,b()
for i=0 to 99:?a(i),b(i):next


What is this useful for? Scaling data to plot on a display would be a good example. Just set your measured data as the inarray, specify the min and max y coordinates in the order required, and the data is automatically placed in the outarray ready to plot

inarray and outarray can be any mixture of floats and integers (all the math is done as floats) and the data ready for plotting will be in outarray.
scalepoint1 can be greater or less than scalepoint2.


For a better understanding it is like

out() = a(99:0) ' All values in a reverse order

?
Gregor
Edited 2023-08-31 07:11 by aFox
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 09:07pm 30 Aug 2023
Copy link to clipboard 
Print this post

Can I have a wish? It's create a frame area and a command to send graphics to that area as a layer like as is but defined smaller area to allow for memory.
Is there a way to send graphics to a blit, non vga , not the screen?
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 09:18pm 30 Aug 2023
Copy link to clipboard 
Print this post

> option list
dosnt show the Heartbeat option if it set to on ?


on :

> option heartbeat ON
> option list
PicoMiteVGA MMBasic Version 5.07.08b14
OPTION FLASH SIZE 16777216
OPTION KEYBOARD GR
OPTION CPUSPEED (KHz) 378000
>


off works
> option heartbeat off
> option list
PicoMiteVGA MMBasic Version 5.07.08b14
OPTION FLASH SIZE 16777216
OPTION KEYBOARD GR
OPTION HEARTBEAT OFF
OPTION CPUSPEED (KHz) 378000
>
Plasma
 
aFox
Regular Member

Joined: 28/02/2023
Location: Germany
Posts: 76
Posted: 09:30pm 30 Aug 2023
Copy link to clipboard 
Print this post

  aFox said  
  matherp said  V5.07.08b14

[
New MATH command

MATH WINDOW inarray(), scalepoint1, scalepoint2, outarray()


This command takes the data in the inarray calculates the min and max values of the data and then rescales the data to the range specified by scalepoint1 and scalepoint2

e.g.
dim a(99),b(99)
for i=0 to 99:a(i)=i*0.2+40:next
math window a(),100,0,b()
for i=0 to 99:?a(i),b(i):next


What is this useful for? Scaling data to plot on a display would be a good example. Just set your measured data as the inarray, specify the min and max y coordinates in the order required, and the data is automatically placed in the outarray ready to plot

inarray and outarray can be any mixture of floats and integers (all the math is done as floats) and the data ready for plotting will be in outarray.
scalepoint1 can be greater or less than scalepoint2.


For a better understanding it is like

out() = a(99:0) ' All values in a reverse order

?
Gregor


  matherp said  
the data is automatically placed in the outarray ready to plot


I would say a dynamic FIFO is the better choice if the data get in drop by drop.

Gregor
 
aFox
Regular Member

Joined: 28/02/2023
Location: Germany
Posts: 76
Posted: 11:24pm 30 Aug 2023
Copy link to clipboard 
Print this post

Like this
MATH FIFO In(), sizeOfFifo, valueIn, Out()


Edited 2023-08-31 09:33 by aFox
 
pjmart
Newbie

Joined: 13/11/2016
Location: Australia
Posts: 9
Posted: 06:17am 31 Aug 2023
Copy link to clipboard 
Print this post

I am having trouble with establishing a WiFi connection with the latest version of the software on the Webmite as shown in the following.

> option list
WebMite MMBasic Version 5.07.08b14
OPTION DISPLAY 54, 160
OPTION WIFI DCCEX_add650, ***********, PICOE6614104035
OPTION TCP SERVER PORT 2560
> run

opening 192.168.4.1
[10] WEB OPEN tcp client "192.168.4.1", 2560
Error : WIFI not connected
>


I have been successfully running the exact same program on Version 5.07.07 without and problems.  The one difference between the two versions is the difference in the listed option for the WIFI password where the PICO serial number appears to be added to the password.  Has anyone else had a similar issue or am I missing something?

The test program is to talk over WIFI to another micro running the DCC-EX software for model train control.
Dim q%(100),r%(100)
Dim buff%(4096/8)
a%=1

LongString print q%()
Print

Print "opening 192.168.4.1"
WEB OPEN tcp client "192.168.4.1", 2560

i=0 : j=0
Do : i=i+1 :j=1-j
Print "sending TCP client request ";Str$(i), Str$(j)
If j=0 Then
 WEB tcp client request "<t 3 1 1>", buff%()
Else
 WEB tcp client request "<t 3 5 1>", buff%()
EndIf

LongString print buff%()
Pause 3000
Loop



EDIT: Success!!   Closed Terra term, disconnected the webmite and shut down the DCCEX command station, waited about 30 minutes and then turned everthing back on and it appears to be working.  Will test further
Edited 2023-08-31 17:42 by pjmart
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 511
Posted: 03:27pm 31 Aug 2023
Copy link to clipboard 
Print this post

  Plasmamac said  > option list
dosnt show the Heartbeat option if it set to on ?


on :

> option heartbeat ON
> option list
PicoMiteVGA MMBasic Version 5.07.08b14
OPTION FLASH SIZE 16777216
OPTION KEYBOARD GR
OPTION CPUSPEED (KHz) 378000
>


off works
> option heartbeat off
> option list
PicoMiteVGA MMBasic Version 5.07.08b14
OPTION FLASH SIZE 16777216
OPTION KEYBOARD GR
OPTION HEARTBEAT OFF
OPTION CPUSPEED (KHz) 378000
>


I beleive Heartbeat ON is the default and so has never been reported in the Options.
Regards, Kevin.
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 08:58pm 31 Aug 2023
Copy link to clipboard 
Print this post

Hi Peter

In trying to implement a HTTP POST handler using the example in the Webmite v3 manual and  I've come across a strange phenomenon.

Occasionally I get the full WEB TCP READ a%, buff%() buffer content, per below;

1<<mm.info
0       17      505

buff%() below
POST /sett.html HTTP/1.1
Host: 172.16.1.63
Origin: http://172.16.1.63
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15
Referer: http://172.16.1.63/sett.html
Content-Length: 9
Accept-Language: en-GB,en;q=0.9


But mostly only the following gets through the WEB TCP READ a%, buff%()


1<<mm.info
0       0       9

buff%() below
geyserIn=

Must have been a POST
geyserIn=
9 <s1 9<<LLen
geyserIn                 0
0<GSP


While Wireshark shows the packet as being complete per below;


Hypertext Transfer Protocol
   POST /sett.html HTTP/1.1\r\n
       [Expert Info (Chat/Sequence): POST /sett.html HTTP/1.1\r\n]
           [POST /sett.html HTTP/1.1\r\n]
           [Severity level: Chat]
           [Group: Sequence]
       Request Method: POST
       Request URI: /sett.html
       Request Version: HTTP/1.1
   Host: 172.16.1.63\r\n
   Origin: http://172.16.1.63\r\n
   Content-Type: application/x-www-form-urlencoded\r\n
   Accept-Encoding: gzip, deflate\r\n
   Connection: keep-alive\r\n
   Upgrade-Insecure-Requests: 1\r\n
   Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
   User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15\r\n
   Referer: http://172.16.1.63/sett.html\r\n
   Content-Length: 9\r\n
       [Content length: 9]
   Accept-Language: en-GB,en;q=0.9\r\n
   \r\n
   [Full request URI: http://172.16.1.63/sett.html]
   [HTTP request 1/1]
   File Data: 9 bytes
HTML Form URL Encoded: application/x-www-form-urlencoded
   Form item: "geyserIn" = ""
       Key: geyserIn
       Value:


Is there any design reason why the Header POST /sett.html HTTP/1.1 and the subsequent HTTP Headers are not making it through to the buff%()?

I notice that the GET Header consistently makes it through to buff%()

Your guidance will be appreciated.
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
     Page 7 of 11    
Print this page
© JAQ Software 2024