Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 07:28 22 Jan 2022 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 Alpha Firmware - a27 onwards - starting on displays

     Page 4 of 14    
Author Message
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 363
Posted: 12:11am 23 Jun 2021
Copy link to clipboard 
Print this post

  matherp said  Please try a33 for SDcard. I've set it to bitbang SDcard but SPI LCD on the same pins. It automatically changes mode depending on use


PicomiteV5.07.00a33.zip


with a33 and a34 it is the same problem (Error : There is no valid FAT volume).

As I said you before, may be it come from the sdcard size. With 16go, it is ok, but with 32go it bug
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 560
Posted: 03:48am 23 Jun 2021
Copy link to clipboard 
Print this post

  disco4now said  
  matherp said  Please try a33 for SDcard. I've set it to bitbang SDcard but SPI LCD on the same pins. It automatically changes mode depending on use

Now works for me. Did not read SDCARD before when LCDPANEL connected.


Well not so fast. Today it does not. SDCARD NOT FOUND !. But I am not mad. Here is what I find that may help.

ILI9341 and SDCARD work together if the LCDPANEL is plugged into an already Powered up Picomite.
SDCARD will continue to work after a soft reset. (i.e. ground run pin or added reset button)
SDCARD will continue to work after CPU RESTART

SDCARD gives SDCARD NOT FOUND after either of the below.
Remove and reinsert the SDCARD
Power restart.

It can only be recovered by removing LCDPANEL, restarting and then hot plugging the LCDPANEL. Press reset button to then initialise the LCDPANEL and both work again.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 5688
Posted: 07:03am 23 Jun 2021
Copy link to clipboard 
Print this post

  Quote  SDCARD gives SDCARD NOT FOUND after either of the below.
Remove and reinsert the SDCARD
Power restart.


  Quote  but with 32go it bug


Works for me in all the above with all my cards including two versions of 32GB card ones at both 125000KHz and 250000KHz. I am certain there is no firmware issue but there is clearly an electrical one as evidenced by what disco4now reports. The SDcard is only initialised when it is first accessed so it can't know whether power has just been applied or a restart has happened

goc30 - is your 32GB card formatted FAT32? NB exFAT is not supported

Have you followed the guidelines I posted earlier re power etc.?

Please try putting a 2R2 or even 10 ohm resistor in the power line to the SDcard with both a 10uF and 0.1uF capacitor across the rails directly at the SDcard

NB the code is now a direct lift from the CMM2
Edited 2021-06-23 17:08 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1482
Posted: 07:09am 23 Jun 2021
Copy link to clipboard 
Print this post

I'm using a 32GB Samsung EVO micro SD card (in an adapter) because it's what I happened to have and that's working fine so it doesn't look as if it's a card capacity issue.

Grounding 3.3EN will give a hard reset to save on plugging & unplugging. It shuts down the 3.3v SMPS.
Edited 2021-06-23 17:10 by Mixtel90
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 5688
Posted: 07:26am 23 Jun 2021
Copy link to clipboard 
Print this post

Mixtel90 reminds me that this is the first time we are using a system with a SMPS 3.3V supply. Those with issues could also try a big cap across the power rails of the Pico. I've just added 1000uF and the Pico powers up OK with that.
mode
You can also try setting the power supply to PWM mode - SETPIN GP23,dout, pin(GP23)=1. If this helps I can do it in the firmware
Edited 2021-06-23 17:32 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 2077
Posted: 09:30am 23 Jun 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Also how does:

  OPTION SYSTEM SPI CLKpin, MOSIpin, MISOpin

Interact with:

  SETPIN pin, SPI{0|1}{SCK|TR|RX}


Try it and see  

Option system will lock one of the SPI channels so for other use you have to use the other or bitbang the pins - more than adequate for a M7219

We don't use the H/W CS pins. In all versions of MMbasic CS is driven by firmware. Many devices won't accept the H/W approach (e.g.SDcards)


Thanks Peter, I'll give it a bash.

Best wishes,

Tom
CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 1856
Posted: 11:33am 23 Jun 2021
Copy link to clipboard 
Print this post

Re BLIT READ #

Many tile-based games do LOAD IMAGE and then a series of BLIT READ #s to read the tiles, and never do BLIT READ again--or if there is one tile per BMP file, a LOAD IMAGE and BLIT READ # for each tile (and no BLIT READs thereafter).

Since the fault in the ILI9488 MISO drive prevents BLIT READ, could we have a BLIT LOAD # to perform the work of LOAD IMAGE and BLIT READ?

I see two forms as being useful: BLIT LOAD # "file.bmp" for single-tile files, and
BLIT LOAD # "file.bmp" x,y,width,height for multi-tile image files.

But if the latter seems too complicated, just BLIT LOAD # "file.bmp" would provide the desired functionality.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 5688
Posted: 12:10pm 23 Jun 2021
Copy link to clipboard 
Print this post

  Quote  Many tile-based games do LOAD IMAGE and then a series of BLIT READ #s to read the tiles,


I don't really see the PicoMite as a viable games machine, there simply isn't enough memory.

If I implemented BLIT READ as you suggest you would only be able to read a total area of  165 pixels square and that would completely use all variable memory
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 2077
Posted: 12:28pm 23 Jun 2021
Copy link to clipboard 
Print this post

  matherp said  I don't really see the PicoMite as a viable games machine, there simply isn't enough memory.


That sounds par for the course since I am building a (noddy, and purely for my own edutainment) handheld games console powered by the Pico.

Best wishes,

Tom
CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1482
Posted: 12:39pm 23 Jun 2021
Copy link to clipboard 
Print this post

Maybe not *quite* the days of making characters out of parts of a custom font, but you never know. :)
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 1044
Posted: 02:26pm 23 Jun 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Many tile-based games do LOAD IMAGE and then a series of BLIT READ #s to read the tiles,


I don't really see the PicoMite as a viable games machine, there simply isn't enough memory.

If I implemented BLIT READ as you suggest you would only be able to read a total area of  165 pixels square and that would completely use all variable memory


I think this is the 3rd thread since the beginning of the picomite MMBasic project, and in the evolution of the software the original goal may have become fuzzy.

As I recall it, the intention was a newer version of the MX170 microcontroller. Pricewise in the MX170 ballpark, but with USB build in, and enhanced feature set.

What was missing in the MX170 was mainly SD card support (many tried Peters tinyFAT version on the MX170). The addition of the MATH function is also a nice added feature (I especially like the FFT possibility).

For a microcontroller application, additional features would be more like
- enhanced ADC (I suggested such in another thread) to read burst data on multiple channels.
- enhanced PULSE output to allow sending patterns on multiple output pins (in example I/Q signals). The PIO sequencer in the pico would make this easy, IQ modulating serial (or SPI) data.
- support for CAN bus and RS485 (and a CSUB for the RS485 CRC...).
- something Geoff brought up 4 years ago for the platform: stepper motor support (but it never got implemented).
- enhanced timer measurements (feed a serial signal into a GPIO pin and timestamp edges in the signal, feed that in a array for analysis/processing).
- support for (maybe arduino style) ethernet connection.

Things that are in the MX170, that are not implemented yet (keypad,
distance sensor, 1602 LCD support, servo (although PWM can do it), I2C slave)

Now that I have upset everybody, I will very silently sneak out of this thread, and do what I do best...drink coffee...

Volhout
Edited 2021-06-24 00:44 by Volhout
If nothing goes right ... turn left
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 5688
Posted: 02:44pm 23 Jun 2021
Copy link to clipboard 
Print this post

  Quote  For a microcontroller application, additional features would be more like


Totally agree with this sort of list. No promises on what will and won't make it but this captures the essence of where I see the Picomite targetted
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1482
Posted: 03:19pm 23 Jun 2021
Copy link to clipboard 
Print this post

Sounds right - the Pico itself was never designed to be a computer and it's not sold as such. If people can get it to play games then all well and good, but it's still a microcontroller.  :)
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 2077
Posted: 04:16pm 23 Jun 2021
Copy link to clipboard 
Print this post

Whilst I don't disagree per se I feel I can in my ignorance offer a different perspective. One of the advantages and selling points of the 'mite family of microcontrollers, especially as an introductory/educational tool, is that programs can be edited on them directly (albeit via a serial terminal.) I believe that a handful of relatively small enhancements that some might categorise as more in the remit of a microcomputer could significantly improve this capability.

Best wishes,

Tom
Edited 2021-06-24 02:36 by thwill
CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1482
Posted: 05:23pm 23 Jun 2021
Copy link to clipboard 
Print this post

The PicoMite has far less memory than any other of the 'mite platforms though. The memory isn't in a single block either so it has to be managed. There's a total of 264k, which has to hold everything - MMBasic, variables, fonts - the lot. I don't know if you investigated the VGA mod for the Pico, but IIRC he used about 220k for the frame buffer, leaving just 44k for the program. Not only that, the frame buffer has to be accessed in "stripes" because it's fragmented. It's clever, but not a realistic thing to do.

Because of the small memory the PicoMite can't be thought of as anything more than a souped up MX170. In other words, if your game would run on one of those then it's suitable for the Pico.

Although they are both MMBasic platforms, the PicoMite is an embedded controller and the CMM2 is suitable for gaming.
Edited 2021-06-24 03:25 by Mixtel90
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 2077
Posted: 05:41pm 23 Jun 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  ... Although they are both MMBasic platforms, the PicoMite is an embedded controller and the CMM2 is suitable for gaming.


It still has a lot more memory than the CMM1 I believe

I'm not asking for anything to do with gaming, graphics or VGA, and to be honest I rarely access even my CMM2 through anything other than the serial terminal.

EDIT: When I wrote of building a games console these are the displays I have in mind initially:
    - https://www.youtube.com/watch?v=iwy1vCu-SLg
    - https://www.youtube.com/watch?v=bI9LFztEO0c

All I would request is some of the CMM2s tweaks to the OS/file-system and perhaps to see if anything can be done to improve the EDITor, I assume the CMM2's EDITor is out of the question ?

Anyway, this is Peter's project, and unless money is involved my opinion is that whomever is doing the work gets to decide what and how it is done ... we can just try to prod him a bit.

Best wishes,

Tom
Edited 2021-06-24 03:55 by thwill
CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 1856
Posted: 06:02pm 23 Jun 2021
Copy link to clipboard 
Print this post

VegiPete's ChemiChaos on the PicoMite

(Bad camera artifacts.)

Youtube video: ChemiChaos

Code and 2 bmp files:
cc_pico.zip

I put a jumper on the snipped MISO line and tried a different ILI9341, and the SD card worked. I put the prior failing ILI9341 back in, and it still failed, so apparently there are some ILI9341s which will kill access to the SD card in the same way that the ILI9488 does (or in a similar way with the same result).

This same program works on the F4. The ILI9341 which fails on the PicoMite works perfectly on the F4.

I think this program also still works on the CMM2 (with VegiPete's original ChemiChaosSprites.png sprite image file)--I haven't tested it with the PicoMite changes in it.

~
Edited 2021-06-24 04:04 by lizby
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1482
Posted: 06:03pm 23 Jun 2021
Copy link to clipboard 
Print this post

:)

But there isn't an OS to tweak. :)

The CMM2's editor replaces the contents of the RAM completely - there's nothing of the user program there. What's being edited is the ASCII file on the SD card. When you run the program it gets tokenised and replaces the editor. You *might* be able to do something similar on the PicoMite, but it couldn't be used without the SD card then - which isn't included on a normal Pico.

I don't know about the file system. It is probably a matter of having enough available memory to act as buffers. As I said before, the RAM is fragmented - you haven't got access to all of it at the same time, it has to be switched in and out. That *might* restrict the maximum buffer size to one block, which *might* be insufficient.

It's the singing dog syndrome - it's not that it doesn't sing well, it's a miracle it can sing at all. :)

The PicoMite is a lovely project - it looks like it's going to be a great alternative to python - there are a lot of people who swear at languages that use blank space as a delimiter!
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 5688
Posted: 06:04pm 23 Jun 2021
Copy link to clipboard 
Print this post

a35


PicomiteV5.07.00a35.zip
 
Touch now working




Also:

GUI test touch
GUI test lcdpanel
GUI BEEP n
GUI RESET LCDPANEL
GUI CALIBRATE
TOUCH(X)
TOUCH(Y)
OPTION TOUCH CSpin, IRQpin [,BEEPpin]

NB: the buzzer on my Maker card completely kills the processor if I try and use it - another power issue?

OPTION POWER PWM/PFM is now a permanent option and is executed on boot

Note to Volhout: IR is working and tested and available on any pin e.g.

SetPin 1,ir
IR a,b,irint
Do
Loop
Sub irint
Print a,b
End Sub


Note in the picture I'm using the SD socket on the LCD. I made up 3 wires each with 3 Dupont sockets and 1 Dupont plug. This allows me to connect all three SPI pins to the three devices (touch, SD, and LCD), of course each needs its own CS pin
Edited 2021-06-24 04:08 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 2077
Posted: 06:07pm 23 Jun 2021
Copy link to clipboard 
Print this post

  lizby said  VegiPete's ChemiChaos on the PicoMite ...


   

I want to see it ported to ASCII graphics running in a serial terminal.

Best wishes,

Tom
CMM2 Welcome Tape, Creaky old text adventures
 
     Page 4 of 14    
Print this page
© JAQ Software 2022