Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:29 27 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/VGA/WEB V5.07.08 release candidates

     Page 8 of 18    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 09:15am 16 Oct 2023
Copy link to clipboard 
Print this post

  aFox said  

Let is make it a little easier for beginners.

Gregor


Hi Gregor,

I have the feeling you have a good idea what is needed to make the user manual better.
Since we are a community (everybody can contribute) you could write the text and drawings you think would explain better, and communicate this to Geoff. He is very open to suggestions, and may include it in the manual.

I have done the same for the section about PIO, and it has (with minor adaptations) been adopted in the user manual.

So.. create a explanation of the power section and it's variances, and offer it to Geoff.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 10:21am 16 Oct 2023
Copy link to clipboard 
Print this post

It's not easy to write something aimed at beginners once you have experience in MMBasic. You tend to forget the beginners problems as they no longer apply. :)  My dad was a physics teacher and he told me that the best way to learn a subject is to teach it. That's very true - it forces you to learn the fundamentals and pass that knowledge on to others.
Mick

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

Regular Member

Joined: 15/08/2023
Location: Australia
Posts: 43
Posted: 05:05pm 16 Oct 2023
Copy link to clipboard 
Print this post

+1
 
  Quote     the best way to learn a subject is to teach it


      this is true  !

           
MMBasic  is now better than  the  AmigaBasic  
 
           
 especially when using the built-in  AmigaDos System LIBRARY call`s


             Wayne  !

`
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9124
Posted: 06:23pm 16 Oct 2023
Copy link to clipboard 
Print this post

V5.07.08RC9

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

I was doing the manual and trying to think how to document the differences between BLIT MEMORY and BLIT COMPRESSED on the VGA version vs the LCD versions and decided it was easier to equalise the firmware so...


BLIT COMPRESSED address, x, y [,col]
and
BLIT MEMORY address, x, y [,col]

Now work on all framebuffers and physical displays including transparent colours on the TFTs.

As on the VGA version "col" is a number between -1 and 15. -1 indicates there is no transparent colour and is the default. 0 to 15 correspond to the 16 RGB121 colours supported by framebuffers and the VGA display

This is some pretty sneaky code which took a full afternoon to get every limit condition right (I hope)

           char tobuff[w/2], *to;
           getnextnibble(&fc,1); //reset the decoder
           for(int y=y1;y<y1+h;y++){
               int x=x1;
               while(1){
                   to=tobuff;
                   int otoggle=0;
                   char c;
                   int ww=0;
                   int xx=-1;
                   while((c=getnextnibble(&fc,0))==blank){
                       x++;
                       if(x==x1+w)break;
                   }
                   if(x==x1+w)break; //nothing found so exit
                   *to=c;
                   otoggle ^=1;
                   xx=x;
                   x++;
                   ww=1;
                   if(xx!=x1+w-1){
                       while((c=getnextnibble(&fc,0))!=blank){
                           x++;
                           ww++;
                           if(otoggle==0){
                               *to=c;
                               otoggle ^=1;
                           } else {
                               *to|=(c<<4);
                               otoggle^=1;
                               to++;
                           }
                           if(x==x1+w)break;
                       }
                   }
                   x++;
                   if(xx+ww>HRes){
                       ww=HRes-xx;
                   }
                   if(xx>=0 && ww>0 && y>=0 && y<VRes)copyframetoscreen((unsigned char *)tobuff,xx, xx+ww-1, y, y, 0);
                   if(xx<0 && xx+ww>=0){
                       char *t=tobuff-(xx/2)-(xx&1);
                       ww+=xx;
                       if(ww>0)copyframetoscreen((unsigned char *)t,0, ww-1, y, y, xx&1);
                   }
                   if(x>=x1+w)break;
               }          
           }

Edited 2023-10-17 04:25 by matherp
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 06:46pm 16 Oct 2023
Copy link to clipboard 
Print this post

ok, so we now can use Black in a Sprite as long as we sacrifice a other color for transparency?    
This feels like Christmas .. but that also meens, that I have to repaint the Sprites for PetRobots once again
Edited 2023-10-17 04:48 by Martin H.
'no comment
 
aFox
Regular Member

Joined: 28/02/2023
Location: Germany
Posts: 76
Posted: 08:34pm 16 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  
  aFox said  

Let is make it a little easier for beginners.

Gregor


Hi Gregor,

I have the feeling you have a good idea what is needed to make the user manual better.
Since we are a community (everybody can contribute) you could write the text and drawings you think would explain better, and communicate this to Geoff. He is very open to suggestions, and may include it in the manual.

I have done the same for the section about PIO, and it has (with minor adaptations) been adopted in the user manual.

So.. create a explanation of the power section and it's variances, and offer it to Geoff.

Regards,


Volhout

I would do it, but I'm not an expert in this field as I can't judge the various solutions that exist on the internet.
I need your help, sketches, etc.

Maybe sketches for task/issue 1 to 7

Gregor
Edited 2023-10-17 06:35 by aFox
 
TheMonkeys

Regular Member

Joined: 15/12/2022
Location: Australia
Posts: 59
Posted: 03:21am 17 Oct 2023
Copy link to clipboard 
Print this post

A quick question.
> option list
WebMite MMBasic Version 5.07.08RC8
AUTORUN 1
OPTION LIBRARY_FLASH_SIZE  18000
OPTION COLOURCODE ON
OPTION DISPLAY 52, 180
OPTION WIFI ********, ********, ********
OPTION TCP SERVER PORT 2040
> ? mm.info(autorun)
On


I have to
FLASH LOAD 1
after updating code, otherwise watchdog will fail.

Thoughts?

Cheers,

Chris.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 07:13am 17 Oct 2023
Copy link to clipboard 
Print this post

Gregor.

The Raspberry Pi Pico user manual is your best friend...

1. USB connector.
No drawing needed. Just plug in the micro USB cable

2. Battery 1.8V to 5.5V
Connect the + of the battery to the Vsys pin (pin 39) and the - of the battery to GND (pin 38). Use a diode to prevent pin swaps causing damage. Diode = 1N5817 or alike.


or




3. Battery 1.8V to 5.5V and charging module
There are many different charging modules.




4. 5V power supply (linear regulator)
I am not going into details on this, just google "LM7805" and connect the 5V output as in 2. above.

5. Noisy 5V power supply
Nothing you can do about that. The pico does not use 5V directly, only to make 3.3V

6. 3.3V power supply (linear regulator)

Best if you disable the on board 3.3V regulator by shorting 3.3V_EN (pin 37) to GND (pin 38)

7. Noisy 3.3V power supply
Use a linear regulator as in 6.

Hope this helps

Volhout

P.S. typically your circuits work more reliable when you add a capacitor (10nF) from the RUN (pin 30) to ground. This prevents accidental RESET's in electrical noisy environments (industrial/welders/CF lights).
Edited 2023-10-17 17:21 by Volhout
PicomiteVGA PETSCII ROBOTS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 12:14pm 17 Oct 2023
Copy link to clipboard 
Print this post

Excellent informative post. I've bookmarked it. Thanks.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
aFox
Regular Member

Joined: 28/02/2023
Location: Germany
Posts: 76
Posted: 06:19pm 17 Oct 2023
Copy link to clipboard 
Print this post

I agree with Lizby.

@Volhout

Two questions:

1. Which P-channel MOSFET do you suggest?

2. In case 6 we have to connect the output current (+) to VSYS, right?

Sketch 2 is build on sketch 1 and sektch 3 is build on sketch 2.
Step by step, very nice.

I think that can be summed.
Many thanks

Edit:
In sketch 2 and 3 is the Gain of the Mosfet connected to VBUS.
Is  5V power on the USB connector or VBUS, the battery will be switched to off.
Right?

Gregor
Edited 2023-10-18 04:49 by aFox
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 358
Posted: 07:22pm 17 Oct 2023
Copy link to clipboard 
Print this post

  Quote  2. In case 6 we have to connect the output current (+) to VSYS, right?

The output of the linear regulator in this case is 3.3V, which is what we want to use as supply. Connect to 3.3V pin on the RP2040 board and disable the on board switchmode regulator.

Fred
 
aFox
Regular Member

Joined: 28/02/2023
Location: Germany
Posts: 76
Posted: 07:36pm 17 Oct 2023
Copy link to clipboard 
Print this post

  Pluto said  
  Quote  2. In case 6 we have to connect the output current (+) to VSYS, right?

The output of the linear regulator in this case is 3.3V, which is what we want to use as supply. Connect to 3.3V pin on the RP2040 board and disable the on board switchmode regulator.

Fred


What happens if I want to transfer data via the USB port in this case?

Gregor
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:55pm 17 Oct 2023
Copy link to clipboard 
Print this post

Raspberry Pi Pico documentation
The Raspberry Pi Pico Datasheet, sections 4.4 (Powerchain), 4.5 (Powering Pico) and 4.6 (Using a Battery Charger) is the definitive information on powering these devices. :)

The main thing is that you mustn't power the Pico via its VBUS pin unless you can guarantee that the USB won't be connected. If you don't follow this rule the computer's USB chip may get damaged.

Powering via VSYS is ok as it is fed from VBUS via a diode. This prevents the back-feed.

You can also power at 3V3 (into the 3V3 pin) from an external regulator. If you do this then you should connect 3V3EN to GND to disable the on-board switching supply.
Mick

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4246
Posted: 07:55pm 17 Oct 2023
Copy link to clipboard 
Print this post

Nothing happens, that works great.
All platforms Mick and Peter have developed use this configuration.

Volhout
PicomiteVGA PETSCII ROBOTS
 
aFox
Regular Member

Joined: 28/02/2023
Location: Germany
Posts: 76
Posted: 12:52am 18 Oct 2023
Copy link to clipboard 
Print this post

Which P-channel MOSFET do you suggest?
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 02:46am 18 Oct 2023
Copy link to clipboard 
Print this post

@matherp

Hi Peter;

I don't know if this is an error or my understanding of mm.info$(version) as used in a .bas web program. I 1st saw this in RC8, don't know if it goes further back.

I am using RC9 on webmite.



From 5.07.07 manual I saw this;



Tested on command line , no errors;



Used it in a web program as follows;



Saved and ran the web page and got the following error;



F4 into editor which takes me to the error and the $ is missing;



This is repeatable every time. Why is the $ disappearing on F1 and/or F2 in the editor?

Suggestions?

Thanks for all your hard work. If you need more info, no pun intended, let me know

Hans ...

PS: Tested on RC4 of Picomite same error in editor, $ disappears and throws error.
Edited 2023-10-18 13:03 by Hans
 
TheMonkeys

Regular Member

Joined: 15/12/2022
Location: Australia
Posts: 59
Posted: 03:27am 18 Oct 2023
Copy link to clipboard 
Print this post

Hi Hans,
From the Documentation:
  Quote  MM.INFO(VERSION) Returns the version number as a floating point number.

This is regardless of whether you specify MM.INFO(VERSION) or MM.INFO$(VERSION).

Also, that "volvo","saab",... bit, I recall seeing that on Mozilla.org.  

Cheers,
Chris
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 04:06am 18 Oct 2023
Copy link to clipboard 
Print this post

Keywords are tokenised in the program.
When you EDIT, the tokens are converted back to their text representation.
Once it gets tokenised, MMBasic forgets what you originally used

Use ? in a program and it gets listed as "Print"
Use mm.info$() and it gets listed as mm.info()

and many more...

Jim
Edited 2023-10-18 14:07 by TassyJim
VK7JH
MMedit   MMBasic Help
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 06:29am 18 Oct 2023
Copy link to clipboard 
Print this post

  matherp said  V5.07.08RC9

BLIT COMPRESSED address, x, y [,col]

PICOMITE VGA
Good morning Peter,

First of all, thank you very much for the further development.

I've tried this, and it works so far.
So I've colored all the areas that should remain transparent in magenta.

SPRITE COMPRESSED address, x, y ,9 workes, all magenta parts of the Sprite are transparent, so far so good, but ...
All black areas in the Sprite are also still transparent.
so I now have 2 transparent colors in the Sprite, Black and [,col]

Is this how it's supposed to work, or did I miss something?
Edited 2023-10-18 17:03 by Martin H.
'no comment
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:35am 18 Oct 2023
Copy link to clipboard 
Print this post

  aFox said  Which P-channel MOSFET do you suggest?


What someone suggests isn't necessarily what you can get or what you can solder. There is an excellent one (DMG2305UX) suggested in the Datasheet, but it's surface mount so it's inconvenient to use unless you are also surface mounting the PicoMite.

P-Channel MOSFETs aren't all that easy to find in through-hole designs now. I suggest that you look through a catalogue of components that you *can* get and look for one that has a low threshold voltage (well below the incoming voltage that you want to use) and a low "on" resistance. It also needs to be able to carry at least 5V (that'll be easy) and something above 500mA.

It's not easy to sort out components like this when you are trying to find something that's available internationally.

If you would like to discuss this further please start a new thread.
Edited 2023-10-18 17:38 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
     Page 8 of 18    
Print this page
© JAQ Software 2024