Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:06 24 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 : MMBasic Test Version 2.6A - With Fonts

     Page 1 of 4    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 06:06am 22 Sep 2011
Copy link to clipboard 
Print this post

YATV - Yet another test version !!

Inspired by the efforts of Gizmo and jman to draw large numbers I have put user selectable fonts into this new version of MMBasic. There are now three standard fonts:
- The basic font of 10 x 5 pixels.
- A larger font of 16 x 11 pixels.
- A jumbo font of 30 x 22 pixels consisting of the numbers zero to nine and the characters plus, minus, comma and full stop.

You can select between them with the FONT command. You can also scale a font to x2, x3, x4, etc in size and you can display the characters in reverse video.

The image shows all three fonts on the first line. The second shows all three but scaled by 2 (ie, doubled in size). The last 2 lines are the same as the first two but with reverse video selected.



You can also load up to seven of your own fonts from text files on the SD card. The characters in these user created fonts can be up to 64 pixels height by 255 pixels wide. A pdf included with the hex file describes the font commands and how to create your own fonts (it is easy - you use notepad).

On another subject, recently I have implemented profiling which tells me where the interpreter is spending most of its time - this makes it easy to identify the sections of code that need optimising. Using the results of this I have tweaked some of the code with the result that this version runs about 45% faster than 2.6 and 87% (almost double) the speed of 2.5 (which admittedly was a low point).

These results were with my test programs, your experience may vary.

The results of the profiling will also be of interest following the suggestion of disabling the video to improve speed. With the video disabled the speed increase was a little over 2%, hardly worth bothering about. USB overhead was similar - 1.8%, negligible.

You can download version 2.6A from: http://geoffg.net/Downloads/Maximite/Maximite_Update_V2.6A.z ip

As usual, please report your experience with it, particularly if you find a bug.

Geoff

Geoff Graham - http://geoffg.net
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 06:15am 22 Sep 2011
Copy link to clipboard 
Print this post

A note on blinking video.

I also thought about a blinking attribute to the FONT command but it is not practical due the way MMBasic handles the video. MMBasic actually writes a bitmap of each character to the video memory and to implement blinking the firmware would have to keep track of what pixels were used in the character. With multiple characters in multiple fonts it would be an impossible task.

A much simpler solution is to redraw the the characters within MMBasic to create a blinking effect. This is an example of how to do it:

10 CLS
20 xpos = 150 : ypos = 50
30 value = 125
40 SETTICK 250, 1000
50 ' run the rest of the program
60 GOTO 50
70 '
80 '
1000 ' interrupt routine
1010 LOCATE xpos, ypos
1020 FONT 3, 1 , rev
1030 PRINT STR$(value);
1040 rev = NOT rev
1050 IRETURN


Geoff
Geoff Graham - http://geoffg.net
 
seco61
Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 205
Posted: 06:20am 22 Sep 2011
Copy link to clipboard 
Print this post

Hi Geoff.

Could you post (or send me) the source - I have integrated my changes into the v2.6 code - and would like to get a head start on the newer code!

regards

Gerard

Regards

Gerard (vk3cg/vk3grs)
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 06:29am 22 Sep 2011
Copy link to clipboard 
Print this post

Hi Geoff


Many thanks for this
I will update my EVO code post the results

John
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 06:51am 22 Sep 2011
Copy link to clipboard 
Print this post

Hi Gerard,

I have a Maximite article coming up in Silicon Chip and I am planning to release 2.7 to coincide with it, in fact the article depends on this new version. There are a couple of features in 2.7 that I would like to keep under wraps until then as otherwise there would be no purpose to the article. Also, and probably more serious, I would very much annoy the editor of Silicon Chip if I published details before his publication date.

All this is intertwined in 2.6A and I cannot pull out the new stuff out without making a lot of work and it would not help you anyway because that would not be the code going into 2.7. The article is due in the November edition which will hit the streets in about 4 weeks so, sorry, but the source will have to wait until then.

I can appreciate your position but I am hoping that the pace of change will slow down after 2.7 and then you can get a better run without me always pulling the rug out from underneath you.

Geoff
Geoff Graham - http://geoffg.net
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 07:26am 22 Sep 2011
Copy link to clipboard 
Print this post

I've just loaded up the new version and stared changing the number readouts on my little RE controller/logger project. First font I tried was #3, looks great!

The LIST command is not working as expected. It seams to ignore the line-line parameters. My program has lines from 10 to 1000, LIST -400 does nothing, LIST 400- lists all lines, even those before 400. LIST 200-400 also list the entire program. Bug ( Glenn is wondering if he's missed a post about changes to the LIST command )

Glenn


The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 08:58am 22 Sep 2011
Copy link to clipboard 
Print this post

Drat, that was a result of my optimising some of the code.

This fixes that fault and a couple of related issues:
http://geoffg.net/Downloads/Maximite/Maximite_Update_V2.6B.z ip

Geoff
Geoff Graham - http://geoffg.net
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 09:23am 22 Sep 2011
Copy link to clipboard 
Print this post

Geoff,

  Geoffg said   http://geoffg.net/Downloads/Maximite/Maximite_Update_V2.6B.z ip
= HTTP 404 - File not found

With 2.6A I have also noticed some strange behavior of the power led, goes out with a NEW command, and also I cannot reliably read my DS1302 RTC, some of the read numbers are scrambled and I suspect timing issues. Maybe the Maxitmite is too fast??

Regards,
Anthony.
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 09:27am 22 Sep 2011
Copy link to clipboard 
Print this post

  Geoffg said   YATV - Yet another test version !!

Inspired by the efforts of Gizmo and jman to draw large numbers I have put user selectable fonts into this new version of MMBasic. There are now three standard fonts:
- The basic font of 10 x 5 pixels.
- A larger font of 16 x 11 pixels.
- A jumbo font of 30 x 22 pixels consisting of the numbers zero to nine and the characters plus, minus, comma and full stop.



Geoff .... You are a genius... I want you to have my babies...


Great work mate.. fantastic...

Thanks heaps
Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 10:14am 22 Sep 2011
Copy link to clipboard 
Print this post

I must be having a bad hair day !!
Fixed the broken URL and 2.6B fixed the weird power LED behaviour.
I don't know what could be causing the strange i/o behaviour, nothing has changed in that area and it passes my tests. Could you investigate at your end?

Must be time to get a glass of red wine and do something else...

Geoff
Geoff Graham - http://geoffg.net
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 10:45am 22 Sep 2011
Copy link to clipboard 
Print this post

i guess the thought of somebody living in a capital city making his own electricity just seems to defeat the purpose but why pay for power when you can have it for free...regards sparkey.... abouve the outlay costs ....
technicians do it with least resistance
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 10:58am 22 Sep 2011
Copy link to clipboard 
Print this post

Geoff,

After reverting to 2.6 and seeing all was fine I have 2.6B loaded now, the problem still persisted but as I suggested a timing issue it was. A carefully placed 1ms pause has fixed the problem. Interestingly it seemed the DS1302 was understanding the address to read, it was the Maximite not quite reading the data coming back, it was misreading a bit I'd say. Makes me wonder about those pull up resistors, I wanted to use 4.7k but only had 2.2k's when I built it.

The fonts are great, enjoy the red.

Cheers,
Anthony.
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 11:14am 22 Sep 2011
Copy link to clipboard 
Print this post

Hi Geoff

Thanks for great effort the fonts are awesome.
The software in the EVO is now using the fonts command
Pics to follow tomorrow

Anybody else noticed the edit command doing strange things ?

Edit This seems to be correct in 2.6B


JohnEdited by jman 2011-09-23
 
thetinkerer

Regular Member

Joined: 16/06/2011
Location: Australia
Posts: 68
Posted: 08:29pm 22 Sep 2011
Copy link to clipboard 
Print this post

Hi Geoff,
Just having an issue with my maximite Version 2.6b:
This code:
10 FONT #3,2,1
20 print "hello"



print the hello in normal font and then puts the cursor 4 lines down.
I am running the MM with ext power keyboard and LCD monitor- wierd.


I still haven't found anything about the USB - comms issue on versions > 2.5B

thanks

Marc
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:51pm 22 Sep 2011
Copy link to clipboard 
Print this post

Try this

10 Font #3, 2, 1
20 Print "Hello"



John
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 09:08pm 22 Sep 2011
Copy link to clipboard 
Print this post

Font #3 is numbers and select characters only. This had me going for a while too.

try
10 Font #3,2,1
20 print "0123456789+-,."

Cheers,
Anthony.
 
Greg Fordyce
Senior Member

Joined: 16/09/2011
Location: United Kingdom
Posts: 153
Posted: 09:13pm 22 Sep 2011
Copy link to clipboard 
Print this post

Thanks Geoff for the large fonts. My MM arrived earlier this week but I haven't had time to try it out yet, but hopefully this weekend, when the first order of business will be to load the latest firmware.

Greg
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 09:27pm 22 Sep 2011
Copy link to clipboard 
Print this post

  thetinkerer said  I still haven't found anything about the USB - comms issue on versions > 2.5

I thought that was fixed. Have you checked C5 on Vcap?

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 09:59pm 22 Sep 2011
Copy link to clipboard 
Print this post

Using the USB port, the command prompt is preceded by a space and a backspace.

Maximite BASIC Version 2.6B
Copyright 2011 Geoff Graham

>

Version 2.6A and 2.6B


Jim
VK7JH
MMedit   MMBasic Help
 
BobDevries

Senior Member

Joined: 08/06/2011
Location: Australia
Posts: 266
Posted: 09:59pm 22 Sep 2011
Copy link to clipboard 
Print this post

Hi Geoff,

I'm having a problem with version 2.6B. Maybe I'm not understanding the instructions, but....

If I type:
FONT #3,2,1
PRINT "0123"

I get normal characters on the screen. I should be able to do this from the command prompt, right?

Hmmm, apparently you CAN NOT use this from the prompt? Just tried it inside a short program and it works fine.

grumble, grumble.

BTW, the cursor stops flashing after I use the FONT command (in a programme)

Regards,
Bob Devries
Dalby, QLD, Australia
 
     Page 1 of 4    
Print this page
© JAQ Software 2024