Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:05 02 Aug 2025 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 : CMM2 V5.07.00b2: Flexible serial console and fast timer

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 04:34pm 04 Jan 2021
Copy link to clipboard 
Print this post

Pleas download V5.07.00b2

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

This version should fix the various little niggles that have been identified in b1 and adds new functionality as follows:

Use:
integervariable>>n' for unsigned shift right
integervariable>>>n' for signed shift right



A new fast settick mode is now available:

SETTICK FAST frequency, interruptroutine


This allows you to exceed the current maximum rate of 1 interrupt per millisecond (1000HZ) and has been tested up to 50KHz. Obviously if the interrupt routine overruns the time available then interrupts will be lost. If the program is executing a statement that takes longer than the time between interrupts the interrupts will be stacked.
An example use would be to output to a DAC

dim float s(359)
c=0
for i=0 to 359
 s(i)=sin(rad(i))*1.5+1.6
next i
print "expected frequency ",44100/360
settick fast  44100,myint
do:pause 2000000:loop
'
sub myint
 dac 1,s(c)
 inc c
 if c=360 then c=0
end sub


The final enhancement is to allow you to select the serial port to be used as the console.

OPTION CONSOLE PORT n


n can be 1, 2, or 3 (default). If this option is set all console output is directed to the specified com port. This allows easier remote operation using a wifi-uart or radio link. Previously you would have had to remove the MCP2221A chip and connect the external I/F to the USB-B connector. If the option is set to other than default then COM3 is available on the USB-B connector.
 
Rado
Regular Member

Joined: 27/11/2020
Location: Croatia
Posts: 59
Posted: 07:56pm 04 Jan 2021
Copy link to clipboard 
Print this post

I can confirm that on this version Welcome tape works almost flawlessly: the only thing that does not work is quit option - I can move up and down, select programs, run them all just fine, but once I have to confirm that I want to quit (press Y) - it seems stuck.

Other apps and games run fine, no artefacts in graphics demos.
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 08:11pm 04 Jan 2021
Copy link to clipboard 
Print this post

Finally, I can continue the 2A03 (NES) sound chip simulator, maybe with the SETTICK FAST I can simulate the ADPCM channel and I can try to simulator even other sound chips that need a faster interrupt timer.

Thanks, matherp!
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 490
Posted: 08:49pm 04 Jan 2021
Copy link to clipboard 
Print this post

Thanks, matherp!

You did fix that control S in file manager. So thankful.  

If a mouse using program like your mouse tester is terminated before it get to close down the mouse port the file manager comes up with the error PIN 33 IN USE.  This makes sense.  I have been entering controller mouse close 0.  Is that the best option? Maybe I can set a search path and add a one-line program called CM.bas. I will have to figure out how to do the search path thing.  Thanks again.  The mouse makes both the file manager and editor so much easier and intuitive.  Thanks once again.
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 09:00pm 04 Jan 2021
Copy link to clipboard 
Print this post

Thanks Peter,

I just got upgraded to V 5.06, you're working faster than I can keep up.
Whatever kind of drugs you're on, I need some !!

Many thanks to you and Geoff for this great project and all your work.

Lou
Microcontrollers - the other white meat
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 11:56pm 04 Jan 2021
Copy link to clipboard 
Print this post

  Rado said  I can confirm that on this version Welcome tape works almost flawlessly: the only thing that does not work is quit option - I can move up and down, select programs, run them all just fine, but once I have to confirm that I want to quit (press Y) - it seems stuck.


I'm glad @matherp managed to fix the main issues. I think the Quit problem is a bug in my code. I guess I'll have to find time to fire-up the CMM2 and create a v0.5.2.

Best wishes,

Tom
Edited 2021-01-05 10:22 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 04:29am 05 Jan 2021
Copy link to clipboard 
Print this post

I can confirm what Rado said about the Welcome Tape. Entering 'Q' to quit and then 'Y' to confirm causes the CMM2 to need a reset. It was fine with version 5.06.00 so something has changed to break it. Possibly something to do with console?

Bill
Edited 2021-01-05 14:36 by Turbo46
Keep safe. Live long and prosper.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:58am 05 Jan 2021
Copy link to clipboard 
Print this post

  Turbo46 said  I can confirm what Rado said about the Welcome Tape. Entering 'Q' to quit and then 'Y' to confirm causes the CMM2 to need a reset. It was fine with version 5.06.00 so something has changed to break it. Possibly something to do with console?


Thanks Bill. If it needs a reset then it probably is a firmware issue after all. "Lockdown 3 - The Worst Sequel Ever" has just hit the Disunited Kingdom so I'm not sure when I'll get a chance to sit down in front of the CMM2 for long enough to try and reproduce it with a smaller example.

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 10:02am 05 Jan 2021
Copy link to clipboard 
Print this post

  Quote  so I'm not sure when I'll get a chance to sit down in front of the CMM2 for long enough to try and reproduce it with a smaller example.


Don't bother looking at it. I know the cause and I know the fix. What I don't know is why the cause is the cause. It relates to some major internal work in 5.07.00 preparing for some new future functionality and I need to find the underlying issue rather than just backing out the changed code.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 10:07am 05 Jan 2021
Copy link to clipboard 
Print this post

  matherp said  Don't bother looking at it ...


Thanks Peter, much appreciated.
Edited 2021-01-05 20:07 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 167
Posted: 01:08pm 05 Jan 2021
Copy link to clipboard 
Print this post

Looks good!

Steve
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 02:58pm 06 Jan 2021
Copy link to clipboard 
Print this post

  Quote  
integervariable>>n' for unsigned shift right
integervariable>>>n' for signed shift right


This is working fine for me. Thank you!
Epsilon CMM2 projects
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025