Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:09 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 : Micromite eXtreme (MMX) V5.07.00 betas

     Page 2 of 4    
Author Message
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 09:58pm 31 Aug 2023
Copy link to clipboard 
Print this post

What do you think about including
MM.INFO$(LINE)
Latest F4 Latest H7
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 02:09pm 02 Sep 2023
Copy link to clipboard 
Print this post

V5.07.00b2

100 and 144 pin

Micromite.X.production.zip


64 pin


Micromite.X.production.zip

Small changes
MM.INFO$(LINE)
LGETBYTE
MATH(CRCn....
MM.INFO(TRACK)
MM.INFO(SOUND)

Big changes

Complete re-write of the audio code. This is now the best platform for audio of all MMBasic ports

Supports via 12S,
Flac playback: PLAY FLAC_I2S fname$
mp3 playback: PLAY MP3_I2S fname$
wav playback: PLAY WAV_I2S fname$
mod file playback: PLAY MOD_I2S fname$

Supports via PWM
Flac playback: PLAY FLAC fname$
mp3 playback: PLAY MP3 fname$
wav playback: PLAY WAV fname$
mod file playback: PLAY MODFILE fname$
Tone command: PLAY TONE LFREQ, RFREQ [,DurationInMsec]
Sound command: As per PicoMite manual
SAM Text-to-speech PLAY TTS string$

Flac, wav and mp3 playback (both variants) all support playing an entire directory, just use a directory name instead of a filename. PLAY NEXT, PLAY PREVIOUS allow you to step through tracks

I2S playback is rated up to 24-bit 192KHz

MMX-144 wired for I2S playback.
Bit-clock SPI3-CLK (pin 98)
Data SPI3-OUT (pin 96)
L/R word clock SPI3-SS (pin 97)
Master clock (if required) SPI3-IN (pin 99)

MMX-100 wired for I2S playback.
Bit-clock SPI3-CLK (pin 69)
Data SPI3-OUT (pin 67)
L/R word clock SPI3-SS (pin 68)
Master clock (if required) SPI3-IN (pin 70)

MMX-64 wired for I2S playback
Bit-clock SPI3-CLK (pin 29)
Data SPI3-OUT (pin 45)
L/R word clock SPI3-SS (pin 30)
Master clock (if required) SPI3-IN (pin 11)

NB: the i2S dac pictured won't run on 3.3V - needs 5V




Edited 2023-09-03 00:51 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6783
Posted: 05:00pm 02 Sep 2023
Copy link to clipboard 
Print this post

I really can't understand this. The weather's not been *that* bad, surely?

Excellent work (again), Peter. :)
Mick

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

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2127
Posted: 08:56pm 02 Sep 2023
Copy link to clipboard 
Print this post

I got pickit3 and gcb extended but not a clue but looks clever
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 11:03am 14 Sep 2023
Copy link to clipboard 
Print this post

V5.07.00b3

100 and 144 pin

Micromite.X.production.zip

64 pin


Micromite.X.production.zip


This should be getting near finished. Just file handling to bring up-to-date

Changes:
BITBANG HUMID replaces HUMID
BITBANG LCD replaces LCD
BITBANG WS2812 introduced (same syntax as PicoMite)
FRAMEBUFFER command - same as PicoMite - works for all displays
All Sprite functionality reworked
Multiline comments (same as latest PicoMite beta)

Revised screen support

SPI
ILI9488, ILI9341, ILI9481 (Pi HAT version)

8-Bit parallel
SSD1963_4, SSD1963_5, SSD1963_5A, SSD1963_7, SSD1963_7A, SSD1963_8

16-Bit parallel
SSD1963_4_16, SSD1963_5_16, SSD1963_5A_16, SSD1963_7_16, SSD1963_7A_16, SSD1963_8_16
ILI9341_16, IPS_4_16 (supports OTM8009A and NT35510)

VGA
640x480 RGB111, 640x400 RGB111

Demo of sprites and framebuffer - should work on any display except ILI9481 (doesn't support reading the controllers framebuffer)


Option explicit
Option default none
Framebuffer create
Framebuffer write f
CLS
'brownian motion demo using sprites
Dim integer x(64),y(64),c(64)
Dim float direction(64)
Dim integer i,j,k, collision=0
Dim string q$
For i=1 To 64
direction(i)=Rnd*360 'establish the starting direction for each atom
c(i)=RGB(Rnd*255,Rnd*255,Rnd*255) 'give each atom a colour
Circle 10,10,4,1,,RGB(white),c(i) 'draw the atom
SPRITE read i,6,6,9,9 'read it in as a sprite
Next i
CLS RGB(blue)
Box 0,0,MM.HRes,MM.VRes
k=1
For i=MM.HRes\9 To MM.HRes\9*8 Step MM.HRes\9
For j=MM.VRes\9 To MM.VRes\9*8 Step MM.VRes\9
  SPRITE show k,i,j,1
  x(k)=i
  y(k)=j
  vector k,direction(k), 0, x(k), y(k) 'load up the vector move
  k=k+1
Next j
Next i
'
Do
For i=1 To 64
  vector i, direction(i), 1, x(i), y(i)
  SPRITE show i,x(i),y(i),1
  If sprite(S,i)<>-1 Then
    break_collision i
  EndIf
Next i
Framebuffer copy f,n
Loop
'
Sub vector(myobj As integer, angle As float, distance As float, x_new As intege
r, y_new As integer)
Static float y_move(64), x_move(64)
Static float x_last(69), y_last(64)
Static float last_angle(64)
If distance=0 Then
  x_last(myobj)=x_new
  y_last(myobj)=y_new
EndIf
If angle<>last_angle(myobj) Then
  y_move(myobj)=-Cos(Rad(angle))
  x_move(myobj)=Sin(Rad(angle))
  last_angle(myobj)=angle
EndIf
x_last(myobj) = x_last(myobj) + distance * x_move(myobj)
y_last(myobj) = y_last(myobj) + distance * y_move(myobj)
x_new=Cint(x_last(myobj))
y_new=Cint(y_last(myobj))
Return

' keep doing stuff until we break the collisions
Sub break_collision(atom As integer)
Local integer j=1
Local float current_angle=direction(atom)
'start by a simple bounce to break the collision
If sprite(e,atom)=1 Then
  'collision with left of screen
  current_angle=360-current_angle
ElseIf sprite(e,atom)=2 Then
  'collision with top of screen
    current_angle=((540-current_angle) Mod 360)
ElseIf sprite(e,atom)=4 Then
  'collision with right of screen
  current_angle=360-current_angle
ElseIf sprite(e,atom)=8 Then
  'collision with bottom of screen
  current_angle=((540-current_angle) Mod 360)
Else
  'collision with another sprite or with a corner
  current_angle = current_angle+180
EndIf
direction(atom)=current_angle
vector atom,direction(atom),j,x(atom),y(atom) 'break the collision
SPRITE show atom,x(atom),y(atom),1
'if the simple bounce didn't work try a random bounce
Do While (sprite(t,atom) Or sprite(e,atom)) And j<10
  Do
    direction(atom)= Rnd*360
    vector atom,direction(atom),j,x(atom),y(atom) 'break the collision
    j=j+1
  Loop Until x(atom)>=0 And x(atom)<=MM.HRes-sprite(w,atom) And y(atom)>=0 And
y(atom)<=MM.VRes-sprite(h,atom)
  SPRITE show atom,x(atom),y(atom),1
Loop
' if that didn't work then place the atom randomly
Do While (sprite(t,atom) Or sprite(e,atom))
  direction(atom)= Rnd*360
  x(atom)=Rnd*(MM.HRes-sprite(w,atom))
  y(atom)=Rnd*(MM.VRes-sprite(h,atom))
  vector atom,direction(atom),0,x(atom),y(atom) 'break the collision
  SPRITE show atom,x(atom),y(atom),1
Loop
End Sub

Edited 2023-09-14 21:14 by matherp
 
lizby
Guru

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

Just for fun, with number of sprites reduced from 64 to 32, "sprite show" changed to "blit write", and collision detection turned off because "If sprite(S,i)<>-1 Then" errors with "Error : S is not declared", this is what the sprite demo program looks like on a picomite with ILI9488:



Errors out with:

[34] Blit write i,x(i),y(i),1
Error : -9 is invalid (valid is -8 to 320)

Just playin'.

Edit: changing "Blit write i,x(i),y(i),1" to
 If y(i) > -9 And y(i) < 321) Then
   If x(i) > -9 And x(i) < 481 Then
     Blit write i,x(i),y(i),1
   EndIf
 EndIf

enabled it to run until all sprites had left the screen.

~
Edited 2023-09-14 23:03 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 06:21am 16 Sep 2023
Copy link to clipboard 
Print this post

STOP PRESS

There is now a full manual for the MMX produced for us by Panky (Doug Pankhurst).

This is available from here

It is still a work in progress and Doug will appreciate feedback but is so for ahead of where we were with my feeble efforts


 
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 08:34pm 16 Sep 2023
Copy link to clipboard 
Print this post

Much thanks Doug... I have Peter's Built & operational PCB... I have somehow joined the dropbox share... I hope you don't mind... The board has been in the drawer for a few years... Will try to get back to it...  
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 04:53am 30 Sep 2023
Copy link to clipboard 
Print this post

Peter,
The POLYGON command fails on the MMX144 with an SSD1963_7 lcd.

The same command works on MMB4W and Pico with SSD1963 LCD OK.

>print mm.device$Micromite eXtreme, Microchip ID 0x17227053
> print mm.ver 5.070103
> memoryFlash:
  1K ( 1%) Program (3 lines)
543K (99%) Free
RAM:
  0K ( 0%) 0 Variables
  1K ( 0%) General
380K (100%) Free
> list
Dim xarr%(3) = (100,140,130,110)
Dim yarr%(3) = (100,100,200,200)
Polygon 4,xarr%(),yarr%(),RGB(red),RGB(white)
> run
[3] Polygon 4,xarr%(),yarr%(),RGB(red),RGB(white)
Error : Syntax
>

Regards,
Doug.
Edit:
Further to the above, the MMX does not like the 'n' option in the command - if you take this out, it works as intended.

MMB4W correctly handles the 'n' parameter.

Picomite correctly handles the 'n' paramater if it matches the array sizes, however, if you specify the 'n' parameter above as 3 then Picomite draws the polygon incorrectly - it seems to forget the outline although the outline is correct when the 'n' parameter matches the array sizes.
Doug.
Edited 2023-09-30 15:12 by panky
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 10:29am 30 Sep 2023
Copy link to clipboard 
Print this post

V5.07.00b4

100 and 144 pin

Micromite.X.production.zip


64 pin

Micromite.X.production.zip


POLYGON command brought up to latest syntax as per PicoMite
SPRITE MEMORY and SPRITE MEMORY COMPRESSED as per PicoMite
CSUB, CFUNCTION and DEFINE FONT functionality fixed

Major rework of all things file related
FATFS brought up to latest release
KILL command updated as per PicoMite
FILES command as per PicoMite
COPY command added
Edited 2023-09-30 20:37 by matherp
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 03:40am 01 Oct 2023
Copy link to clipboard 
Print this post

Thanks Peter,

Do all BLIT commands get internally translated into SPRITE commands as per the PicoMite?

Is there an explanation of SPRITE MEMORY and SPRITE MEMORY COMPRESSED available?

Cheers,
Doug
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 08:46am 01 Oct 2023
Copy link to clipboard 
Print this post

As for all versions BLIT and SPRITE are the same command and are interchangeable

For the MEMORY commands, to save retyping please see here and the included links. Please read from the top of page 10 to the end of the thread as the command changed as comments came in.

In the latest release of the PicoMite and the MMX you can also load compressed sprites with SPRITE MEMORY by setting the top bit of the width/height word for each sprite that is compressed.

From my perspective the MMX code is now up-to-date and subject to any bugs found I will migrate to a full release

HOWEVER, there appears to have been little testing done. As goc30 reported on the original thread RC3 (and earlier RC) had major bugs which were not reported. Hopefully RC4 is much better but it really needs the user-base to work with it.
Edited 2023-10-01 18:50 by matherp
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 245
Posted: 01:25pm 02 Oct 2023
Copy link to clipboard 
Print this post

The b4 appears to come with a full set of options loaded - settings for SSD1963, touch calibration etc.; most of which do not apply to my setup.  I thought that the option settings would be set to null on loading new firmware.  

I mentioned previously the minor discrepancy in the command syntax for the heartbeat.  Extreme was the first MicroMite to have this command and the syntax was HEARTBEAT ENABLE or HEARTBEAT DISABLE.  This changed on the PicoMite to HEARTBEAT ON and HEARTBEAT OFF.  After having been switched over to PicoMites for many months I found myself typing HEARTBEAT OFF and then puzzling for a moment why it had not happened until I remembered the syntax change.  Keeping the language constant across the Mite system would, perhaps, be best.  My preference is for the original - HEARTBEAT ENABLE/DISABLE.  

My i2S DAC board arrived this morning - going to spend the evening connecting it in and trying out - very exciting indeed.  

I deeply appreciate the work you are doing to bring Extreme up to date and I am trying desperately to find time to work through it all.  You work so fast but my time is far more limited than my enthusiasm is for working with the new firmware.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 02:47pm 02 Oct 2023
Copy link to clipboard 
Print this post

  Quote  The b4 appears to come with a full set of options loaded


Sorry, set for my test environment to save me keep typing - will remove in the next beta.

  Quote   My preference is for the original - HEARTBEAT ENABLE/DISABLE.  


I'll standardise on ON/OFF as there are a lot more Picos out there than MMX
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 245
Posted: 07:10pm 02 Oct 2023
Copy link to clipboard 
Print this post

  matherp said  

I'll standardise on ON/OFF as there are a lot more Picos out there than MMX


Yes, that is, of course, the logical decision. (...and quicker to type!)
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 07:23am 03 Oct 2023
Copy link to clipboard 
Print this post

Peter,
Are you planning to include Escape Sequence processing?
Cheers,
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 07:25am 03 Oct 2023
Copy link to clipboard 
Print this post

Sorry - ignore last - forgot to enable with OPTION ESCAPE
Cheers,
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
athlon1900
Regular Member

Joined: 10/10/2019
Location: Austria
Posts: 48
Posted: 10:01am 03 Oct 2023
Copy link to clipboard 
Print this post

@matherp

I have a question : are the i2c/spi oled-displays (ssd1306 , ssh1106) implemented in the firmware or do i have to handle it in BASIC again ?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 10:31am 03 Oct 2023
Copy link to clipboard 
Print this post

  Quote  I have a question : are the i2c/spi oled-displays (ssd1306 , ssh1106) implemented in the firmware or do i have to handle it in BASIC again ?


In Basic
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 245
Posted: 07:32pm 03 Oct 2023
Copy link to clipboard 
Print this post

Well, this took me a while to sort out.

I connected the i2S DAC that arrived a couple of days ago - looked very much like the one shown in this thread and then tried to play an .MP3.  Nothing...! I checked my connections.  No issue.  4.98v on VCC.  I re-checked the connections just in case a connector was faulty - from actual pins 96,97,98 on the MMX chip to the solder joints on the i2S board.  All seemed okay. My conclusion; the board must be faulty.  

Very frustrated, I looked on Amazon for a next-day delivery PCM5102 DAC and it arrived at lunchtime (a Dollartek product*).  Wired it in and...silence!  Unlikely to be another faulty board, but not impossible.  Again a forensic check on my wires and all seemed okay.  Could it be?  I loaded the Extreme with the old firmware** and, to my astonishment, the music played.  

The innovative i2S seems not to be operative in this last firmware version.  Help?

**Edit: very old firmware -5.05.04 - it just came to hand in MMFlash folder.  I have been using 5.05.09 until this new round.

*Edit: the one on the slow boat from China was much cheaper!
Edited 2023-10-04 05:41 by circuit
 
     Page 2 of 4    
Print this page
© JAQ Software 2024