Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:27 25 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.09.00 release candidates

     Page 11 of 13    
Author Message
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 02:58pm 11 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter

Could you please consider the following request for additional functions;

MM.INFO(SSID$) returns the currently connected  SSID as a string
MM.INFO(RSSI) returns the currently connected SSID’s RSSI as an integer

These would complement and work in the same vein as MM.INFO(ip address).

Many thanks
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:25am 16 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter,

I have noticed the divide by zero error is not well implemented in PicoMite V5.09.00RC5

See this program:
a=100
b=0
Do
 Text 0,0,Str$(a/b)
Loop


When run on a PicoMite (non-VGA) with LCD display attached (in my case a SSD1306I2C32, but I have also seen this on the GEEK board that has an SPI LCD) the initial error is correct (divide by zero).

But (due to the loop probably) the conseccutive errors are Display Not Configured, until it crashes (reboots).

> run
[4] Text 0,0,Str$(a/b)
Error : Divide by zero
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured
[4] Text 0,0,Str$(a/b)
Error : Display not configured

 Error: Invalid address - resetting


I have MMBasic statements in my code to prevent the program from from crashing, but it would be nice to fix this error handling...

Volhout

P.S. just to place things in perspective. I found this developping my LC meter. Since you connect to unknown components an accidental divide by zero could happen. And it starts an avalanche (the error and associated RESET remove the OPTION AUTORUN 1 from the option list, meaning that the test instrument does not work anymore, and needs to connect to a PC to install OPTION AUTORUN 1 again). So I littered the program with non-zero checks, just to make sure there is no error.
Edited 2024-07-16 17:13 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 10:24am 16 Jul 2024
Copy link to clipboard 
Print this post

Your example output makes no sense. The divide by zero error stops the program so how is the loop continuing?

Also, remember you can use OPTION AUTORUN n/ON/OFF [,noreset]
Edited 2024-07-16 20:33 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 11:03am 16 Jul 2024
Copy link to clipboard 
Print this post

  matherp said  Your example output makes no sense. The divide by zero error stops the program so how is the loop continuing?

Also, remember you can use OPTION AUTORUN n/ON/OFF [,noreset]


Thanks for the tip, will implement it.

About the output: yes it makes no sense, but regardless above is what I see, running the exact above program.

> option list
PicoMite MMBasic Version 5.09.00RC5
OPTION SYSTEM I2C GP26,GP27
OPTION AUTORUN  1
OPTION COLOURCODE ON
OPTION LCDPANEL SSD1306I2C32, RLANDSCAPE


When run from the commandline (no loop to repeat, no run)
> option list
PicoMite MMBasic Version 5.09.00RC5
OPTION SYSTEM I2C GP26,GP27
OPTION AUTORUN  1,NORESET
OPTION COLOURCODE ON
OPTION LCDPANEL SSD1306I2C32, RLANDSCAPE
> text 0,0,str$(1/0)
Error : Divide by zero
Error : Display not configured
>


I have no idea where the "Display not configured" comes from.

Volhout
Edited 2024-07-16 21:07 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 11:09am 16 Jul 2024
Copy link to clipboard 
Print this post

 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 11:21am 16 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter,

I have done some more testing:
The GEEK (PicoMite with SPI display) works correct.
The PicoMiteVGA works correct.
The Thermal Imager (ILI9341) does not show the problem, or it would have creashed during my development constantly.

The PicoMite with I2C display on system I2C bus shows the 'Display not configured".
It could be related to I2C displays? Or the SSD1306I2C32 (128x32).

At home I have a SSD1306I2C, that is the larger version 128x64. I can try tonight if that one also shows the problem.  

Volhout
Edited 2024-07-16 21:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 11:29am 16 Jul 2024
Copy link to clipboard 
Print this post

Out of interest please try the attached with the I2C display


PicoMite.zip
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 12:18pm 16 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter,

I configured the SSD1306I2C without the actual SSD1306 (128x64) display, and noticed it is not showing the "Display not configured" error. Then (also without the actual display attached, I configured SSD1306I2C32 and it showed the error message. I seems related to 1 specific display. And it shows regardless if the actual display is attached or not.

Then I tried your uf2 file, and that one erased all options. And after installing the SSD1306I2C32 display the error message "Display not configured" is gone.
It feels like this version solves the issue.

Was the SSD1306I2C32 display not connected to the error output ? So the code wanted to output the "divide by zero" error message, but had no pipe to send it to ? Causing a second error...

Thank you,

Harm
Edited 2024-07-16 22:20 by Volhout
PicomiteVGA PETSCII ROBOTS
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 08:01am 18 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter

Further to Harm's testing here is the output from the WebMite with the 1.3" OLED LCD

With the SSD1306I2C configured but not connected

> RUN
[4] Text 0,0,Str$(a/b)
Error : Divide by zero
> option list
WebMite MMBasic Version 5.08.00
OPTION SYSTEM I2C GP20,GP21
OPTION LCDPANEL SSD1306I2C, LANDSCAPE, 2
> list
a=100
b=0
Do
 Text 0,0,Str$(a/b)
Loop
>


Now updating the firmware 5.09RC5

With the SSD1306I2C configured and not connected

> run
[4] Text 0,0,Str$(a/b)
Error : Divide by zero
> option list
WebMite MMBasic Version 5.09.00RC5
OPTION SYSTEM I2C GP20,GP21
OPTION LCDPANEL SSD1306I2C, LANDSCAPE, 2
> list
a=100
b=0
Do
 Text 0,0,Str$(a/b)
Loop
>


Hope this helps
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 08:47am 18 Jul 2024
Copy link to clipboard 
Print this post

  Quote  Hope this helps


With what? The operation seems exactly as I would expect.
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 10:33am 18 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter

I was picking up similar issues on my one WebMite. Thought to try Harm's test on the other WebMIte to see if it was related to the display its self, but apparently not. I swopped displays and it's still working correctly. Harm didn't mention testing it on a Webmte so I thought to round out the list, albeit with different hardware.

The issues I had last year with F2 or nowadays even with run causing problems seems to have escalated, but it seems to be linked to when changes have been made to the code; but not the changes themselves. The perennial ADC error message and nowadays an occasional end sub encountered without corresponding sub. Resetting the WebMite and then reconnecting to the USB port clears up the issue on the first or second retry cycle. I know I'm on a Mac etc. If you want I can screen grab and post the console, which looks very similar to what Harm was experiencing.

The problems I was having with the webpage refresh rate last year has resolved itself through using the TCP Send and rolling my own HTTP and JSON string response on a 2s refresh currently. Anything relating to high refresh rate (1-10s) and relying on the {} of serving a page with content  isn't stable. I tried writing the JSON string as a file on the Drive and then serving it through the Page server from the Drive file, which improved the stability but not significantly so. "Casual" usage of a webpage on an ad hoc basis seems to work fine.
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 10:57am 18 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter

This is what I'm currently experiencing. The only change I've made to the code is the inclusion of 4 lines of text in a /* */ existing rem block.

Saved 44616 bytes
12:42:15
Date$ , Time$ , MM.Info(BOOT COUNT) , MM.ErrMsg$ , MM.ERRNO , MM.Watchdog , IP Address
18-07-2024,12:42:15, 113,, 0, 0,ip address
# of Boots  35 since 17-07-2024 13:18:33
# of Starts  49 since 17-07-2024 13:18:33
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Unknown command
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured
[193] ADC OPEN 166666,3,ADCComplete 'All 3 ADC start, sum of sampling <=500kHz
Error : Display not configured


Reseting the WebMite returns the Terminal cursor and I can reconnect to the WebMite through the USB. Which reboots normally and gives me the standard IP connection and TCP server start message. Then doing another F2 without changing anything and we're off to the races.

WebMite MMBasic Version 5.09.00RC5
OPTION SYSTEM I2C GP20,GP21
OPTION COLOURCODE ON
OPTION CPUSPEED  252000 'KHz
OPTION DISPLAY 58, 157
OPTION LCDPANEL SSD1306I2C, LANDSCAPE, 2
OPTION WIFI DO-788455B, ************, CSECOS, ip address, 255.255.255.0, gateway
OPTION TCP SERVER PORT 80
OPTION TELNET CONSOLE ON
OPTION RTC AUTO ENABLE


Another quirk I've noticed in the rem block is one comment which is tabbed keeps losing the leading tabs when saved.








Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 10:55pm 21 Jul 2024
Copy link to clipboard 
Print this post

where can i find some infos about the HID support ? thx
Plasma
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 04:51pm 24 Jul 2024
Copy link to clipboard 
Print this post

Prompted by a comment from Stanley, Ive added the map command and function to the PicoMiteVGA and PicoMiteVGAUSB based on the CMM2 functionality (see the CMM2 manual).

Load up the new firmware and run the following:

PicoMiteVGA.zip

' Set up an array to hold the colour mappings we are going to use
Dim integer cmap(6)

'Clear the screen
MODE 2
Map reset
CLS

'Set up 6 colours in the array
cmap(1)=RGB(red)
cmap(2)=RGB(green)
cmap(3)=RGB(blue)
cmap(4)=RGB(yellow)
cmap(5)=RGB(magenta)
cmap(6)=RGB(cyan)
' Do an initial update of the Colour map to set up our colours
domap

'Display an outer circle in white
Circle MM.HRes/2,MM.VRes/2,MM.VRes/2-1,0,,RGB(white),RGB(white)

' Now draw a simple colour pie chart using our new colours with the ARC command
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,0,30,Map(1)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,30,60,Map(2)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,60,90,Map(3)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,90,120,Map(4)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,120,150,Map(5)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,150,180,Map(6)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,180,210,Map(1)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,210,240,Map(2)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,240,270,Map(3)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,270,300,Map(4)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,300,330,Map(5)
Arc MM.HRes/2,MM.VRes/2,0,MM.VRes/2-3,330,360,Map(6)

' Start a never ending loop
Do
 cmap(0)=cmap(6)
 For i=5 To 0 Step -1
   cmap(i+1)=cmap(i)
 Next

 domap
 Pause 400

Loop

Sub domap
 Local integer i
 Map (0)=RGB(brown)
 For i=1 To 6
   Map (i)=cmap(i)
 Next
 Map set
End Sub




Edited 2024-07-25 02:52 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 07:51pm 24 Jul 2024
Copy link to clipboard 
Print this post

Hi Peter,

Can you explain what the difference is between the Map(I) as function, and an array Map() in this application.?
Is the to avoid DIM ing an array Map(6), or using Map reset.?

Thanks for the explanation.

Volhout
Edited 2024-07-25 05:53 by Volhout
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:51pm 24 Jul 2024
Copy link to clipboard 
Print this post

I'm frustrated my pico vga is usb so can't try but I'll make a vga board later.
until I can try map, what's it do please?
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:51pm 24 Jul 2024
Copy link to clipboard 
Print this post

I'm frustrated my pico vga is usb so can't try but I'll make a vga board later.
until I can try map, what's it do please?
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:51pm 24 Jul 2024
Copy link to clipboard 
Print this post

oops
Edited 2024-07-25 06:53 by stanleyella
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 09:59pm 24 Jul 2024
Copy link to clipboard 
Print this post

  Quote  Can you explain what the difference is between the Map(I) as function, and an array Map() in this application.?


The map( function returns a 24-bit RGB value that will pick up the slot that you have specified a colour for

so:

MAP(1)=rgb(brown)
map set

Will cause any "normally" blue pixels to turn brown. In order to then use a drawing command with the brown colour use the map(1) function as the colour

This should be obvious in the example. This is how the CMM2 does it using a H/W colour lookup table (CLUT) whereas the PicoMite does it in the VGA driver in S/W.

NB: this functionality is only available at CPU speeds of 252 and 378 MHz
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:26pm 24 Jul 2024
Copy link to clipboard 
Print this post

Stan,
  Stan said  I'm frustrated my pico vga is usb so can't try

  Peter said   Ive added the map command and function to the PicoMiteVGA and PicoMiteVGAUSB
 
     Page 11 of 13    
Print this page
© JAQ Software 2024